Yet Another "My sound is crackly on Linux" topic

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Yet Another "My sound is crackly on Linux" topic

Post by AlucardZero »

Hi,

So my sound on Ubuntu Edgy (XFCE with gnome services running because I'm a noob and need a couple of the gnome applets) is crackly and staticy. After much searching, I have tried the following:

screwing around with all the sound settings (no improvement, and several crashes)
killing artsd (wasn't running) and esd (no change)
export SDL_AUDIODRIVER=alsa (no change)
installing libsdl1.2debian-oss (sound skips)
installing libsdl1.2debian-esd (sound is perfect.. but a second late)
installing the other libsdl1.2debian-* choices (no sound at all)
reinstalling libsdl1.2debian-alsa (no improvement)

Sound is perfect in Snes9x, but the port of it is so terrible I can't even change my keybindings.

Any other ideas?

Thanks for your time.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

It helps if you provide specs on your system. If your system is using OSS emulation or OSS emulation through ALSA, you will get lag regardless.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

It's a new(ish) laptop, 1.66GHz Core Duo, 512MB RAM, Intel graphics, Intel Corporation 82801G (ICH7 Family) HDA controller. I think I'm using ALSA, how do I check? (And as implied, ZSNES is the only place where sound is 'wrong'.)
adam0509
New Member
Posts: 7
Joined: Mon Dec 25, 2006 12:35 am

Post by adam0509 »

hello


same here with Gnome & 6.10.

It the same on 1.42 and 1.50


Ubuntu uses ALSA by default (OSS is to old, and I heard it will be removed to the linux kernel...).


I just think it's because of a lack of package...


EDIT :
The same with 6.06 + Xfce (Xubuntu)
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

Same with the new 1.5 version. But I think it's an SDL problem anyway.
xamenus
Veteran
Posts: 907
Joined: Fri Jul 30, 2004 12:26 am

Post by xamenus »

I began having a problem like this recently as well, under Xubuntu. Fortunately, deleting my config files fixed it. Are you sure you aren't reusing old configuration files?
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

It started when I first installed zsnes, and it continued when I installed 1.5 (I'm asusming my previous settings were lost since 1.5 told me I was running it for the first time). But I suppose I can try when I boot my laptop next.
janfsd
Rookie
Posts: 14
Joined: Fri Dec 22, 2006 10:05 pm

Post by janfsd »

AlucardZero, are you running perhaps Edgy 64 bit version?
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

Not that I know of. The processor is a Core Duo T2300, and I don't think I installed a version that specifically said 64-bit.
casualsax3
Veteran
Posts: 743
Joined: Tue Aug 10, 2004 4:38 pm

Post by casualsax3 »

I'm having the same issue. Compiled 1.5 fresh from source on a recent install of Edgy Eft. Framerate seems to be pretty solid. I'm running it on a Thinkpad T60
Centrino Duo 1.83Ghz
1GB Ram
fglrx, ATI Mobility x1300
Running 2.6.17-10-generic with SMP support

Just tried 1.42 from the repositories - same issue.
janfsd
Rookie
Posts: 14
Joined: Fri Dec 22, 2006 10:05 pm

Post by janfsd »

Well, i got a similar problem, but since I have Edgy 64 bit,i needed to install the 32 bit libraries, to make it work first, however I installed first libsdl1.2debian-all and I got sound issues. Then I just replaced that library with libsdl1.2debian-oss (v0.7.3) and now the sound is ok.
casualsax3
Veteran
Posts: 743
Joined: Tue Aug 10, 2004 4:38 pm

Post by casualsax3 »

I installed libsdl1.2debian-oss from the Ubuntu repositories and the sound seemed to work for a bit, but is now not playing at all.
janfsd
Rookie
Posts: 14
Joined: Fri Dec 22, 2006 10:05 pm

Post by janfsd »

Maybe now it's not working because that library got replaced by some other one while installing something else?
adam0509
New Member
Posts: 7
Joined: Mon Dec 25, 2006 12:35 am

Post by adam0509 »

don't tell me Zsnes still use that crappy OSS thing ??

Alsa roxxes soooo much !
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

adam0509 wrote:don't tell me Zsnes still use that crappy OSS thing ??

Alsa roxxes soooo much !
It has nothing to do with ZSNES exactly... moreso what your system uses with SDL. In any case, it is silly to make such a stupid statement.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
adam0509
New Member
Posts: 7
Joined: Mon Dec 25, 2006 12:35 am

Post by adam0509 »

It was in french doc :


"In order not to get crappy sound in zsnes you will need the SDL library with OSS (sorry ^^) → package "libsdl1.2debian-oss" with synaptic/apt-get. If needeed, kill ESD :


Code: Select all

$ sudo killall esd
You **may** need to go to "System>Preferences>Multimedia outputchooser (or sth like that) and choose OSS"


good game !
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

So what is this document and why are you using it to argue against a developer?
nonewmsgs

Post by nonewmsgs »

OSS sounds bad on my computer. the other ones sound good, but OSS is crackly and zsnes needs oss to sound good, does that mean im SOL?

soundcard: soundblaster live 24bit
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

nonewmsgs wrote:OSS sounds bad on my computer. the other ones sound good, but OSS is crackly and zsnes needs oss to sound good, does that mean im SOL?

soundcard: soundblaster live 24bit
It's not a requirement, but either you try out increasing the sound frequency or just simply use a decent sound card and/or compile ZSNES w/libao.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

So for the record..

I'm now running Debian Etch, with the 2.6.18 kernel. libsdl1.2debian-alsa is version 1.2.11-8. I tried the same things as before, with the same results: trying the different packages was the same, playing with the sound options didn't change anything and caused a couple crashes (though this time one of my save files managed to get corrupted.. thank god for backups).

Sound is still perfect in Snes9x.. I just wish I could change the god damn key bindings.

I was trying with ZSNES 1.4.2 (1.5 isn't even in the unstable repository yet) .. think it would be worth trying with 1.5?

Oh, and here's what snes9x says about the sound: "Rate: 22050, Buffer size: 2048, 16-bit: yes, Stereo: yes, Encoded: no." In the zsnes options I did try a sampling rate of 22050 Hz, stero sound is enabled, and so is sound buffering.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

If you are using a frequency lower than 32KHz (32000Hz), you are rendering audio slower than the original SNES. The problem is that many sound cards (more likely on onboard sound cards) do not handle that frequency natively. Most sound cards handle 44KHz or 48KHz (48KHz makes the audio run 50% faster than normal).

You should be using 1.50 or 1.51, I don't see why you are clinging to 1.42 for the SDL port (especially when it has become unstable for that port for the most part). Ideally you want to use libao if you use 1.51 anyways.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

adam0509 wrote:It was in french doc :


"In order not to get crappy sound in zsnes you will need the SDL library with OSS (sorry ^^) → package "libsdl1.2debian-oss" with synaptic/apt-get. If needeed, kill ESD :


Code: Select all

$ sudo killall esd
You **may** need to go to "System>Preferences>Multimedia outputchooser (or sth like that) and choose OSS"


good game !
Metatron wrote:So what is this document and why are you using it to argue against a developer?
There was never a french document released with ZSNES. Most likely, it was probably part of some ROMs package that was distributed by torrents or something like that. Referencing files that was not written by the developers is no less than retarded. Good game, you lose. All official stuff comes from zsnes.com. Anywhere else is not guarenteed to have distributed by us.


Addendum: If you compile ZSNES from source, make sure to pass --enable-release to autogen.sh so that ZSNES compiles with sound optimizations so that it should not lag as much.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

I've stuck with 1.42 so far because that's the latest version in the Debian repositories, but I'll get 1.51 from this site and try it (I didn't even know 1.51 was out.. oops). What's libao?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

AlucardZero wrote:I've stuck with 1.42 so far because that's the latest version in the Debian repositories, but I'll get 1.51 from this site and try it (I didn't even know 1.51 was out.. oops). What's libao?
It is to allow the use of ALSA, OSS, etc while running the same sound code.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

HOORAY! MY SOUND! IT WORKS!


So the essences of the solution was to (read the documentation, especially README.LINUX, history.txt, and install.txt, then):
- Make sure all the development files for all the pieces ZSNES 1.51 needs are installed. This is by no means an exhaustive list but on my Debian I had to install at the least: libpng12-dev libao-dev automake autoconf nasm libsdl-dev libao-dev zlib1g-dev -- and everything they depended on. I also took the Recommended packages and most of the Suggested ones too.
- In the src dir, ./autogen.sh --enable-release --enable-libao. I neglected the --enable-libao at first, should have read more of the documentation.

Thanks a lot, Deathlike2 :)
Post Reply