Re: Applying a low-pass cutoff inside an AU
Re: Applying a low-pass cutoff inside an AU
- Subject: Re: Applying a low-pass cutoff inside an AU
- From: Aran Mulholland <email@hidden>
- Date: Tue, 15 Sep 2009 09:58:01 +1000
i think this call :
p = (Float32)[djMixer.loopOne getNextPacket];
probably returns a 32 bit int, representing 2 16 bit samples (left and right) (and im pretty sure it does as i wrote that dodgy stuff :) )
what you need to do is split the int into two 16 bit values and filter each seperately. then rejoin it. a better way might be two use a converter or two, to move it from interleaved to non interleaved and back again.
this code will never be efficient anyway cause you are calling a method to get every sample. you should be doing a straight memcpy of the audio buffer, once per render call. if you want to apply effects you can use up your processing power fast. just a side note on this, if you are running out of steam increase the latency and get more samples each render call. (i think that sample code has really low latency, you probably dont need it quite as low)
then moving it to a float that is within an acceptable range, i would check the range of values that the filter accepts is
within the range you are giving it. (does the filter only want between -1.0 and +1.0)
enjoy.
aran
_______________________________________________
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