]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/pulse.c
add_bool: wants a boolean.
[vlc] / modules / audio_output / pulse.c
index bacd55ca2343ebe32be8f12aef1e09732acc31d3..2fc17a4eb2ceb6139260ba76498588a81fa362e3 100644 (file)
@@ -165,11 +165,19 @@ static int Open ( vlc_object_t *p_this )
     }
 
     /* Add a quick command line info message */
-    msg_Info(p_aout, "No. of Audio Channels: %d", ss.channels);
+    msg_Dbg(p_aout, "%d audio channels", ss.channels);
 
     ss.rate = p_aout->output.output.i_rate;
-    ss.format = PA_SAMPLE_FLOAT32NE;
-    p_aout->output.output.i_format = VLC_CODEC_FL32;
+    if (vlc_CPU() & CPU_CAPABILITY_FPU)
+    {
+        ss.format = PA_SAMPLE_FLOAT32NE;
+        p_aout->output.output.i_format = VLC_CODEC_FL32;
+    }
+    else
+    {
+        ss.format = PA_SAMPLE_S16NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
+    }
 
     if (!pa_sample_spec_valid(&ss)) {
         msg_Err(p_aout,"Invalid sample spec");
@@ -181,7 +189,7 @@ static int Open ( vlc_object_t *p_this )
      */
     a.tlength = pa_bytes_per_second(&ss)/5;
     a.maxlength = a.tlength * 2;
-    a.prebuf = a.tlength;
+    a.prebuf = a.tlength / 2;
     a.minreq = a.tlength / 10;
 
     /* Buffer size is 20mS */