[vlc-devel] commit: PulseAudio: use 16-bits PCM if FPU is missing ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Sep 2 20:48:37 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 2 21:48:09 2009 +0300| [216aff655f8c9088ed77a90caf416f66fcae85a3] | committer: Rémi Denis-Courmont
PulseAudio: use 16-bits PCM if FPU is missing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=216aff655f8c9088ed77a90caf416f66fcae85a3
---
modules/audio_output/pulse.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 70a4f2f..2fc17a4 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -168,8 +168,16 @@ static int Open ( vlc_object_t *p_this )
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");
More information about the vlc-devel
mailing list