Advertisement

OpenAL sound quality

Started by August 06, 2004 04:43 PM
4 comments, last by romer 20 years, 3 months ago
Hi, This may have been discussed before but my searches didn't get any results. My problem is that OpenAL seems to reduce the sound quality of my sounds when I play them. Like they're mixed in 22khz or something instead of the 44 that the sounds are made in. I tried telling the ALC to use ALC_FREQUENCY 44100 when creating my context but that had no effect. The sounds still play very low quality. The buffers I play from are given the rate 44100. I checked. I compared to the quality in the OpenAL sample application in the creative SDK library and the same muddy sound appears there too. So this must be some kind of default setting I can't seem to override. If I play the same sounds in WinAMP they are crystalclear... Thanks for any suggestions, I feel like I've checked everything but I must have missed something obvious.
Does it sound really bad? Or only a little?

If so, make sure you didn't do what I did in FMOD, accidentally play the sound several times in row (my keypress logic was screwy).
Not giving is not stealing.
Advertisement
No it doesn't sound wrong, just not as clear as the source wave file. Compare a 64kbps mp3 and a 192 kpbs version of the same mp3. Gives about the same effect as this.

With the help of a nice person in another forum we've looked at the source and OpenAL actually resamples everything from 44khz to 22khz in the mixing output. Which would explain this. The question is, how do I change the frequency on the otuput buffer without recompiling OpenAL (And in doing so, prohibiting me from using it in a closed source game according to the LGPL license).
Quote: Original post by Lightstrike
No it doesn't sound wrong, just not as clear as the source wave file. Compare a 64kbps mp3 and a 192 kpbs version of the same mp3. Gives about the same effect as this.

With the help of a nice person in another forum we've looked at the source and OpenAL actually resamples everything from 44khz to 22khz in the mixing output. Which would explain this. The question is, how do I change the frequency on the otuput buffer without recompiling OpenAL (And in doing so, prohibiting me from using it in a closed source game according to the LGPL license).


IIRC you're not prohibited from using it in a closed source game, but you have to supply the modified version of the library (source). You have to do that anyway (supply source), so what's the biggie?
I don't remember seeing that I should supply the code if I didn't change.

Well, I'm coding directsound3d instead anyway.
With LGPL I think the only source you have to provide is the source for the library that's LGPLed. Everything else in your game can remain closed source.

This topic is closed to new replies.

Advertisement