The case of the missing AudioSourceChannelInfo constructor


#1

I’m shocked that this function does not already exist:

AudioSourceChannelInfo::AudioSourceChannelInfo (AudioSampleBuffer& otherBuffer)
{
  buffer = &otherBuffer;
  numSamples = otherBuffer.getNumSamples ();
  startSample = 0;
}

Finally, calling code can do away with the AudioSourceChannelInfo structure and work directly in AudioSampleBuffer (which is 99% of use cases).


#2

Thanks, good suggestion! I’m also not sure why it doesn’t exist!