From: James T. <ja...@ta...> - 2005-11-11 16:40:05
|
On Wednesday 02 November 2005 21:51, Johan De Groote wrote: JD> I can open it fine, load a file, make a selection etc. But if I hit playback I JD> get: JD> JD> ... JD> ########################################################## JD> audio_device_nonblocking_write_buffer_size: snd_pcm_avail_update JD> Broken pipe JD> audio_device_processed_bytes: snd_pcm_delay Broken pipe JD> ########################################################## JD> audio_device_nonblocking_write_buffer_size: snd_pcm_avail_update JD> Broken pipe JD> audio_device_processed_bytes: snd_pcm_delay Broken pipe JD> ... JD> JD> Once this message starts sound stops and so does the cursor. Until I stop JD> playback this message keeps coming in the terminal. The time to get this is JD> variable, but never longer than a few seconds (15 at most). Gwc doesn't JD> crash, and alsa continues as well. Hitting playback again will restart the JD> selection, until "it" happens again. JD> Hi, I'm back! I think I'm making some progress on this one (which seems to be a similar problem to one I was having a while back (April 04) [only then it wasn't possible to stop it]. snd_pcm_avail_update() returns -EPIPE if the output buffer has emptied, and the driver has tried to get some data. Because audio_device_nonblocking_write_buffer_size() bails out on any error, the buffer never gets filled so it goes into an infinite loop. I think that the answer is at least in part to modify audio_alsa.c, so that a "broken pipe error is effectively ignored (patch at the end) -- it could be rearranged to eliminate the message altogether but I was trying to see what influenced the problem. The other things that may help are to increase the buffer size (in audio_device.h) [BTW there is a redundant redefinition of MAXBUFSIZE in audio_util.c which ought to be removed.] and not popping windows or generally doing too much with X while playing back. James P.S. I've changed distro yet again -- Kubuntu now. ++ BEGIN PATCH ++ *** audio_alsa.c 2005-11-11 16:28:08.000000000 +0000 --- audio_alsa.c~ 2005-11-11 15:57:50.000000000 +0000 *************** *** 267,273 **** if (frames < 0) { perr("audio_device_nonblocking_write_buffer_size: snd_pcm_avail_update", frames); ! if (frames != -EPIPE ) return 0; } len = snd_pcm_frames_to_bytes(handle, frames); --- 267,273 ---- if (frames < 0) { perr("audio_device_nonblocking_write_buffer_size: snd_pcm_avail_update", frames); ! return 0; } len = snd_pcm_frames_to_bytes(handle, frames); ++END PATCH++ As far as I can tell -- James Tappin, O__ "I forget the punishment for using ja...@ta... -- \/` Microsoft --- Something lingering http://www.tappin.me.uk/ with data loss in it I fancy" |