Re: iPhone, iOS 4 and decoding mp3 files
Re: iPhone, iOS 4 and decoding mp3 files
- Subject: Re: iPhone, iOS 4 and decoding mp3 files
- From: "Roni Music" <email@hidden>
- Date: Thu, 17 Jun 2010 20:59:29 +0200
Hi Rolf
Do you have the same problem if you use the SW or HW version of the
decoder?
I believe I use the HW decoder both on my older iPhone 3G / OS 3.1.1
and newer 3GS / iOS 4. I'm only playing one mp3 file at the time and using
kAudioSessionCategory_MediaPlayback.
AudioFormatGetPropertyInfo(kAudioFormatProperty_Decoders..) reports
kAppleHardwareAudioCodecManufacturer available for kAudioFormatMPEGLayer3.
Any MP3 file or just some?
Just some and very occasionally, it depends on what mp3 frame is the last
played
before looping.
And I know from my previous experience with mp3 decoders that the internal
state
needs to be reset when "jumping" abruptly to a completely new
frame/position.
Is AudioQueueFlush() supposed to do this?
The AudioQueue header file says:
"..After all queued buffers have been played, the function cleans up all
decoder state information. "
but I'm not quite sure what that really means?
What would be good to have is something like
AudioQueueResetDecoderWithoutFlush()
that one could call before AudioQueueEnqueueBuffer() to tell the decoder
that we
made a jump to a new position. Right now I'm flushing away the last few
frames that should really be included in the loop.
If you use AAC instead (running the same code) what is that like?
AAC files seems to work without any "blurps".
Rolf
Bill
On Jun 16, 2010, at 11:17 AM, Roni Music wrote:
----- Original Message ----- From: "Kyle Sluder" <email@hidden>
To: "Roni Music" <email@hidden>
Cc: <email@hidden>
Sent: Wednesday, June 16, 2010 8:01 PM
Subject: Re: iPhone, iOS 4 and decoding mp3 files
On Wed, Jun 16, 2010 at 10:21 AM, Roni Music <email@hidden> wrote:
With OS 3 I used to call AudioQueueFlush() when going back to the start
point to
avoid "blurps" in the audio. I assumed AudioQueueFlush() would reset the
mp3
decoder state but with iOS 4 I instead get a "blurp", if not calling
AudioQueueFlush() it sounds fine.
iOS 4 is still under NDA.
I forgot that.
Dunno what that means for this list, but you
might have better luck in the NDA-aware forums at
http://devforums.apple.com.
The knowledge about CoreAudio there is very limited,
I prefer this list.
I think my question relates to iPhone OS 3 as well so hope to get some
feedback.
Rolf
--Kyle Sluder
_______________________________________________
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
_______________________________________________
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