Skip to contentSkip to conversation

How to tweak dmix?

DISCUSSION Tom Watson 1 participant 1 message Mar 11, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Tom Watson

author
#1 lore raw
Quoted 25 lines · --- Pierre Ossman

Message: 2
Date: Thu, 10 Mar 2005 23:14:29 +0100
From: Pierre Ossman <[email protected]>

I've been looking for some guides on how you tweak the parameters in dmix to get what you want but I haven't found any. I can just find example after example without any explanation of the parameters.

The reason I want to tweak it is because the sound isn't "just right". I can either get a lot of stuttering, or very short samples fail to be played.

My current setting is:

period_time 84000
buffer_time 340000
period_size 4096
buffer_size 32768

This gives me pleasant sound as long as the samples are long enough. Short things newer survive long enough to reach the speakers.

If I remove *_size and set period_time to around half of buffer_time then I can get short samples to play. But longer samples start to stutter and the sound is awful.

Quoted 8 lines

I've been playing around with the values but since I don't really know what I'm changing I haven't been able to find a solution that works well. So I could really use some help here.

Rgds
Pierre

I, too have struggled with these parameters. The application I'm working with has no issues with latency (playback only), but stuttering IS a huge problem. While I'm not really using dmix (I call the '...writei' routine directly), a proper setting of these would be nice. What are the guidelines for these parameters, and what is their interaction? Obviously they DO something, or the would be fixed to some value. Do they matter if the number of channels varies?
The documentation isn't as clear as it could be.

Thanks.

p.s. In a couple of different applications (aplay among them), it seems that I get different "defaults" evn with the same (I try very hard here!) operating environment. Do they change with different versions of the alsa lib?

Thanks again.

Signature · 16 lines
Tom Watson
[email protected]


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click