Browse Source

MPE: made lock inside MPESynthesiserBase private and gave it a more descriptive name.

tags/2021-05-28
Timur Doumler 9 years ago
parent
commit
228e4b732c
2 changed files with 3 additions and 4 deletions
  1. +2
    -2
      modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp
  2. +1
    -2
      modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h

+ 2
- 2
modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp View File

@@ -103,7 +103,7 @@ void MPESynthesiserBase::renderNextBlock (AudioBuffer<floatType>& outputAudio,
int midiEventPos;
MidiMessage m;
const ScopedLock sl (renderAudioLock);
const ScopedLock sl (noteStateLock);
while (numSamples > 0)
{
@@ -147,7 +147,7 @@ void MPESynthesiserBase::setCurrentPlaybackSampleRate (const double newRate)
{
if (sampleRate != newRate)
{
const ScopedLock sl (renderAudioLock);
const ScopedLock sl (noteStateLock);
instrument->releaseAllNotes();
sampleRate = newRate;
}


+ 1
- 2
modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h View File

@@ -179,11 +179,10 @@ protected:
//==============================================================================
/** @internal */
ScopedPointer<MPEInstrument> instrument;
/** @internal */
CriticalSection renderAudioLock;
private:
//==============================================================================
CriticalSection noteStateLock;
double sampleRate;
int minimumSubBlockSize;


Loading…
Cancel
Save