Fix for midi freeze
Reset midiEventMemoryIndex in AlsaDriver.cpp when starting MIDI processing and when clearing midiEventCount to avoid stale index/state issues while using expression pedals.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
* MIT License
|
* MIT License
|
||||||
*
|
*
|
||||||
* Copyright (c) Robin E.R. Davies
|
* Copyright (c) Robin E.R. Davies
|
||||||
|
* Copyright (c) Roberto Figliè
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -1681,6 +1682,7 @@ namespace pipedal
|
|||||||
AlsaMidiMessage message;
|
AlsaMidiMessage message;
|
||||||
|
|
||||||
midiEventCount = 0;
|
midiEventCount = 0;
|
||||||
|
midiEventMemoryIndex = 0;
|
||||||
auto alsaSequener = this->alsaSequencer; // take an addref
|
auto alsaSequener = this->alsaSequencer; // take an addref
|
||||||
if (!alsaSequener)
|
if (!alsaSequener)
|
||||||
{
|
{
|
||||||
@@ -1772,6 +1774,7 @@ namespace pipedal
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this->midiEventCount = 0;
|
this->midiEventCount = 0;
|
||||||
|
this->midiEventMemoryIndex = 0;
|
||||||
|
|
||||||
// snd_pcm_wait(captureHandle, 1);
|
// snd_pcm_wait(captureHandle, 1);
|
||||||
ssize_t framesToRead = bufferSize;
|
ssize_t framesToRead = bufferSize;
|
||||||
|
|||||||
Reference in New Issue
Block a user