iPhone - how to make sure AudioQueue will be able to decode a file?
iPhone - how to make sure AudioQueue will be able to decode a file?
- Subject: iPhone - how to make sure AudioQueue will be able to decode a file?
- From: Roni Music <email@hidden>
- Date: Thu, 15 Oct 2009 13:33:00 +0200
My iPhone audio player uses the AudioQueue to decode files for later
playback with kAudioUnitSubType_RemoteIO.
I check if a file is playable by checking if AudioFileOpenURL()
succeeds.
This assumptions seems wrong since even if that succeeds,
AudioQueueNewOutput() fails with a 'fmt?' error for the following file
format:
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000000B) 32-
bit big-endian float
It seems that I also need to check that file is not a 32-bit float file?
What more do I need to check to be sure it's OK?
I know the following
- iPhone OS input and output: Linear PCM with 16-bit integer samples
- iPhone OS audio units and other audio processing: Noninterleaved
linear PCM with 8.24-bit fixed-point samples
but that does not seem to answer my question.
I can of course check if AudioQueueNewOutput() succeeds but that seems
unnecessary "expensive" at a point when the app is not about to play
the file.
Rolf
_______________________________________________
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