[Openal-devel] Need help with clicking sound.
hkgi at hotmail.com
Mon Mar 9 14:30:58 PDT 2009
I have just started to use openal for sound synthesis and I guess that is what it is made for. I have made a simple program using two buffers, in which a sine wave is generated, in other words a single frequency sound. Now if I change the frequency I hear a clicking sound that is due to the fact when the second buffer is played, it starts playing the waveform from the beginning. I have tried using a single buffer and AL_LOOP function but of no vain. Please see the code below. Is there any way or function in openal that can remove this clicking sound. I have tried changing Sampling frequency but of no vain.
I am not sure whether it makes any sense or I am going in right direction but I need to remove this clicking sound in order to proceed with sound synthesis.
// Buffers hold sound data.
// Sources are points of emitting sound.
// Initialize OpenAL and clear the error bit.
//'NUM_BUFFERS' is number of buffers that will be generated.
//'Buffers' is pointer to an array of ALuint values that will store the names of new buufers.
double pi = 3.141592654;
double freq=1800; // frequency
double sfreq=2000; // sampling frequency
if (alGetError() != AL_NO_ERROR)
// Load wav data into buffers.
// Generate a source.
//Bind buffer to the source.
25GB of FREE Online Storage – Find out more
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openal-devel