diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-11 20:02:46 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-11 20:02:46 +0000 |
commit | d3ae3611ce366b7598c49094a94109c6ee504322 (patch) | |
tree | b12af43acbd00ccb24379d0efa69703029851594 | |
parent | d4b1ff0d03c9047db196921ce97399782e9c4700 (diff) |
More uses of AF_FORMAT_IS_AC3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30282 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_dsound.c | 4 | ||||
-rw-r--r-- | libao2/ao_win32.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c index f66042a793..8fbcfbe2fc 100644 --- a/libao2/ao_dsound.c +++ b/libao2/ao_dsound.c @@ -327,7 +327,7 @@ static int write_buffer(unsigned char *data, int len) if (SUCCEEDED(res)) { - if( (ao_data.channels == 6) && (ao_data.format!=AF_FORMAT_AC3) ) { + if( (ao_data.channels == 6) && !AF_FORMAT_IS_AC3(ao_data.format) ) { // reorder channels while writing to pointers. // it's this easy because buffer size and len are always // aligned to multiples of channels*bytespersample @@ -456,7 +456,7 @@ static int init(int rate, int channels, int format, int flags) wformat.Format.cbSize = (channels > 2) ? sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX) : 0; wformat.Format.nChannels = channels; wformat.Format.nSamplesPerSec = rate; - if (format == AF_FORMAT_AC3) { + if (AF_FORMAT_IS_AC3(format)) { wformat.Format.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF; wformat.Format.wBitsPerSample = 16; wformat.Format.nBlockAlign = 4; diff --git a/libao2/ao_win32.c b/libao2/ao_win32.c index a0475455ec..59e758793d 100644 --- a/libao2/ao_win32.c +++ b/libao2/ao_win32.c @@ -180,7 +180,7 @@ static int init(int rate,int channels,int format,int flags) wformat.Format.cbSize = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0; wformat.Format.nChannels = channels; wformat.Format.nSamplesPerSec = rate; - if(format == AF_FORMAT_AC3) + if(AF_FORMAT_IS_AC3(format)) { wformat.Format.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF; wformat.Format.wBitsPerSample = 16; |