1 (edited by joshsmith 2008-09-14 22:35:38)

Topic: Ubuntu intrepid crackly sound with padsp for pulseaudio support

Hey.

On ubuntu intrepid, the packaged repository version of teeworlds 0.4.2 detects and can use the OSS device /dev/dsp. If you run teeworlds as
padsp teeworlds
this forwards OSS sound through pulseaudio. Teeworlds can now play sound while another application is using pulseaudio. Checking pavucontrol shows that pulseaudio is properly managing the stream.
[The version downloaded directly from this site does not detect the OSS device]

However the sound is crackly. It sounds like each sound teeworlds makes is being played several times over the top of each other, with a few hundredths of a second delay. This creates a distorted echo type effect.

This can be fixed in ubuntu by change some pulse preferences, ie add the lines:
default-fragments = 8
default-fragment-size-msec = 5
to /etc/pulse/daemon.conf
as i noted here: http://www.pulseaudio.org/wiki/PerfectSetup#Teeworlds

Is it possible to fix teeworlds so that it can work with the default values in the pulseaudio config file (as it seems unlikely that ubuntu will make that change)

I should note that audacity, which also uses pulseaudio, does not have this echo effect when using OSS device and padsp. Therefore it does seem like it might be something in the scope of teeworlds to fix, and not an inherent problem in portaudio

Any suggestions of where the problem might be in the teeworlds source code, where i might try to play around to fix this?

Edit: sound stopped crackling with pulseaudio 0.9.12, default settings in ubuntu intrepid. although sometimes blocks sound completely