[polypaudio-commits] r759 - /trunk/src/modules/module-waveout.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Apr 19 04:55:47 PDT 2006
Author: ossman
Date: Wed Apr 19 13:55:46 2006
New Revision: 759
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=759&root=polypaudio&view=rev
Log:
WaveOut needs to have rather large chunks. This is about as low as we can
go without getting underflows.
Modified:
trunk/src/modules/module-waveout.c
Modified: trunk/src/modules/module-waveout.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-waveout.c?rev=759&root=polypaudio&r1=758&r2=759&view=diff
==============================================================================
--- trunk/src/modules/module-waveout.c (original)
+++ trunk/src/modules/module-waveout.c Wed Apr 19 13:55:46 2006
@@ -113,6 +113,9 @@
LeaveCriticalSection(&u->crit);
+ if (free_frags == u->fragments)
+ pa_log_debug(__FILE__": WaveOut underflow!");
+
while (free_frags) {
hdr = &u->ohdrs[u->cur_ohdr];
if (hdr->dwFlags & WHDR_PREPARED)
@@ -193,6 +196,9 @@
u->free_ifrags = 0;
LeaveCriticalSection(&u->crit);
+
+ if (free_frags == u->fragments)
+ pa_log_debug(__FILE__": WaveIn overflow!");
while (free_frags) {
hdr = &u->ihdrs[u->cur_ihdr];
@@ -443,8 +449,8 @@
goto fail;
}
- nfrags = 20;
- frag_size = 1024;
+ nfrags = 5;
+ frag_size = 8192;
if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) {
pa_log(__FILE__": failed to parse fragments arguments");
goto fail;
@@ -516,7 +522,7 @@
u->oremain = u->fragment_size;
- u->poll_timeout = pa_bytes_to_usec(u->fragments * u->fragment_size / 3, &ss);
+ u->poll_timeout = pa_bytes_to_usec(u->fragments * u->fragment_size / 10, &ss);
pa_gettimeofday(&tv);
pa_timeval_add(&tv, u->poll_timeout);
More information about the pulseaudio-commits
mailing list