• 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: AVAudioPlayer and fadeout problem only on iPad
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AVAudioPlayer and fadeout problem only on iPad


  • Subject: Re: AVAudioPlayer and fadeout problem only on iPad
  • From: Richard Dobson <email@hidden>
  • Date: Wed, 07 Apr 2010 09:00:24 +0100

The dsp aspect can be improved:

currently you are reducing volume additively (or rather, subtractively, by reducing linearly by 0.05 each step); fades are generally better using some degree of exponential decay, which means reducing multiplicatively, e.g. scaling by 0.95 each step (the number will determine the speed of the decay, must be < 1.0). The volume level of 0.05 may look small, but in audio terms is still only -26dB, so jumping from a level of 0.05 to zero will be heard as a hard cutoff; even on the iPhone/iPad. Even 0.005 is still only -46dB down, easily audible. 0.001 = -60dB = threshold of silence. If you want to fade over a stated duration, you just have to do the maths to find the required scale factor over N steps (or samples, if done per sample), i.e. just as you would do implementing an ADSR generator.

Richard Dobson

On 07/04/2010 05:28, uɐıʇəqɐz pnoqɥɒɯ wrote:
Any thoughts what might be a workaround?  Shall I switch from
AVAudioPlayer to RemoteIO or audioUnits? Unfortunately, the bug
reporting and fixing process takes lomnger than my customers will
wait, and I worry that I'll start getting negative reviews if I don't
get a fix out soon.

Basically, I need to play an arbitrary number of .caf files,
sometimes sequentially and sometimes simultaneously, and fade them
out when the user stops each.  While AVAudioPlayer has worked
admirably for me, until now, I probably should move to something
lower level and get both performance and flexibility out of it.
Question is, will other framework be plagued by the same mixing
problem?


_______________________________________________ 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: 
 >AVAudioPlayer and fadeout problem only on iPad (From: uɐıʇəqɐz pnoqɥɒɯ <email@hidden>)
 >Re: AVAudioPlayer and fadeout problem only on iPad (From: James McCartney <email@hidden>)
 >Re: AVAudioPlayer and fadeout problem only on iPad (From: uɐıʇəqɐz pnoqɥɒɯ <email@hidden>)

  • Prev by Date: Re: building for 64-bit Logic
  • Next by Date: auval failure after AU-SDK upgrade
  • Previous by thread: Re: AVAudioPlayer and fadeout problem only on iPad
  • Next by thread: Re: AVAudioPlayer and fadeout problem only on iPad
  • Index(es):
    • Date
    • Thread