[polypaudio-commits] r899 - /trunk/src/utils/paplay.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed May 17 07:54:42 PDT 2006


Author: lennart
Date: Wed May 17 16:54:41 2006
New Revision: 899

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=899&root=polypaudio&view=rev
Log:
* use S16NE for SF_FORMAT_PCM_S8 formats, too

Modified:
    trunk/src/utils/paplay.c

Modified: trunk/src/utils/paplay.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/utils/paplay.c?rev=899&root=polypaudio&r1=898&r2=899&view=diff
==============================================================================
--- trunk/src/utils/paplay.c (original)
+++ trunk/src/utils/paplay.c Wed May 17 16:54:41 2006
@@ -317,24 +317,26 @@
     sample_spec.rate = sfinfo.samplerate;
     sample_spec.channels = sfinfo.channels;
     
+    readf_function = NULL;
+    
     switch (sfinfo.format & 0xFF) {
         case SF_FORMAT_PCM_16:
         case SF_FORMAT_PCM_U8:
+        case SF_FORMAT_PCM_S8:
             sample_spec.format = PA_SAMPLE_S16NE;
             readf_function = (sf_count_t (*)(SNDFILE *_sndfile, void *ptr, sf_count_t frames)) sf_readf_short;
             break;
             
         case SF_FORMAT_ULAW:
             sample_spec.format = PA_SAMPLE_ULAW;
-            readf_function = NULL;
             break;
             
         case SF_FORMAT_ALAW:
             sample_spec.format = PA_SAMPLE_ALAW;
-            readf_function = NULL;
             break;
 
         case SF_FORMAT_FLOAT:
+        case SF_FORMAT_DOUBLE:
         default:
             sample_spec.format = PA_SAMPLE_FLOAT32NE;
             readf_function = (sf_count_t (*)(SNDFILE *_sndfile, void *ptr, sf_count_t frames)) sf_readf_float;




More information about the pulseaudio-commits mailing list