Browse Source

Android: Fixed a race condition when switching the buffer size on the Android OpenSL audio device

tags/2021-05-28
hogliux 7 years ago
parent
commit
ac5797da58
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_audio_devices/native/juce_android_OpenSL.cpp

+ 5
- 0
modules/juce_audio_devices/native/juce_android_OpenSL.cpp View File

@@ -651,11 +651,16 @@ public:
{
OpenSLSession::stop();
while (! guard.compareAndSetBool (1, 0))
Thread::sleep (1);
if (inputChannels > 0)
recorder->setState (false);
if (outputChannels > 0)
player->setState (false);
guard.set (0);
}
bool setAudioPreprocessingEnabled (bool shouldEnable) override


Loading…
Cancel
Save