Mercurial > mplayer.hg
changeset 30240:1c55c7f6874b
More uses of AF_FORMAT_IS_AC3
author | reimar |
---|---|
date | Mon, 11 Jan 2010 20:02:46 +0000 |
parents | 7227245da803 |
children | 02b9c1a452e1 |
files | libao2/ao_dsound.c libao2/ao_win32.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_dsound.c Mon Jan 11 19:55:07 2010 +0000 +++ b/libao2/ao_dsound.c Mon Jan 11 20:02:46 2010 +0000 @@ -327,7 +327,7 @@ 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 @@ 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;
--- a/libao2/ao_win32.c Mon Jan 11 19:55:07 2010 +0000 +++ b/libao2/ao_win32.c Mon Jan 11 20:02:46 2010 +0000 @@ -180,7 +180,7 @@ 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;