• 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: How to simply play/pause/stop audio?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to simply play/pause/stop audio?


  • Subject: Re: How to simply play/pause/stop audio?
  • From: "David M.Cotter" <email@hidden>
  • Date: Sun, 6 Mar 2005 14:00:15 -0800

What I've found is, to pause music, just keep playing, but hand off NULL samples, just fill your buffers with zeroes, instead of streaming in your real audio samples. when they unpause, just pick up where you left off.

to play from a point in the stream, you just start handing in samples from that point. if it's mp3, you'll get back errors until you hit a frame boundary, but it seems you can just ignore the errors since you expect them, the audio will start playing again as soon as you get to a frame chunk. sorry if my terminology is wrong. the "correct" thing to do is start from the point you want and parse ahead until you hit a frame boundary, then start feeding THAT to the decoder, but i found it to work anyway if i just ignore the errors until it starts working again.

On Mar 6, 2005, at 8:16 AM, jgresock wrote:

Hello all, I'm new on the audio developing scene, and I was just wondering if
there was any quick reference to simply playing, pausing, and stopping audio
with Core Audio. I've looked through the PlayAudioFileLite demo that Apple
released, and that showed me that you can play a file by using
AudioOutputUnitStart. I've also looked through the SampleEffectUnit example,
but couldn't really find anything to do with play controls. Another thing I'm
looking for is how to start playing at a certain point in the stream.


So if anyone knows of an existing tutorial/example/reference, could you point
me to it? Or just give me the names of some functions to look into?


Thanks,
Joe

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


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
References: 
 >How to simply play/pause/stop audio? (From: jgresock <email@hidden>)

  • Prev by Date: MyVolumeUnit example.. does not 'pan'
  • Next by Date: Newb: MultitapAU UI does not appear
  • Previous by thread: How to simply play/pause/stop audio?
  • Next by thread: AudioFileTypeAndFormatID
  • Index(es):
    • Date
    • Thread