Update of /cvsroot/alsa/alsa-kernel/core/oss
In directory sc8-pr-cvs1:/tmp/cvs-serv26479

Modified Files:
        pcm_oss.c 
Log Message:
Fixed semantics in snd_pcm_oss_bytes() function.


Index: pcm_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/oss/pcm_oss.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- pcm_oss.c   30 Oct 2003 11:29:26 -0000      1.56
+++ pcm_oss.c   7 Nov 2003 09:47:18 -0000       1.57
@@ -124,11 +124,10 @@
 static long snd_pcm_oss_bytes(snd_pcm_substream_t *substream, long frames)
 {
        snd_pcm_runtime_t *runtime = substream->runtime;
-       if (runtime->period_size == runtime->oss.period_bytes)
+       snd_pcm_uframes_t buffer_size = snd_pcm_lib_buffer_bytes(substream);
+       if (buffer_size == runtime->oss.buffer_bytes)
                return frames;
-       if (runtime->period_size < runtime->oss.period_bytes)
-               return (frames * runtime->period_size) / runtime->oss.period_bytes;
-       return (frames * runtime->oss.period_bytes) / runtime->period_size;
+       return (runtime->oss.buffer_bytes * frames_to_bytes(runtime, frames)) / 
buffer_size;
 }
 
 static int snd_pcm_oss_format_from(int format)



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to