TAAE2: Utility functions
A couple of utility function would seem handy and don't seem available yet. Since I'm writing these for RMSAudio as well, perhaps it is useful to synchronize these. e.g. namingconvention and desired functionality, etc... I'm thinking of the following functions where frames are always considered to be non-interleaved float samples by definition.
void AudioBufferList_ClearBuffers
(AudioBufferList *bufferList, UInt32 frameCount);
void AudioBuffer_ClearFrames
(AudioBuffer *buffer, UInt32 frameCount);
void AudioBufferList_CopyBuffers
(const AudioBufferList *srcL, AudioBufferList *dstL, UInt32 frameCount);
void AudioBuffer_CopyFrames
(const AudioBuffer *srcB, AudioBuffer *dstB, UInt32 frameCount);
void AudioBufferList_SumBuffers
(const AudioBufferList *srcL, AudioBufferList *dstL, UInt32 frameCount);
void AudioBuffer_SumFrames
(const AudioBuffer *srcB, AudioBuffer *dstB, UInt32 frameCount);
void AudioBufferList_CopyBuffer(
const
AudioBufferList *srcL, UInt32 srcIndex,
AudioBufferList *dstL, UInt32 dstIndex, UInt32 frameCount);
void AudioBufferList_SumBuffer(
const
AudioBufferList *srcL, UInt32 srcIndex,
AudioBufferList *dstL, UInt32 dstIndex, UInt32 frameCount);
Comments
I've actually got these in place already, within AEAudioBufferListUtilities and AEDSP. I have the utilities deliberately separated between nuts-and-bolts ABL manipulation (allocation, copying, etc) and DSP processing, but I'm open to reinterpretation of the grouping.
I'd prefer to stick with the current naming conventions for the ABL utilities as it feels more consistent, and because they exist that way in TAAE1.
No, grouping is fine with me. I think the DSP indication is a good pointer that it involves float32 etc...
I still like to see a specific strategy regarding mDataByteSize, and again: why haven't you been using the functions just yet.
why haven't you been using the functions just yet strike that last remark. Didn't notice the github comment.