[openal] Audio quality and upsampling
chris.kcat at gmail.com
Sat Jul 2 00:50:17 EDT 2016
On 07/01/2016 12:37 AM, alberto box wrote:
> My implementation receive telephony quality audio streams from the network
> and uses OpenAL to merge and play them on the speakers. OpenAL audio input
> is 8KHz 16 bits.
> The final result on the speakers seems a bit distorted, a sort of metallic
> sound, thus I investigated further the problem using audacity to record the
> PC audio output (using Windows WASAPI loopback interface).
> It becames clear that the upsampling from 8KHz to the 44.1KHz (the rate
> requested by the final audio device) introduces distortion, because the
> added samples are computed as a linear interpolation between the adiacent
> original samples. Trying to upsamples the original audio using audacity
> produces a better audio and the samples are really smooth (it uses a
> different kind of interpolation).
> I guess the upsampling is internally performed by OpenAL (am I wrong?); I'm
> using a old version of the library (oalinst.exe properties shows version
> 184.108.40.206 / 2007).
Creative's software driver only does linear resampling, unfortunately.
OpenAL Soft defaults to linear, but has options for 4- or 8-point sinc
resampling, and also has a variable 12- to 24-point sinc with antialiasing.
Another option is to resample it manually, using a high quality
resampler to increase it to 44.1khz before giving it to OpenAL, then the
linear resampling noise will be less noticeable.
More information about the openal