Mercurial > mplayer.hg
changeset 30239:7227245da803
Use AF_FORMAT_IS_AC3 in ao_oss.c
author | reimar |
---|---|
date | Mon, 11 Jan 2010 19:55:07 +0000 |
parents | faed63286179 |
children | 1c55c7f6874b |
files | libao2/ao_oss.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_oss.c Mon Jan 11 19:43:19 2010 +0000 +++ b/libao2/ao_oss.c Mon Jan 11 19:55:07 2010 +0000 @@ -179,7 +179,7 @@ ao_control_vol_t *vol = (ao_control_vol_t *)arg; int fd, v, devs; - if(ao_data.format == AF_FORMAT_AC3) + if(AF_FORMAT_IS_AC3(ao_data.format)) return CONTROL_TRUE; if ((fd = open(oss_mixer_device, O_RDONLY)) > 0) @@ -297,7 +297,7 @@ fcntl(audio_fd, F_SETFD, FD_CLOEXEC); #endif - if(format == AF_FORMAT_AC3) { + if(AF_FORMAT_IS_AC3(format)) { ao_data.samplerate=rate; ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); } @@ -332,7 +332,7 @@ af_fmt2str_short(ao_data.format), af_fmt2str_short(format)); ao_data.channels = channels; - if(format != AF_FORMAT_AC3) { + if(!AF_FORMAT_IS_AC3(format)) { // We only use SNDCTL_DSP_CHANNELS for >2 channels, in case some drivers don't have it if (ao_data.channels > 2) { if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels) == -1 || @@ -447,10 +447,10 @@ #endif oss_format = format2oss(ao_data.format); - if(ao_data.format == AF_FORMAT_AC3) + if(AF_FORMAT_IS_AC3(ao_data.format)) ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); ioctl (audio_fd, SNDCTL_DSP_SETFMT, &oss_format); - if(ao_data.format != AF_FORMAT_AC3) { + if(!AF_FORMAT_IS_AC3(ao_data.format)) { if (ao_data.channels > 2) ioctl (audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels); else {