Re: Can anyone help me in Fade In...?
Re: Can anyone help me in Fade In...?
- Subject: Re: Can anyone help me in Fade In...?
- From: Alejandro <email@hidden>
- Date: Fri, 17 Jul 2009 16:13:11 +0200
If buffer is a vector of floats, I would write the method like this:
-
(void)applyFadeInEffectForBuffer:(float *)buffer ofLength:(int)length
{
for
(int i = 0; i < length; i ++) {
float
factor = (float) i / (float) length;
buffer[i]
*= factor;
}
}
Alejandro
|
_______________________________________________
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