Dear List,
I used the "MatrixMixerTest" example to implement a mixer on iPhone OS 2.2. Everything is the same as in the example, instead of the following : - I use the kAudioUnitSubType_RemoteIO when setting up Audio Unit - I use kAudioUnitSubType_MultiChannelMixer instead of the kAudioUnitSubType_MatrixMixer, which does not exist on iPhone OS
The input and the output of my graph have two deinterleaved channel. I set the "client format" of my .wav file as "stereo interleaved" with the following function : clientFormat.SetCanonical(2, true); So I use only one buffer per stereo audio file.
My problem is that I am not receiving enough samples in my "call back" function for rendering input. Moreover, they are not organized as they supposed to be. Let me be more precise. As in the "MatrixMixerTest" example, I write
SynthData& d = *(SynthData*)inRefCon; float *in = d.bufs[inBusNumber].data;
in order to get access to the buffers (i.e. AudioBufferList) that I have filled in my "addfile'" function for loading.
Exactly, it seems that there is only the samples from the left channel in the "in" buffer. I load and play a sound with silence on the rigth channel and there is no alternance of zeros on the data. As if, the samples was de-interleaved...
Does anyone had the same problem (and a solution) ? I try to change many settings, but I'am stucked on this for a long time !! I really need help.
Thanks in advance,
Antoine |