Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
- Subject: Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
- From: Heinrich Fink <email@hidden>
- Date: Tue, 31 Jul 2012 22:06:52 +0200
hi kevin,
> This works well enough, but I've noticed that some tracks that play as
> gapless under the main iOS Music App, or even in Winamp do not come
> out gapless through this API. The decoded MP3s (from AVAssetReader)
> may have 500-2000 samples of silence at the beginning or end, so I'm
> curious about this as well.
I believe what you describe are the priming/remainder samples which are specific to some audio codecs. AAC, for example, could have something like 2112 priming sample and 134 remainder samples. I think there are similar numbers for the mp3 codec.
I have also recently build an audio scheduling system with an AUGraph that uses an AVAssetReader to access audio samples. I use an AVAssetReaderTrackOutput that is configured to return decoded non-interleaved float audio data. I ran into a problem that is similar to yours: When I read the AVURLAsset’s property “duration” (I have set ’AVURLAssetPreferPreciseDurationAndTimingKey’ set to ‘YES’): the returned property shows the full number of samples (priming samples + valid samples + remainder samples). However, I believe the correct number should be the ‘valid’ samples only as this is also the amount of samples returned by the AVAssetReaderTrackOutput. The ExtAudioFile API, for example, explicitly handles priming/remainder samples (checkout the property kExtAudioFileProperty_PacketTable described here http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html#//apple_ref/doc/c_ref/kExtAudioFileProperty_PacketTable)
I have filed a bug about the AVURLAsset.duration not returning the correct amount of actual decodable audio samples. Does anyone else have experience with AVFoundation and priming/remainder samples?
best regards,
Heinrich Fink
_______________________________________________
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