Skip to contentSkip to conversation

Emptying read buffer

DISCUSSION Philipp Vollmer 2 participants 2 messages Oct 4, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

I'm playing soundfiles in read/write fullduplex mode, but I have one problem:

When I'm playing this file, I'm not able to empty the buffer, because it needs too much CPU load. And after 2 or 3 seconds
the buffer is full and the app crashes. Is there a possibility to empty the buffer without any reading? Or is there any function to suspend the read handle, without closing it so that I can playback data?

Thanks for any answer

73 Phil

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw
Quoted 11 lines · Philipp Vollmer

Hello,

I'm playing soundfiles in read/write fullduplex mode, but I have one problem:

When I'm playing this file, I'm not able to empty the buffer, because it needs too much CPU load. And after 2 or 3 seconds
the buffer is full and the app crashes. Is there a possibility to empty the buffer without any reading? Or is there any function to suspend the read handle, without closing it so that I can playback data?

Simply set stop_threshold to UINT_MAX and start the capture stream.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf