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

Re: Noisy DefaultOutputUnit


  • Subject: Re: Noisy DefaultOutputUnit
  • From: Kurt Revis <email@hidden>
  • Date: Sat, 26 Jan 2008 22:02:05 -0800

On Jan 26, 2008, at 9:36 PM, Paul Scott wrote:

I'd like to be able to turn off the callback routine without sounding like I unplugged my guitar from the amp. Isn't there a clean way to do this?

Fade your samples down to zero, or make sure you've been playing zeroes, before you stop the output AU. Similarly, when starting the AU, fade your samples up from zero.


In general, a "click" comes from a sudden discontinuous jump in sample value. If you don't give the AU samples which are discontinuous, and don't tell it to stop or start with non-zero samples, you should be fine.

Let's imagine you have two buttons, one to start the audio and one to stop. Your code would look like this:
...


But doesn't this cause the clicks? I really don't want the user to have any clue as to when I attach or detach the audio unit.

That was just an example of how you'd start/stop the AU from a Cocoa app, without messing with the run loop. Nothing to do with clicks directly.


But definitely experiment! You probably won't break anything! (Until the first time you play full-scale noise with your speakers turned up all the way..)

--
Kurt Revis
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: 
 >Noisy DefaultOutputUnit (From: Paul Scott <email@hidden>)
 >Re: Noisy DefaultOutputUnit (From: Kurt Revis <email@hidden>)
 >Re: Noisy DefaultOutputUnit (From: Paul Scott <email@hidden>)

  • Prev by Date: Re: Noisy DefaultOutputUnit
  • Next by Date: Re: What is causing this deadlock?
  • Previous by thread: Re: Noisy DefaultOutputUnit
  • Next by thread: Re: Noisy DefaultOutputUnit -- Solved
  • Index(es):
    • Date
    • Thread