iphone - AudioQueue output channels -


i have problem audio stream (this lpcm stream 6 channels inside). when playing stream on iphone via audioqueue hear first 2 channels. here audioqueue initialization code:

- (id)initwithsamplerate:(int)asamplerate numchannels:(int)anumchannels {      self = [super init];        audiostreambasicdescription thedescription;      thedescription.mformatid = kaudioformatlinearpcm;      thedescription.msamplerate = asamplerate;      thedescription.mchannelsperframe = anumchannels;      thedescription.mbytesperpacket = 2 * anumchannels;      thedescription.mframesperpacket = 1;      thedescription.mbytesperframe = 2 * anumchannels;      thedescription.mbitsperchannel = 16;      thedescription.mformatflags = kaudioformatflagsnativeendian | kaudioformatflagissignedinteger;        audioqueuenewoutput(&thedescription, audioqueue_callback, self, cfrunloopgetcurrent(), kcfrunloopcommonmodes, 0, &audioqueue);      audioqueuestart(audioqueue, null);        return self; } 

do know how solve problem? should set output channels count 2, how?

you might need to, in own code, pre-mix 6 channels down 2 channels before feeding pcm audio stream audio queue api.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -