• 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: stopping sound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stopping sound


  • Subject: Re: stopping sound
  • From: William Bates <email@hidden>
  • Date: Fri, 4 Apr 2008 11:41:12 -0500

That CFRun loop call is pretty unusual and mainly an artifact of the demo program being a single, interface-less command-line main. Without the delay, the sound would cut off when the main exited.
Usually you run start and stop a sound from your main program loop, which has a window with buttons, etc.
To run a sound 2 seconds, a simple way is to: create a structure (call the pointer to it _p_) that holds the necessary audio variables; start the sound; and then set an EventTimerLoop to fire in two seconds and pass p as the userData paramenter to the event fire proc, when can then turn off the sound using the p->whatever paremeters. There are other ways but that's simplest, I think.
_______________________________________________
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: 
 >stopping sound (From: Roland Silver <email@hidden>)

  • Prev by Date: Re: Meta Parameters
  • Next by Date: button clicking suppressed
  • Previous by thread: stopping sound
  • Next by thread: Re: stopping sound
  • Index(es):
    • Date
    • Thread