changeset 4184:f648f699eda6

hwac3 fix for cmedia 8738 by Hans-Peter Raschke <Hans-Peter.Raschke@wintermann-datenservice.de>
author arpi
date Tue, 15 Jan 2002 22:55:28 +0000
parents 6db978580a7f
children 85c90bb8729a
files libao2/ao_oss.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_oss.c	Tue Jan 15 22:48:27 2002 +0000
+++ b/libao2/ao_oss.c	Tue Jan 15 22:55:28 2002 +0000
@@ -116,6 +116,11 @@
   if(format != AFMT_U8 && format != AFMT_S8)
     ao_data.bps*=2;
 
+  if(format == AFMT_AC3) {
+    ao_data.samplerate=rate;
+    ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
+  }
+  
   ao_data.format=format;
   ioctl (audio_fd, SNDCTL_DSP_SETFMT, &ao_data.format);
   if(format == AFMT_AC3 && ao_data.format != AFMT_AC3) {