Well, here is something to try out. I'll fix something more appropriate
(git-send-email, debdiff, etc) in the next few days, right now I'm a bit
to tired for the formalities. But I hope these three fixes should
improve the situation.

1) 
+       /* Prevent accidental overrun of the fake ringbuffer */
+       if (size >= pcm->buffer_attr.tlength) 
+               size = pcm->buffer_attr.tlength-1;

This cured a hang I could sometimes reproduce while recovering from an
xrun.

2)
+        writebytes = size * pcm->frame_size;
+       ret = pa_stream_write(pcm->stream, buf, writebytes, NULL, 0, 0);
+        pcm->last_size -= writebytes;

This updates the hw_ptr variable correctly, which fixed some continous
xruns for me as well as reduced CPU usage.

3)
+        /* Reset faked buffer */
+        pcm->last_size = 0;
+        pcm->ptr = 0;
+        update_ptr(pcm);

Before prepare is called the ioplug interface resets its pointers, so we
should do the same. No real difference in experience from this one, it
just seems reasonable.


** Attachment added: "Apply this patch to Lucid's alsa-plugin/pulse/pcm_pulse.c"
   http://launchpadlibrarian.net/37602904/pcm_pulse.patch

-- 
Applications routed through the pulse pcm alsa-plugin crackle/die quickly
https://bugs.launchpad.net/bugs/485488
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to