1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Workaround for GarageBand as synth not respecting notes-off message

This commit is contained in:
Paul Licameli
2017-07-25 14:56:02 -04:00
parent c2229b131f
commit 07ea0ae03f
2 changed files with 35 additions and 1 deletions

View File

@@ -125,6 +125,10 @@ struct AudioIOStartStreamOptions
#endif
};
// This workaround makes pause and stop work when output is to GarageBand,
// which seems not to implement the notes-off message correctly.
#define AUDIO_IO_GB_MIDI_WORKAROUND
class AUDACITY_DLL_API AudioIO final {
public:
@@ -543,6 +547,11 @@ private:
std::unique_ptr<Alg_iterator> mIterator;
/// The next event to play (or null)
Alg_event_ptr mNextEvent;
#ifdef AUDIO_IO_GB_MIDI_WORKAROUND
std::vector< std::pair< int, int > > mPendingNotesOff;
#endif
/// Time at which the next event should be output, measured in seconds.
/// Note that this could be a note's time+duration for note offs.
double mNextEventTime;