Re: AVAudioPlayer and fadeout problem only on iPad
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