mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Added an assertion to catch unusual audio buffer behaviour on iOS.
This commit is contained in:
parent
7afa650942
commit
ee565c32c8
1 changed files with 6 additions and 3 deletions
|
|
@ -120,7 +120,7 @@ public:
|
|||
AudioSessionSetProperty (kAudioSessionProperty_PreferredHardwareIOBufferDuration, sizeof (bufferDuration), &bufferDuration);
|
||||
actualBufferSize = preferredBufferSize;
|
||||
|
||||
prepareFloatBuffers();
|
||||
prepareFloatBuffers (actualBufferSize);
|
||||
|
||||
isRunning = true;
|
||||
routingChanged (nullptr); // creates and starts the AU
|
||||
|
|
@ -209,11 +209,11 @@ private:
|
|||
float* outputChannels[3];
|
||||
bool monoInputChannelNumber, monoOutputChannelNumber;
|
||||
|
||||
void prepareFloatBuffers()
|
||||
void prepareFloatBuffers (int bufferSize)
|
||||
{
|
||||
if (numInputChannels + numOutputChannels > 0)
|
||||
{
|
||||
floatData.setSize (numInputChannels + numOutputChannels, actualBufferSize);
|
||||
floatData.setSize (numInputChannels + numOutputChannels, bufferSize);
|
||||
zeromem (inputChannels, sizeof (inputChannels));
|
||||
zeromem (outputChannels, sizeof (outputChannels));
|
||||
|
||||
|
|
@ -238,6 +238,9 @@ private:
|
|||
|
||||
if (callback != nullptr)
|
||||
{
|
||||
// This shouldn't ever get triggered, but please let me know if it does!
|
||||
jassert (numFrames <= floatData.getNumSamples());
|
||||
|
||||
if (audioInputIsAvailable && numInputChannels > 0)
|
||||
{
|
||||
short* shortData = (short*) data->mBuffers[0].mData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue