Update of /cvsroot/alsa/alsa-utils/aplay
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12386

Modified Files:
        aplay.c 
Log Message:
fix default buffer time setting when maximum buffer time is less than 250 ms

Index: aplay.c
===================================================================
RCS file: /cvsroot/alsa/alsa-utils/aplay/aplay.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- aplay.c     27 Apr 2004 13:38:59 -0000      1.179
+++ aplay.c     3 May 2004 10:03:57 -0000       1.180
@@ -852,8 +852,13 @@
                }
        }
        rate = hwparams.rate;
-       if (buffer_time == 0 && buffer_frames == 0)
-               buffer_time = 500000;
+       if (buffer_time == 0 && buffer_frames == 0) {
+               err = snd_pcm_hw_params_get_buffer_time_max(params,
+                                                           &buffer_time, 0);
+               assert(err >= 0);
+               if (buffer_time > 500000)
+                       buffer_time = 500000;
+       }
        if (period_time == 0 && period_frames == 0) {
                if (buffer_time > 0)
                        period_time = buffer_time / 4;



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to