Update of /cvsroot/alsa/alsa-utils/aplay
In directory sc8-pr-cvs1:/tmp/cvs-serv22900

Modified Files:
        aplay.c 
Log Message:
Fixed detection of 24-bit wav files

Index: aplay.c
===================================================================
RCS file: /cvsroot/alsa/alsa-utils/aplay/aplay.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- aplay.c     22 Oct 2002 18:00:52 -0000      1.152
+++ aplay.c     18 Dec 2002 12:04:59 -0000      1.153
@@ -654,7 +654,7 @@
                hwparams.format = SND_PCM_FORMAT_S16_LE;
                break;
        case 24:
-               switch (LE_SHORT(f->byte_p_spl)) {
+               switch (LE_SHORT(f->byte_p_spl) / hwparams.channels) {
                case 3:
                        hwparams.format = SND_PCM_FORMAT_S24_3LE;
                        break;
@@ -662,9 +662,10 @@
                        hwparams.format = SND_PCM_FORMAT_S24_LE;
                        break;
                default:
-                       error(" can't play WAVE-files with sample %d bits in %d bytes 
wide", LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl));
-                       break;
+                       error(" can't play WAVE-files with sample %d bits in %d bytes 
+wide (%d channels)", LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl), 
+hwparams.channels);
+                       exit(EXIT_FAILURE);
                }
+               break;
        case 32:
                hwparams.format = SND_PCM_FORMAT_S32_LE;
                break;



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to