Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23205

Modified Files:
        pcm_lib.c 
Log Message:
Fix in playback_silence routine - don't silence whole buffer at start if samples are 
filled

Index: pcm_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm_lib.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- pcm_lib.c   2 Mar 2004 15:32:35 -0000       1.48
+++ pcm_lib.c   6 Mar 2004 10:02:48 -0000       1.49
@@ -67,8 +67,11 @@
                        frames = runtime->silence_size;
        } else {
                if (new_hw_ptr == ULONG_MAX) {  /* initialization */
-                       runtime->silence_filled = 0;
-                       runtime->silence_start = runtime->control->appl_ptr;
+                       snd_pcm_sframes_t avail = snd_pcm_playback_hw_avail(runtime);
+                       runtime->silence_filled = avail > 0 ? avail : 0;
+                       runtime->silence_start = (runtime->status->hw_ptr +
+                                                 runtime->silence_filled) %
+                                                runtime->boundary;
                } else {
                        ofs = runtime->status->hw_ptr;
                        frames = new_hw_ptr - ofs;



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to