• 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: default output start & stop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default output start & stop


  • Subject: Re: default output start & stop
  • From: David Duncan <email@hidden>
  • Date: Sun, 5 Jan 2003 13:17:42 -0500

On Sunday, January 5, 2003, at 12:55 PM, papi wrote:

New to core audio -- still pretty green at C++.

The DefaultAudioOutput example project's TestDefaultAU() function has
some
code that starts and stops a simple sine wave render. Can someone
explain
in further detail what exactly is happening here? (I've copied the
snippet below.)


Starting the audio unit here...
verify_noerr(AudioOutputUnitStart(theOutputUnit));

Sleeping the current thread for 5 seconds (the audio is played on a separate thread) usleep() is a BSD call.
usleep (5 * 1000 * 1000); // sleep for 5 seconds

And stop the audio unit here...
verify_noerr(AudioOutputUnitStop(theOutputUnit));

That is literally all this code is doing. Now, the thread that is feeding the audio may only play 5 seconds worth of sound regardless, I have not looked at the source code for TestDefaultAU() so I don't know. But if your looking for more clues, it would be more useful to look at the render callback that is being installed on the output unit.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.

David Duncan
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: default output start & stop
      • From: papi <email@hidden>
References: 
 >default output start & stop (From: papi <email@hidden>)

  • Prev by Date: default output start & stop
  • Next by Date: Re: default output start & stop
  • Previous by thread: default output start & stop
  • Next by thread: Re: default output start & stop
  • Index(es):
    • Date
    • Thread