summaryrefslogtreecommitdiff
path: root/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch
blob: d4ec1a7320f620f17961d45acc2ad3ed8d6f30ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff -urpN a/src/Track.h b/src/Track.h
--- a/src/Track.h	2019-05-04 13:38:57.000000000 +0300
+++ b/src/Track.h	2019-08-27 19:32:36.937551831 +0300
@@ -53,10 +53,6 @@ using WaveTrackConstArray = std::vector
 
 using NoteTrackConstArray = std::vector < std::shared_ptr< const NoteTrack > >;
 
-#if defined(USE_MIDI)
-class NoteTrack;
-#endif
-
 class TrackList;
 
 using ListOfTracks = std::list< std::shared_ptr< Track > >;
@@ -74,9 +70,7 @@ enum class TrackKind
 {
    None,
    Wave,
-#if defined(USE_MIDI)
    Note,
-#endif
    Label,
    Time,
    Audio,
diff -urpN a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp
--- a/src/menus/FileMenus.cpp	2019-05-04 13:38:57.000000000 +0300
+++ b/src/menus/FileMenus.cpp	2019-08-27 19:32:36.939551720 +0300
@@ -141,8 +141,6 @@ AudacityProject *DoImportMIDI(
 }
 #endif
 
-#ifdef USE_MIDI
-
 // Menu handler functions
 
 struct Handler : CommandHandlerObject {
@@ -480,6 +478,7 @@ void OnImportLabels(const CommandContext
    }
 }
 
+#ifdef USE_MIDI
 void OnImportMIDI(const CommandContext &context)
 {
    auto &project = context.project;
@@ -496,7 +495,7 @@ void OnImportMIDI(const CommandContext &
    if (!fileName.empty())
       DoImportMIDI(&project, fileName);
 }
-#endif
+#endif // USE_MIDI
 
 void OnImportRaw(const CommandContext &context)
 {
diff -urpN a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp
--- a/src/tracks/ui/TimeShiftHandle.cpp	2019-05-04 13:38:57.000000000 +0300
+++ b/src/tracks/ui/TimeShiftHandle.cpp	2019-08-27 19:32:36.940551665 +0300
@@ -393,12 +393,12 @@ UIHandle::Result TimeShiftHandle::Click
                ok = false;
             else
                captureClips = true;
-         },
 #ifdef USE_MIDI
+         },
          [&](NoteTrack *) {
             captureClips = true;
-         }
 #endif
+         }
       );
 
    if ( ! ok )