diff options
Diffstat (limited to 'simon/sound.cpp')
-rw-r--r-- | simon/sound.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/simon/sound.cpp b/simon/sound.cpp index db67ae58d3..9e4f357628 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -28,6 +28,7 @@ #include "sound/mp3.h" #include "sound/voc.h" #include "sound/vorbis.h" +#include "sound/wave.h" namespace Simon { @@ -152,6 +153,13 @@ void WavSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { _file->seek(_offsets[sound], SEEK_SET); + // TODO: use loadWAVFromStream to load the WAVE data! + /* + int rate, size; + bye flags; + isValidWAV = loadWAVFromStream(*_file, size, rate, flags); + */ + if (_file->read(&wave_hdr, sizeof(wave_hdr)) != sizeof(wave_hdr) || wave_hdr.riff != MKID('RIFF') || wave_hdr.wave != MKID('WAVE') || wave_hdr.fmt != MKID('fmt ') || READ_LE_UINT16(&wave_hdr.format_tag) != 1 |