Hi,
I appear to have uncovered what might be a rather serious bug in the
recording process on an iPod touch 2G running iOS4. In broad terms,
we've created an app that lets the user sing over backing tracks and
record the results. It's based on Audio Units and the recorded file
is saved via ExtAudioFileWriteAsync in the recording callback itself.
As long as we use the app's internal backing tracks (all LPCM caf
files), all is well and the app works as expected. However, we also
want to allow the user to sing over tracks on their iPod.
To this end, I set the Audio Session to
kAudioSessionCategory_PlayAndRecord and then also set
kAudioSessionProperty_OverrideCategoryMixWithOthers to true. The
results of this are ultimately disastrous: the audio degrades into a
high pitched whine before cutting out altogether. Weirdly enough,
this is not the first time I've had this problem. On 24 June 2010,
there was an exchange on this list initiated by Zachary Kulis
regarding a very similar problem, although proceeding from an entirely
different perspective: he was experiencing the problem with the
AudioQueueOfflineRender function to decode mp3s, but his description
is exactly the same as what is happening here:
On Thu, Jun 24, 2010 at 9:27 PM, Zachary Kulis <email@hidden> wrote:
However, strange things start to happen after about 5-10 seconds into
the audio stream; the sound quality deteriorates and random
crackling/static is present in the decoded PCM data. As time progresses,
the audio quality continues to deteriorate, until finally a loud
squealing sound develops (almost like feedback), and the decoded audio
is completely obscured.
I also experienced this problem and my feeling at the time was that it
must somehow be related to thread contention on the older device
(since I didn't experience the problem on an iPhone 4). When this
error first arose, I came to the initial conclusion that I must have
inadvertently triggered a similar states of affairs by calling
ExtAudioFileWriteAsync. However, as part of a sanity check, I made a
few small changes to Apple's AddMusic sample code (switched the
session to Play_And_Record and added
kAudioSessionProperty_OverrideCategoryMixWithOthers) and I can
reproduce the problem there. It often works fine for quite a while,
but sooner or later, the error arises. As you can imagine, this is
has seriously bedevilled my testing because I would make changes and
the problem would seem to go away. I would think I've fixed it only
to return some time later after I had made further changes. Anyway,
the problem hasn't occured on a different 2G iPod touch running iOS
3.1.2 or on an iPhone 4.
I've submitted a bug report with the amended project file under 8312235.
I guess this is a heads up more than anything. Oh, and BTW, if anyone
from Smule is reading this list: this definitely affects the I Am
T-Pain app.
regards
Pierre
_______________________________________________
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