SDL Sound convert bug

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.

It seem like that SDL_RateSLOW can convert it but some times it crash.

Best Regards

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.

It seem like that SDL_RateSLOW can convert it but some times it crash.

Have you considered libsamplerate?

-CrystalOn Sun, 22 Mar 2009, Vardar Sahin wrote:

I never heared about that. I will take a look in to it.
Maybe it should be added to SDL for better resampling.

2009/3/22 Crystal Jacobs > On Sun, 22 Mar 2009, Vardar Sahin wrote:

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are
getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.

It seem like that SDL_RateSLOW can convert it but some times it crash.

Have you considered libsamplerate?

-Crystal


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I never heared about that. I will take a look in to it.
Maybe it should be added to SDL for better resampling.

libsamplerate is under the GPL, with a commercial license available.
You can use it with SDL just fine, but the license prevents it from
being incorporated into SDL AFAIK.

-CrystalOn Sun, 22 Mar 2009, Vardar Sahin wrote:

see SDL bugzilla #477

also, each audio backend has to “do the right thing” or conversions
won’t work.

and then there are some SDL using applications that effectively
disable conversions by passing a non-NULL second arg to SDL_OpenAudio
but then don’t do “the right thing” with the returned specs. like
ffplay from ffmpeg, for example.

btw, conversions seem to be completely broken in SDL-1.3, but I’ve only
done minor testing.On Sun, Mar 22, 2009 at 09:26:11PM +0100, Vardar Sahin wrote:

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.


@Jacob_Meuser
SDF Public Access UNIX System - http://sdf.lonestar.org

I found another lib which does the same but is under the GNU
LGPLhttp://www.gnu.org/copyleft/lesser.html

Its called libresample.
http://www.audacityteam.org/wiki/index.php?title=Libresample

Maybe SDL can use it?

2009/3/22 Jacob Meuser > On Sun, Mar 22, 2009 at 09:26:11PM +0100, Vardar Sahin wrote:

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are
getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.

see SDL bugzilla #477

also, each audio backend has to “do the right thing” or conversions
won’t work.

and then there are some SDL using applications that effectively
disable conversions by passing a non-NULL second arg to SDL_OpenAudio
but then don’t do “the right thing” with the returned specs. like
ffplay from ffmpeg, for example.

btw, conversions seem to be completely broken in SDL-1.3, but I’ve only
done minor testing.


jakemsr at sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I found another lib which does the same but is under the GNU
LGPLhttp://www.gnu.org/copyleft/lesser.html

Its called libresample.
http://www.audacityteam.org/wiki/index.php?title=Libresample

Maybe SDL can use it?

SDL does more than resampling. it does sample format conversions and it
does mono<->stereo conversions. I don’t think the actual conversions
are the problem, rather the handling of data expansion/contraction.

for example, in bugzilla #477, patch is needed because SDL is using
the wrong buffer size. the size is wrong, because it’s using the size
of the incoming buffer instead of the size of the buffer being written
to. different resampling code isn’t likely to fix that.On Sun, Mar 22, 2009 at 09:53:23PM +0100, Vardar Sahin wrote:

2009/3/22 Jacob Meuser <@Jacob_Meuser>

On Sun, Mar 22, 2009 at 09:26:11PM +0100, Vardar Sahin wrote:

Hi guys,

i notice a long time SDL Sound convert bug. Some time wav files are
getting
realy high pitched.
I know that SDL has its problems with non power of 2 sampled wav files.
Sadly i have no knowledge sample rate conversion.
Can some of you fix this bug please.

see SDL bugzilla #477

also, each audio backend has to “do the right thing” or conversions
won’t work.

and then there are some SDL using applications that effectively
disable conversions by passing a non-NULL second arg to SDL_OpenAudio
but then don’t do “the right thing” with the returned specs. like
ffplay from ffmpeg, for example.

btw, conversions seem to be completely broken in SDL-1.3, but I’ve only
done minor testing.


@Jacob_Meuser
SDF Public Access UNIX System - http://sdf.lonestar.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


@Jacob_Meuser
SDF Public Access UNIX System - http://sdf.lonestar.org