path: root/stream/stream_radio.c
diff options
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-10-25 15:04:33 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-10-25 15:04:33 +0000
commit31d2ed32a693a3d5cbb13e720e3ae4030874abcf (patch)
tree0a4ab677e0ef9b4b930314cdfcc888773656b561 /stream/stream_radio.c
parentf7e755eb55a46094c772c2eae85590a8df6fb213 (diff)
Don't wait for filling entire audio ringbuffer at each call to grab_audio_frame.
Fixes 2 minutes delay before starting playback and audio clicks in sound (at least for my SAA7134 based card while capturing radio through saa7134-alsa module). git-svn-id: svn:// b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_radio.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_radio.c b/stream/stream_radio.c
index c848aa7d4e..a29407d5e1 100644
--- a/stream/stream_radio.c
+++ b/stream/stream_radio.c
@@ -793,7 +793,7 @@ static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len)
1000ms delay will happen only at first buffer filling. At next call function
just fills buffer until either buffer full or no data from driver available.
- for (i=0;i<1000 && priv->audio_cnt<priv->audio_buffer_size; i++){
+ for (i=0;i<1000 && !priv->audio_cnt; i++){
//read_chunk fills exact priv->blocksize bytes
if(read_chunk(&priv->audio_in, priv->audio_ringbuffer+priv->audio_tail) < 0){
//sleppeing only when waiting first block to fill empty buffer