iOS4.1, reading sample data while playing audio?
iOS4.1, reading sample data while playing audio?
- Subject: iOS4.1, reading sample data while playing audio?
- From: Jason Staczek <email@hidden>
- Date: Wed, 8 Sep 2010 12:20:36 -0700
Hi,
I'm trying to display a spectrum for an audio file during playback. I'm playing back using an MPMusicPlayerController. I'm reading using AVAssetReader. I'm able to read just fine as long as I'm not playing back. But if I start playback, then call back to calculate the spectrum on a timer reading audio at the current playback time, playback stops as soon as I try to read.
I guess there are two questions.
- Is there a better way to do this? Since I'm already playing, is there a way to get the sample data without re-reading?
- Should I be doing this on an NSTimer, or is there a better way to get called from the audio system periodically?
Thanks,
Jason
_______________________________________________
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