Bug 417681 - Alsa game sound is choppy when running through pulseaudio
Summary: Alsa game sound is choppy when running through pulseaudio
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-10 06:12 UTC by Jonathan Dieter
Modified: 2008-06-14 00:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-14 00:13:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonathan Dieter 2007-12-10 06:12:10 UTC
Description of problem:
Any games which provide sound through alsa end up being choppy when run through
pulseaudio.  Using ppracer as an example, the sound is choppy no matter what
frequency I use, but if it's set to 8-bit (u8) rather than 16-bit (s16le) sound,
it's no longer choppy.  Note that paman shows that ppracer *is* coming through
pulseaudio, so I believe alsa-plugins-pulseaudio is installed correctly.

aplay /usr/share/sounds/shutdown1.wav works perfectly and any games using esd
(i.e. bzflag) work perfectly as well.

I am running pulseaudio as a system-wide daemon with high priority.

Version-Release number of selected component (if applicable):
pulseaudio-0.9.7-0.17.svn20071017.fc8

How reproducible:
Always

Steps to Reproduce:
1. Set up pulseaudio to run as system-wide daemon (with high priority)
2. Start ppracer (or nexuiz or any other game that uses alsa)
  
Actual results:
Choppy sound

Expected results:
Beautifully rendered music to enhance the experience of shooting my friend in
the back in Nexuiz. :)

Comment 1 Jonathan Dieter 2008-01-10 08:04:11 UTC
Rebuilt pulseaudio in devel for F8 today and problem still persists.  I've
straced  open files in both single-user and system-wide pulseaudio startups,
diffed them, and there don't seem to be any permissions differences (I
originally wondered whether pulseaudio was being blocked from accessing certain
/dev/snd files under the pulse user, but not under the regular user).

Pulseaudio still gives perfect sound under single-user, but choppy sound after a
few seconds of system-wide.

Comment 2 Jonathan Dieter 2008-01-10 08:08:20 UTC
Sorry, I've just realized that both ppracer and nexuiz are SDL programs and use
ESD rather than alsa to connect to pulseaudio.  Not sure if that will help in
diagnosing the problem.

Comment 3 Jonathan Dieter 2008-01-10 08:39:42 UTC
And looking back at the original bug report, that means that there's something
unusual about bzflag (maybe the fact that it has no music) that keeps me from
hitting the same problem with it.

Comment 4 Lennart Poettering 2008-06-14 00:13:08 UTC
We now have native PA support in SDL, the problem should be gone.

Also, I don't really support the system mode of PA. It's available only for very
specific purposes (thin clients...)


Note You need to log in before you can comment on or make changes to this bug.