Re: Reading packets from an audio file
Re: Reading packets from an audio file
- Subject: Re: Reading packets from an audio file
- From: William Stewart <email@hidden>
- Date: Tue, 17 Feb 2009 12:09:20 -0800
On Feb 17, 2009, at 3:51 AM, rethish wrote: What property are you using? We use the get number of packets property (kAudioFilePropertyAudioDataPacketCount) all the time and this is always correct
This isn't going to work for all foramts/file types - it should work ok if you are just dealing with linear pcm
No - this works for all formats.
You have to keep in mind that some formats are variable in size, and some formats have more than 1 audio sample frame in a packet
You can certainly make assumptions (and many people seem to be) that somehow things are completely different between compressed and uncompressed. Yes, it is true that they are different, however, it is also quite possible to write code that is completely resilient to dealing with both general forms of audio data - all of the tools we provide do just that.
The discussion I posted recently about looping compressed audio contains some fundamental points about this and about how the APIs that CoreAudio provides are explicitly written to be format agnostic. If you can get access to WWDC presentations as podcasts, the two sessions that Jeff Moore did (one in 2007 and again in 2008) goes through this topic in some detail.
Bill
|
_______________________________________________
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