Blob Blame Raw
--- alsa-plugins-1.0.14/pulse/pcm_pulse.c	2007-05-31 10:06:51.000000000 +0200
+++ alsa-plugins-1.0.14.lennart/pulse/pcm_pulse.c	2007-09-24 01:43:01.000000000 +0200
@@ -57,7 +57,7 @@
 
     if (size > pcm->last_size) {
         pcm->ptr += size - pcm->last_size;
-        pcm->ptr %= pcm->buffer_attr.maxlength;
+        pcm->ptr %= pcm->buffer_attr.tlength;
     }
 
     pcm->last_size = size;
@@ -533,9 +533,9 @@
     pcm->ss.rate = io->rate;
     pcm->ss.channels = io->channels;
 
-    pcm->buffer_attr.maxlength = io->buffer_size * pcm->frame_size;
+    pcm->buffer_attr.maxlength = (io->buffer_size*3)/2 * pcm->frame_size;
     pcm->buffer_attr.tlength = io->buffer_size * pcm->frame_size;
-    pcm->buffer_attr.prebuf = io->period_size * pcm->frame_size;
+    pcm->buffer_attr.prebuf = (io->buffer_size-io->period_size) * pcm->frame_size;
     pcm->buffer_attr.minreq = io->period_size * pcm->frame_size;
     pcm->buffer_attr.fragsize = io->period_size * pcm->frame_size;