mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-01 15:43:44 +02:00
With EXPERIMENTAL_MIDI_OUT, pausing MIDI and audio playing together now turns off all MIDI notes currently playing (same behavior as pausing MIDI track alone)
This commit is contained in:
parent
c067f93838
commit
28aaa34889
@ -2046,17 +2046,19 @@ MidiThread::ExitCode MidiThread::Entry()
|
||||
gAudioIO->mNumFrames > 0)
|
||||
{
|
||||
// Keep track of time paused. If not paused, fill buffers.
|
||||
if (gAudioIO->mNumPlaybackChannels == 0 && gAudioIO->IsPaused()) {
|
||||
if (gAudioIO->IsPaused()) {
|
||||
if (!gAudioIO->mMidiPaused) {
|
||||
gAudioIO->mMidiPaused = true;
|
||||
pauseStart = MidiTime(NULL);
|
||||
gAudioIO->AllNotesOff(); // to avoid hanging notes during pause
|
||||
pauseStart = MidiTime(NULL);
|
||||
}
|
||||
} else {
|
||||
if (gAudioIO->mMidiPaused) {
|
||||
gAudioIO->mMidiPaused = false;
|
||||
// note: mPauseTime ignored if audio is playing
|
||||
gAudioIO->mPauseTime += (MidiTime(NULL) - pauseStart);
|
||||
}
|
||||
|
||||
gAudioIO->FillMidiBuffers();
|
||||
|
||||
// test for end
|
||||
|
Loading…
x
Reference in New Issue
Block a user