• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS4.1, reading sample data while playing audio?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS4.1, reading sample data while playing audio?


  • Subject: Re: iOS4.1, reading sample data while playing audio?
  • From: Jason Staczek <email@hidden>
  • Date: Thu, 9 Sep 2010 19:35:52 -0700

Thanks, Pierre. That does help.

I have to say I have a hard time sorting out the audio APIs in iOS and Mac OS. There seem to be an ever growing number of ways to do the same thing and the documentation and examples are like a hedge maze. Is it just me, or do these layers of APIs make anyone else's head hurt?

Jason

On Thu, Sep 9, 2010 at 12:26 PM, infrequent <email@hidden> wrote:
The stoppage is because you're trying to access the same file via two
different approaches.  Since you have the sample data from
AVAssetReader, you could just play it with an audio unit (which
expects linear pcm anyway) or an audio queue.  In both cases you'll
need some sort of callback infrastructure in place to fill your audio
buffers with the data you're reading with AVAssetReader.  You
definitely can't get anything from MPMusicPlayerController, though.

hth,

Pierre

On Wed, Sep 8, 2010 at 8:20 PM, Jason Staczek <email@hidden> wrote:
> 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
>

 _______________________________________________
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

  • Follow-Ups:
    • Re: iOS4.1, reading sample data while playing audio?
      • From: tahome izwah <email@hidden>
References: 
 >iOS4.1, reading sample data while playing audio? (From: Jason Staczek <email@hidden>)
 >Re: iOS4.1, reading sample data while playing audio? (From: infrequent <email@hidden>)

  • Prev by Date: Re: iOS4.1, reading sample data while playing audio?
  • Next by Date: Re: iOS4.1, reading sample data while playing audio?
  • Previous by thread: Re: iOS4.1, reading sample data while playing audio?
  • Next by thread: Re: iOS4.1, reading sample data while playing audio?
  • Index(es):
    • Date
    • Thread