What's new

pops crackles & lag...

play0r

New member
using both the source code & the binary for linux i suffer sound problems using both the mupen64 & jttl's sound plugins. during some parts of a game the audio is just fine, but others it lags & has nasty pops & crackles. an example of this is in super mario64, it seems to lag & crackle a bit during the press start menu, but not again until i'm in an actual level.
my other sdl applications & games, for instance zsnes & quake2, are not having these issues with pops, crackles, & lag, so something with my soundcard & or system configurations can be immeadately ruled out imo.
i've played around with low_buffer_load_level in jttl_audio.conf & it just goes from bad to worse.
is there a functional alsa plugin for mupen64 0.5 linux or some other alternative to the sdl plugins?

thanks in advance for any help or suggestions,
play0r
 

Darklegion

New member
I'm using JTTL too, and I have set it up so I only get the occasional skip and no crackling.I've only used it for Zelda OOT though, so I don't know how well these settings will work for other games:
PRIMARY_BUFFER_SIZE 1048576
LOW_BUFFER_LOAD_LEVEL 49152
HIGH_BUFFER_LOAD_LEVEL 1048576
SECONDARY_BUFFER_SIZE 512

Raising the PRIMARY/LOW/HIGH settings seems to fix crackly audio but causes more skipping.Setting SECONDARY to a lower value fixes the skipping.
These settings might cause extra latency in the audio but it works well enough for me.You might need to raise the SECONDARY to 1024 if 512 causes problems.
 

JttL

New member
Let me explain a bit. Buffer size is value in bytes used as primary buffer to store data from emulator until it is copied to secondary buffer to be played out.

Crackling is caused by incorrect high buffer level value. It should be much less than buffer size. If it's set to be equal to buffer size then audio chunks from emulator that can't fit to buffer are dropped. And as said that can be heard as crackling. Skipping is heard when secondary buffer ( that's sdl's own alsa buffer) runs out of data and plugin don't have anything to fill it up with. That's mostly caused by your too slow machine. Sometimes it helps to raise secondary buffer size.

Actually I think that you should try to set high buffer level very close to low buffer level. Setting it lower than low buffer level will probably cause something nasty and unexpected...

Actually I'm surprised that someone actually still uses my plug-in. It just got to be damn good ;).

And for play0r: SDL usually uses directly alsa but just wraps it to cross-platform library. So technically plug-in would build and work on windows or mac.
 

Surkow

Member
Let me explain a bit. Buffer size is value in bytes used as primary buffer to store data from emulator until it is copied to secondary buffer to be played out.

Crackling is caused by incorrect high buffer level value. It should be much less than buffer size. If it's set to be equal to buffer size then audio chunks from emulator that can't fit to buffer are dropped. And as said that can be heard as crackling. Skipping is heard when secondary buffer ( that's sdl's own alsa buffer) runs out of data and plugin don't have anything to fill it up with. That's mostly caused by your too slow machine. Sometimes it helps to raise secondary buffer size.

Actually I think that you should try to set high buffer level very close to low buffer level. Setting it lower than low buffer level will probably cause something nasty and unexpected...
Interesting explanation...I might try to fiddle with it as well.
Actually I'm surprised that someone actually still uses my plug-in. It just got to be damn good ;).
Still uses your plugin? Your plugin is the only plugin that works for me. The other plugin (not counting the dummy dll in the sound settings) called "Mupen64 audio plugin" does not produce any sounds at all. And there don't seem to be any other workable plugins available for Linux.
 

Top