hwac3 fix for cmedia 8738 by Hans-Peter Raschke <Hans-Peter.Raschke@wintermann-datenservice.de>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4185 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-01-15 22:55:28 +00:00
parent 19b826f732
commit 163a00b4a1
1 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,11 @@ static int init(int rate,int channels,int format,int flags){
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) {