# HG changeset patch # User reimar # Date 1263240166 0 # Node ID 1c55c7f6874bf43085ce33bb9b14742eb1a6267a # Parent 7227245da8030db71061e9047a320990f7a6430f More uses of AF_FORMAT_IS_AC3 diff -r 7227245da803 -r 1c55c7f6874b libao2/ao_dsound.c --- 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; diff -r 7227245da803 -r 1c55c7f6874b libao2/ao_win32.c --- 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;