RE#2 [SDL_mixer] artificial background noices

well:
I am using win98se ( no choice here ), and SDL_mixer_1.2.12
and devcpp 4.9.9.2 ( perhaps I should try vc 6.0? )

I tested your advices ( along with few of additinal test that came in my mind )

and:

  • setting higher sample rates didn’t work :frowning:
    it looks like only valid sample rates are 22.05kHz or 44.1kHz
    all other values are not resampled at all
    ( so they plays faster/slower depending on sample rate )

  • SDL_getenv() returns: ‘null’, ( I didn’t touch them )

  • SDL_AudioDriverName() returns: ‘dsound’ ( docs says, it is default for win )

funny thing is: that the other project I created
under the same win98 system, using exactly the same .dll
( and devcpp, I build it all functionality into one .dll )
and … it works perfectly fine in win98!!

I NEVER! had any problems with SDL_mixer and sound under linux ( ALSA )
( and I was using it a lot in the past )
but just for sake … comparision test
I recompiled my lib.so for linux and … it works perfectly

additionally I tested the same ‘faulty’ program with the same .dll
under winxp and … again it works perfectly!

what do you mean by:
'This could be the wrong line of debugging though.'
well … I tested it, just turned on all optimizations
( as they are allowed in devcpp )
and again … shit happens :slight_smile:

it must be something win98 specific ( connected to .dll, perhaps? )

anyway, thanks for your advices
adam szwajnoch

Just a shot in the dark but perhaps you would get better quality by mixing to
a higher rate like 96000Hz rather than 44100Hz, some sound drivers will
resample your 44100Hz stream to 48000Hz rather
than to a higher rate, and this degrades the sound quality noticeably, but
explicitly mixing to a higher rate can resolve the artifacts.

What SDL_AUDIODRIVER is being used? Default or something specific?

What operating system?

You might get better quality by using a different SDL_AUDIODRIVER (for example
on some Linux systems pulse is preferred).

This could be the wrong line of debugging though.On 04/07/2012 04:51 PM, @Stanislaw_Morgun wrote:

hi again

music playback sounds noisy
for every type I checked ( .mod, .xm, .ogg, .mp3, .mid )
even if I set CD quality parameters

first I thought that was getting 8 bit format set, or 11KHz freq
so I checked with Mix_QuerySpec();
and I got:
44,1KHz freq ( as requested )
AUDIO_S16SYS ( as requested )
2 channels ( as requested )

next I thought that I was using some down sampled music
( those artificial background noices sounds like it was the case )
but no, I play tested everyone of them using other players
and everything sounds fine

so does enybody know why music is so noisy?
any suggestions?

adam szwajnoch


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

I don’t think anyone can support 98se any more. It’s just too hard to look
that far back. Even windows 2k is too far back. If you need to then go to a
small company that repairs computers and ask them for an old reject
computer. People ask us to take their old slow computers with us pretty
regularly. They have no value even for parts most of the time and we don’t
sell them but we give them away when we get asked for a machine for like an
old lady to use email or a kid to do schoolwork. Some are greedy and sell
them for scap so u may need to offer them 20 bucks and promise you won’t
ever ask them to fix it :slight_smile: If you do stick to your guns and put enough
hours into it you may still make it work right. I’m just sayingOn Sun, Apr 15, 2012 at 6:26 PM, wrote:

well:
I am using win98se ( no choice here ), and SDL_mixer_1.2.12
and devcpp 4.9.9.2 ( perhaps I should try vc 6.0? )

I tested your advices ( along with few of additinal test that came in my
mind )

and:

  • setting higher sample rates didn’t work :frowning:
    it looks like only valid sample rates are 22.05kHz or 44.1kHz
    all other values are not resampled at all
    ( so they plays faster/slower depending on sample rate )

  • SDL_getenv() returns: ‘null’, ( I didn’t touch them )

  • SDL_AudioDriverName() returns: ‘dsound’ ( docs says, it is default for
    win )

funny thing is: that the other project I created
under the same win98 system, using exactly the same .dll
( and devcpp, I build it all functionality into one .dll )
and … it works perfectly fine in win98!!

I NEVER! had any problems with SDL_mixer and sound under linux ( ALSA )
( and I was using it a lot in the past )
but just for sake … comparision test
I recompiled my lib.so for linux and … it works perfectly

additionally I tested the same ‘faulty’ program with the same .dll
under winxp and … again it works perfectly!

what do you mean by:
'This could be the wrong line of debugging though.'
well … I tested it, just turned on all optimizations
( as they are allowed in devcpp )
and again … shit happens :slight_smile:

it must be something win98 specific ( connected to .dll, perhaps? )

anyway, thanks for your advices
adam szwajnoch

Just a shot in the dark but perhaps you would get better quality by mixing
to
a higher rate like 96000Hz rather than 44100Hz, some sound drivers will
resample your 44100Hz stream to 48000Hz rather
than to a higher rate, and this degrades the sound quality noticeably, but
explicitly mixing to a higher rate can resolve the artifacts.

What SDL_AUDIODRIVER is being used? Default or something specific?

What operating system?

You might get better quality by using a different SDL_AUDIODRIVER (for
example
on some Linux systems pulse is preferred).

This could be the wrong line of debugging though.

On 04/07/2012 04:51 PM, apator10 at wp.pl wrote:

hi again

music playback sounds noisy
for every type I checked ( .mod, .xm, .ogg, .mp3, .mid )
even if I set CD quality parameters

first I thought that was getting 8 bit format set, or 11KHz freq
so I checked with Mix_QuerySpec();
and I got:
44,1KHz freq ( as requested )
AUDIO_S16SYS ( as requested )
2 channels ( as requested )

next I thought that I was using some down sampled music
( those artificial background noices sounds like it was the case )
but no, I play tested everyone of them using other players
and everything sounds fine

so does enybody know why music is so noisy?
any suggestions?

adam szwajnoch


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