• 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: Fwd: OpenAl Start/Stop crackle/pop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: OpenAl Start/Stop crackle/pop


  • Subject: Re: Fwd: OpenAl Start/Stop crackle/pop
  • From: "Stefan Alder" <email@hidden>
  • Date: Sat, 10 Jan 2009 14:13:29 -0800

Marc,
Thanks for your response.

I am indeed on the iPhone.  I'm only aware of alSourcePlay, alSourceStop, and alPause and I get the clicking on all of them.  If I manually ramp the volume up or down (by incrementing vol. from 1 to 0 and vice versa over 50ms or so with usleep in a loop) it seems to eliminate clicking at low switching speeds, but because my sound switching is controlled by user events, switching speed can be high, and in those cases the additional latency seems to be a problem.  It also seems that my volume ramp up/down can get out of sync with with operations occuring in OpenAl's thread -- does this make sense?

Are you suggeseting dropping OpenAl entirely and using the RemoteIO audio unit directly?  I guess I could do this, but am reluctant as I'm sure to end up duplicating a lot of what OpenAl already provides.
-s



On Thu, Jan 8, 2009 at 7:36 PM, Marc Vaillant <email@hidden> wrote:
Hi Stefan,

I'm copying the coreaudio list because I also saw your post there.

On Wed, Jan 07, 2009 at 10:01:25PM -0800, Stefan Alder wrote:
> Marc, I saw your post here:  http://opensource.creative.com/pipermail/
> openal-devel/2008-November/005315.html.
>
> Has this been resolved?  I'm getting clicking on start and stop.  Please let me
> know if you happen to have any ideas or if there's a patch out there that I can
> test.
>
> ---------- Forwarded message ----------
> From: Stefan Alder <email@hidden>
> Date: Wed, Jan 7, 2009 at 1:33 PM
> Subject: OpenAl Start/Stop crackle/pop
> To: email@hidden
>
>
> I'm using OpenAl to play a view different looping sounds.  On calling
> alSourceStop, a crackle/pop sound is frequently produced.  AlSourceStart then
> also produces a similar sound.
>
> 1) Stop crackle
> It seems that alSourceStop causes the sound to stop immediately, sometimes when
> the waveform amplitude is > 0, in turn causes the crackle.  I can understand
> this, but I'm wondering if anyone can recommend a way to minimize this, i.e.
> perhaps stopping the sound when the waveform passes through 0?
>
> 2) Start crackle
> Before calling alSourceStart, the buffers are unqueued from the source, which
> as far as I can understand should clear the soure queue.  But, it seems that
> some samples are left in the source's queue from the previous playback.  Is
> there anyway to clear these?
>
> Thanks!
>

I recall that those ramp functions are only called for some of the
on/off functions.  You might try ALSourcePause and ALSourcePlay and see
if it only happens on startup.  If you follow the simple change to the
source--in my post that you've referenced--it should fix the problem.
If you are on the iphone, then you are SOL because you can't compile the
source :)  I did submit a bug report to Apple on this issue.  More
detail here: http://openradar.appspot.com/6388390

The better thing to do--which is what I'm doing now--is to stream the
audio and simply ramp up and ramp down the audio yourself.  Look for a
recent AudioUnit example post of mine in the coreaudio mailing list.

Best,
Marc



 _______________________________________________
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: Fwd: OpenAl Start/Stop crackle/pop
      • From: Marc Vaillant <email@hidden>
References: 
 >OpenAl Start/Stop crackle/pop (From: "Stefan Alder" <email@hidden>)
 >Re: Fwd: OpenAl Start/Stop crackle/pop (From: Marc Vaillant <email@hidden>)

  • Prev by Date: Re: WMA on the iPhone
  • Next by Date: Re: Fwd: OpenAl Start/Stop crackle/pop
  • Previous by thread: Re: Fwd: OpenAl Start/Stop crackle/pop
  • Next by thread: Re: Fwd: OpenAl Start/Stop crackle/pop
  • Index(es):
    • Date
    • Thread