We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1170 - SDL does not set minimum samples count to ALSA
Summary: SDL does not set minimum samples count to ALSA
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: 1.2.14
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 10:53 UTC by Paul Cercueil
Modified: 2011-08-23 13:53 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix the bug on my system (2.04 KB, text/plain)
2011-04-13 05:44 UTC, Paul Cercueil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Cercueil 2011-03-16 10:53:46 UTC
Using the ALSA backend is way slower on some systems than using the OSS backend with the AOSS wrapper.

This is probably caused by a too numerous number of interrupts, when the kernel transfers the sound to the hardware. I fixed that by setting the minimum number of samples required before a transfer to the actual number of samples.

Attached is a patch that fixes this bug on my system.
Comment 1 Ryan C. Gordon 2011-03-28 01:21:26 UTC
(In reply to comment #0)
> Attached is a patch that fixes this bug on my system.

The patch wasn't attached; I'd like to get this into revision control if you can attach it to this bug.

Thanks!

--ryan.
Comment 2 Jen Spradlin 2011-04-12 19:55:50 UTC
Thank you for your bug report!
We're busy working on getting SDL 1.3 ready for a high quality release, and want to make sure as many things are fixed there as possible.
Could you check to see if your bug is resolved by the latest SDL 1.3 snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 3 Paul Cercueil 2011-04-13 05:44:18 UTC
Created attachment 601 [details]
Patch to fix the bug on my system
Comment 4 Paul Cercueil 2011-04-13 05:47:31 UTC
Hi,

I don't know why it wasn't attached. Since then I had a SSD crash so I had to redo it.

I didn't try SDL 1.3 currently, I will test it soon to see if the bug has been fixed.

The diff file I attached shows how I fixed the bug on my system. I lack knowledge on both ALSA and SDL, I'm not sure I did it the right way. Feel free to modify it as needed.
Comment 5 Ryan C. Gordon 2011-08-23 13:53:24 UTC
This patch is now hg changeset 8b2b7f4009e5 for the 1.2 branch, and hg changeset  08e941dad8e9 for the 1.3 branch, thanks!

--ryan.