RemoteIO output unpredictably changes from stereo to mono (iOS 4.3.3)
RemoteIO output unpredictably changes from stereo to mono (iOS 4.3.3)
- Subject: RemoteIO output unpredictably changes from stereo to mono (iOS 4.3.3)
- From: Technoestupido <email@hidden>
- Date: Sun, 26 Jun 2011 01:40:45 +0200
Hi everyone
I've been following this most helpful mailing list for quite some time
but this is my first post. Here it goes:
I'm developing an iOS app that uses a Remote I/O unit that both
renders output buffers and processes input buffers from the
microphone. The audio part of the app has worked beautifully for a
couple of months both in the simulator and on my iPod touch (iOS 3.1).
Recently I put a build on an iPad 2 running iOS 4.3.3 and experienced
a confusing problem.
I have set up the output to be in stereo, but sometimes in my output
render callback, the target buffer in the AudioBufferList starts
having a mNumberChannels value of 1. The AudioBufferList passed to the
render callback the first time it is called always has mNumberChannels
== 2, but sometimes all subsequent buffers have a value of 1 (and half
the mDataByteSize value of the initial buffer). I have not been able
to establish a pattern as to when the value changes; I have tried to
run with lots of background apps and no background apps, rebooting the
iPad before running, running with the debugger attached and not
attached, interrupting the app etc.
When the problem occurs, the printout from the first call to the
render callback looks like this (as it should, imo).
Target buffer num channels=2, byte size 4096
Audio session info:
category 1886151026
number of in channels 1
number of out channels 2
Remote IO info:
Input bits/channel 16
Input bytes/frame 2
Input bytes/packet 2
Input channels/frame 1
Input format flags 12
Input format ID 1819304813
Input frames per packet 1
Input sample rate 44100.000000
Output bits/channel 16
Output bytes/frame 4
Output bytes/packet 4
Output channels/frame 2
Output format flags 12
Output format ID 1819304813
Output frames per packet 1
Output sample rate 44100.000000
For all subsequent calls, I get this. Note how the output unit all of
a sudden has one channel and the input unit has two.
Target buffer num channels=1, byte size 2048
Audio session info:
category 1886151026
number of in channels 1
number of out channels 2
Remote IO info:
Input bits/channel 16
Input bytes/frame 4
Input bytes/packet 4
Input channels/frame 2
Input format flags 12
Input format ID 1819304813
Input frames per packet 1
Input sample rate 44100.000000
Output bits/channel 16
Output bytes/frame 2
Output bytes/packet 2
Output channels/frame 1
Output format flags 12
Output format ID 1819304813
Output frames per packet 1
Output sample rate 44100.000000
What could cause this change in the number of channels for the input
and output? I am not manipulating the Remote I/O unit in code once it
has been set up and started. Like I mentioned above, the problem only
occurs occasionally (roughly 20% of the times).
Any help would be greatly appreciated. Let me know if you need any
code snippets to aid your detective work.
kind regards
Per
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden