Hello Guest

Audio level is low when playing 8Khz sounds?!?

  • 0 Replies
Audio level is low when playing 8Khz sounds?!?
« on: March 26, 2008, 17:26:10 »
Hi all,

I'm trying to use the openAL implementation present in LWJGL in order to create a voip software.
I've already developed it using java sound implementation but have some issues with realtek HD cards (lots of jitter) so I'm trying the openAL way.
I'm recording audio using
Code: [Select]
ALC11.alcCaptureOpenDevice(null, FREQ, AL10.AL_FORMAT_MONO16, FREQ*10);
(N.B. the last FREQ is used so we have 10 sec buffer)

if I use a frequency of 44100, all is going well.If I use a freq of 8000, the audio is played back with very low volume level. Saving the recorded samples to a raw file and reproducing it with an audio player like goldwave seems to be ok, so the problem seems to be in the player part of openAL, not the recorder part.

In the player thread I'm using buffers queue system like this
Code: [Select]
AL10.alBufferData(buffer.get(0), AL10.AL_FORMAT_MONO16, data, FREQ);
AL10.alSourceQueueBuffers(sources.get(0), buffer);

Anyone can give me some hint on that? Can I force to open the device at 44100 so it will resample the audio data? Should I resample the data to 44100 before filling the buffers?

Any hint will be really appreciated

Best regards