From 1b2e0b746516b7d32ef59c7b8ab8ff3bb73923dc Mon Sep 17 00:00:00 2001 From: SupSuper Date: Fri, 5 Feb 2021 14:28:51 +0000 Subject: [PATCH] TITANIC: Use WaveFormat enum --- engines/titanic/sound/wave_file.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp index f3774fda553..eab91fc6658 100644 --- a/engines/titanic/sound/wave_file.cpp +++ b/engines/titanic/sound/wave_file.cpp @@ -22,6 +22,7 @@ #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" +#include "audio/decoders/wave_types.h" #include "common/memstream.h" #include "titanic/sound/wave_file.h" #include "titanic/sound/sound_manager.h" @@ -176,14 +177,12 @@ Audio::SeekableAudioStream *CWaveFile::createAudioStream() { const int16 *CWaveFile::lock() { - enum { kWaveFormatPCM = 1 }; - switch (_loadMode) { case LOADMODE_SCUMMVM: // Sanity checking that only raw 16-bit LE 22Khz waves can be locked assert(_waveData && _rate == AUDIO_SAMPLING_RATE); assert(_flags == (Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_16BITS)); - assert(_wavType == kWaveFormatPCM); + assert(_wavType == Audio::kWaveFormatPCM); // Return a pointer to the data section of the wave file return (const int16 *)(_waveData + _headerSize);