Linux Wave Conversion Bug?

Has anybody experienced a problem in the audio conversion routines taking a
low frequency wav file (8000) and converting to a higher freqency (22050)?
This is only on the Linux version. Windows seems to be okay.

If I change my requested frequency down to 8000 everything is fine. At
higher frequencies, it seems as tho the conversion fails and the audio just
plays faster.

Can anybody confirm this?

SDL 1.2.1

thanks

-miles vignol

My mistake, it seems Windows does the same thing.

I’m the “buf” from the convert structure after a successful convert has run.
I can’t find anything I’m doing wrong, but it’s acting like there no
conversion going on. I’ve tried converting to lower freq’s and still no
luck.

Considering the complete lack of conversion, I’m guessing it’s something I’m
doing wrong or it would have come up before now. Any guesses?

-miles vignol

“miles vignol” <@Miles_Vignol> wrote in message
news:9hj31l$520$1 at ftp.lokigames.com

Has anybody experienced a problem in the audio conversion routines taking
a
low frequency wav file (8000) and converting to a higher freqency (22050)?
This is only on the Linux version. Windows seems to be okay.

If I change my requested frequency down to 8000 everything is fine. At
higher frequencies, it seems as tho the conversion fails and the audio
just> plays faster.

Can anybody confirm this?

SDL 1.2.1

thanks

-miles vignol

Considering the complete lack of conversion, I’m guessing it’s something I’m
doing wrong or it would have come up before now. Any guesses?

SDL only handles sample rate conversions in multiples of two
effectively; converting from 11025Hz to 22050Hz works great, but 8000Hz to
11025Hz is going to sound crappy.

The solution is to open the sound device at 8000Hz, and make sure all your
data is at that sample rate, or convert everything to a new sample rate
that is more standard on today’s hardware, or fix SDL_ConvertAudio().

I’ve heard most good sample rate conversion algorithms are patented. If
anyone has a good pointer for accomplishing this, let me know, 'cause I’m
interested in taking a stab, but have no idea what to do. :slight_smile:

–ryan.

thanks for the tip. I’ll look into a altering my sample rates. It’s not that it
sounds bad, it’s that it seems unconverted. Maybe that code has been disabled?
(the non-2 factored scale)

Oh well, I guess I’ll just go ahead and make everything 22050MHz.

-miles vignol

“Ryan C. Gordon” wrote:> > Considering the complete lack of conversion, I’m guessing it’s something I’m

doing wrong or it would have come up before now. Any guesses?

SDL only handles sample rate conversions in multiples of two
effectively; converting from 11025Hz to 22050Hz works great, but 8000Hz to
11025Hz is going to sound crappy.

The solution is to open the sound device at 8000Hz, and make sure all your
data is at that sample rate, or convert everything to a new sample rate
that is more standard on today’s hardware, or fix SDL_ConvertAudio().

I’ve heard most good sample rate conversion algorithms are patented. If
anyone has a good pointer for accomplishing this, let me know, 'cause I’m
interested in taking a stab, but have no idea what to do. :slight_smile:

–ryan.

I seem to remember reading a bug about the mixing being done in
multiples of 2, so that if you had an 8 KHz sample and asked it to be
mixed up to 22 KHz, it would actually be mixed at 16 KHz…???–

Olivier A. Dagenais - Software Architect and Developer

“miles vignol” wrote in message
news:9hj4l6$592$1 at ftp.lokigames.com

My mistake, it seems Windows does the same thing.

I’m the “buf” from the convert structure after a successful convert
has run.
I can’t find anything I’m doing wrong, but it’s acting like there no
conversion going on. I’ve tried converting to lower freq’s and
still no
luck.

Considering the complete lack of conversion, I’m guessing it’s
something I’m
doing wrong or it would have come up before now. Any guesses?

-miles vignol

“miles vignol” wrote in message
news:9hj31l$520$1 at ftp.lokigames.com

Has anybody experienced a problem in the audio conversion routines
taking
a

low frequency wav file (8000) and converting to a higher freqency
(22050)?

This is only on the Linux version. Windows seems to be okay.

If I change my requested frequency down to 8000 everything is
fine. At

higher frequencies, it seems as tho the conversion fails and the
audio
just

plays faster.

Can anybody confirm this?

SDL 1.2.1

thanks

-miles vignol