1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 22:21:11 +02:00

Fix compilation without USE_MIDI

This commit is contained in:
Alexander Tsoy
2019-08-27 19:12:43 +03:00
parent 45ddc8c413
commit 7a91b6c5e9
5 changed files with 10 additions and 10 deletions

View File

@@ -299,6 +299,7 @@ const ReservedCommandFlag
return !TrackList::Get( project ).Any<const WaveTrack>().empty();
}
},
#ifdef USE_MIDI
NoteTracksExistFlag{
[](const AudacityProject &project){
return !TrackList::Get( project ).Any<const NoteTrack>().empty();
@@ -309,6 +310,7 @@ const ReservedCommandFlag
return !TrackList::Get( project ).Selected<const NoteTrack>().empty();
}
}, //gsw
#endif
IsNotSyncLockedFlag{
[](const AudacityProject &project){
return !ProjectSettings::Get( project ).IsSyncLocked();
@@ -354,9 +356,11 @@ const ReservedCommandFlag
[](const AudacityProject &project){
auto &tracks = TrackList::Get( project );
return
#ifdef USE_MIDI
!tracks.Selected<const NoteTrack>().empty()
// even if not EXPERIMENTAL_MIDI_OUT
||
#endif
!tracks.Selected<const WaveTrack>().empty()
;
}

View File

@@ -49,10 +49,6 @@ using WaveTrackConstArray = std::vector < std::shared_ptr < const WaveTrack > >;
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 > >;
@@ -70,9 +66,7 @@ enum class TrackKind
{
None,
Wave,
#if defined(USE_MIDI)
Note,
#endif
Label,
Time,
Audio,

View File

@@ -276,6 +276,7 @@ static Importer::RegisteredImportPlugin registered{
std::make_unique< LOFImportPlugin >()
};
#ifdef USE_MIDI
// return null on failure; if success, return the given project, or a NEW
// one, if the given was null; create no NEW project if failure
static AudacityProject *DoImportMIDIProject(
@@ -294,6 +295,7 @@ static AudacityProject *DoImportMIDIProject(
else
return nullptr;
}
#endif
/** @brief Processes a single line from a LOF text file, doing whatever is
* indicated on the line.

View File

@@ -248,8 +248,6 @@ const TCPLines &NoteTrackControls::GetTCPLines() const
return noteTrackTCPLines;
};
#endif
namespace {
#ifdef EXPERIMENTAL_MIDI_OUT
@@ -329,3 +327,5 @@ auto GetDefaultNoteTrackHeight::Implementation() -> Function {
};
}
static GetDefaultNoteTrackHeight registerGetDefaultNoteTrackHeight;
#endif

View File

@@ -396,12 +396,12 @@ UIHandle::Result TimeShiftHandle::Click
ok = false;
else
captureClips = true;
},
#ifdef USE_MIDI
},
[&](NoteTrack *) {
captureClips = true;
}
#endif
}
);
if ( ! ok )