changeset 30237:9584cf67cea0

Use af_fmt2bits, it should give more sensible values than snd_pcm_format_physical_width, especially for AC3.
author reimar
date Mon, 11 Jan 2010 19:40:58 +0000
parents cb2e10d85c04
children faed63286179
files libao2/ao_alsa.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_alsa.c	Mon Jan 11 19:37:50 2010 +0000
+++ b/libao2/ao_alsa.c	Mon Jan 11 19:40:58 2010 +0000
@@ -574,7 +574,7 @@
 	  return 0;
         }
 
-      bytes_per_sample = snd_pcm_format_physical_width(alsa_format) / 8;
+      bytes_per_sample = af_fmt2bits(ao_data.format) / 8;
       bytes_per_sample *= ao_data.channels;
       ao_data.bps = ao_data.samplerate * bytes_per_sample;