Browse Source

Third time lucky: hopefully fixed a white-noise issue when pulling from invalid inputs in AU wrapper

tags/2021-05-28
hogliux 9 years ago
parent
commit
4f06ff9257
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm

+ 8
- 3
modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm View File

@@ -1525,11 +1525,16 @@ private:
{ {
err = input->PullInput (flags, timestamp, i, nFrames); err = input->PullInput (flags, timestamp, i, nFrames);
if ((flags & kAudioUnitRenderAction_OutputIsSilence) != 0 || err != noErr)
if (err != noErr)
{ {
input->PrepareBuffer (nFrames);
AudioUnitHelpers::clearAudioBuffer (input->GetBufferList());
if (input->WillAllocateBuffer())
input->PrepareBuffer (nFrames);
else
input->PrepareNullBuffer (nFrames);
} }
if ((flags & kAudioUnitRenderAction_OutputIsSilence) != 0 || err != noErr)
AudioUnitHelpers::clearAudioBuffer (input->GetBufferList());
} }
} }
} }


Loading…
Cancel
Save