You are not logged in.

#1 2005-06-12 07:57:32

LB06
Member
From: The Netherlands
Registered: 2003-10-29
Posts: 435

Sound through SDL distorted

Hello,

zsnes/supertux/tuxracer (SDL?) all give distorted sound. There are no problems with alsa/arts. OSS doesn't work at all (busy). I think this problem started with the latest alsa upgrade.

Also, I am now able to hear multiple streams at once (now also without arts).

Does anyone else also have problems with games/SDL? I have an Acer TravelMate 4501 with a i855GM chipset. (snd_intel8x0).

Offline

#2 2005-06-12 08:09:16

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Sound through SDL distorted

Have you tried "killall artsd" before running SDL games?

Offline

#3 2005-06-12 10:28:40

demonus
Member
Registered: 2005-01-31
Posts: 62

Re: Sound through SDL distorted

it's an issue with recent alsa-lib 1.0.9, and SDL is compiled with --disable-alsa, try recompiling with alsa and check what happens

Offline

#4 2007-02-09 13:51:26

Sekre
Member
From: The Rainy North
Registered: 2006-11-24
Posts: 116

Re: Sound through SDL distorted

Sorry for hijacking old thread,
I'm having the same (?) or at least a very similiar
problem right now.

Using znes 1.50-1 and sdl 1.2.11-1 and don't have arts
Anyone know what might cause these distortions?

Offline

#5 2007-02-09 16:55:09

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: Sound through SDL distorted

Sekre wrote:

Using znes 1.50-1 and sdl 1.2.11-1 and don't have arts
Anyone know what might cause these distortions?

The default sample rate in zsnes is quite low (32 kHz) and some sound cards have trouble with that. I would try setting the sample rate in zsnes to a value that matches the rate of your card (usually 44.1 kHz or 48 kHz).

Offline

#6 2007-02-09 18:30:20

e_tank
Member
Registered: 2006-12-21
Posts: 80

Re: Sound through SDL distorted

have you tried playing the SDL_AUDIODRIVER environment variable?
(you may not have these drivers enabled depending on how it was compiled, i don't know if stock arch sdl has alsa support but it's enabled in abs by default..)
try one of the following before starting an sdl app

export SDL_AUDIODRIVER=alsa
export SDL_AUDIODRIVER=dsp
export SDL_AUDIODRIVER=dma

Offline

#7 2007-02-10 08:18:07

Sekre
Member
From: The Rainy North
Registered: 2006-11-24
Posts: 116

Re: Sound through SDL distorted

okay, changed to 44.1 and set SDL_AUDIODRIVER=dma , and it worked almost perfectly big_smile

thank you guys. How can you live without your good ol' snes ? tongue

now just one more thing, would it be a good idea to set sdl_audiodriver to dma at boot time?
And then where should I best do it, rc.conf?

Offline

#8 2007-02-10 21:18:49

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: Sound through SDL distorted

Putting it in a user startup script should be fine. I have it in my ~/.xinitrc.

Offline

#9 2007-06-19 18:13:53

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: Sound through SDL distorted

Sorry for bumping again but i have this issue too.

Stuttering and distortion occurs at any sampling rate.
Changing SDL_AUDIODRIVER= Environment variable doesn't help.
When it is set to dsp or dma i have no sound at all.

Zsnes has the '-ad' switch to choose an audio driver, again no success.

Current sdl PKGBUILD from ABS compiles sdl with --alsa-enabled, so alsa should work.

Any idea how to fix this ?

Last edited by randomguy (2007-06-19 18:14:33)

Offline

#10 2008-01-24 21:52:24

Doc Angelo
Member
From: Germany
Registered: 2007-11-28
Posts: 52

Re: Sound through SDL distorted

For me it helped to edit the config file ~/.zsnes/zsnesl.cfg

In the sound section:

; libAO driver to use. Use zsnes --help to see valid list.
; However "auto" (to automatically pick best one), and "sdl" should
; always be available.
libAoDriver="auto"

change this to

libAoDriver="sdl"

EDIT:
...well, sound is still out of sync. sad

Last edited by Doc Angelo (2008-01-24 22:04:50)

Offline

Board footer

Powered by FluxBB