diff options
author | Max Horn | 2010-01-23 13:32:45 +0000 |
---|---|---|
committer | Max Horn | 2010-01-23 13:32:45 +0000 |
commit | 2c71e7b76db6beed9d9bb2d0e3ad5f1f64cdfbf1 (patch) | |
tree | d2674f6351fdd79af79198f4f2c9980d4e2626ff | |
parent | 0c5f1c3f970980c7b9a1956c3b496d7b6f5604ee (diff) | |
download | scummvm-rg350-2c71e7b76db6beed9d9bb2d0e3ad5f1f64cdfbf1.tar.gz scummvm-rg350-2c71e7b76db6beed9d9bb2d0e3ad5f1f64cdfbf1.tar.bz2 scummvm-rg350-2c71e7b76db6beed9d9bb2d0e3ad5f1f64cdfbf1.zip |
cleanup
svn-id: r47468
-rw-r--r-- | sound/iff_sound.cpp | 30 | ||||
-rw-r--r-- | sound/iff_sound.h | 22 |
2 files changed, 28 insertions, 24 deletions
diff --git a/sound/iff_sound.cpp b/sound/iff_sound.cpp index 267a332500..c201830f60 100644 --- a/sound/iff_sound.cpp +++ b/sound/iff_sound.cpp @@ -27,17 +27,35 @@ #include "sound/audiostream.h" #include "sound/mixer.h" #include "sound/raw.h" +#include "common/iff_container.h" #include "common/func.h" namespace Audio { +struct Voice8Header { + uint32 oneShotHiSamples; + uint32 repeatHiSamples; + uint32 samplesPerHiCycle; + uint16 samplesPerSec; + byte octaves; + byte compression; + uint32 volume; + + Voice8Header() { + memset(this, 0, sizeof(Voice8Header)); + } + + void load(Common::ReadStream &stream); +}; + void Voice8Header::load(Common::ReadStream &stream) { - stream.read(this, sizeof(Voice8Header)); - oneShotHiSamples = FROM_BE_32(oneShotHiSamples); - repeatHiSamples = FROM_BE_32(repeatHiSamples); - samplesPerHiCycle = FROM_BE_32(samplesPerHiCycle); - samplesPerSec = FROM_BE_16(samplesPerSec); - volume = FROM_BE_32(volume); + oneShotHiSamples = stream.readUint32BE(); + repeatHiSamples = stream.readUint32BE(); + samplesPerHiCycle = stream.readUint32BE(); + samplesPerSec = stream.readUint16BE(); + octaves = stream.readByte(); + compression = stream.readByte(); + volume = stream.readUint32BE(); } diff --git a/sound/iff_sound.h b/sound/iff_sound.h index 01c9977c7c..4e53059380 100644 --- a/sound/iff_sound.h +++ b/sound/iff_sound.h @@ -32,30 +32,16 @@ #ifndef SOUND_IFF_H #define SOUND_IFF_H -#include "common/iff_container.h" -#include "sound/audiostream.h" +namespace Common { + class ReadStream; +} namespace Audio { -struct Voice8Header { - uint32 oneShotHiSamples; - uint32 repeatHiSamples; - uint32 samplesPerHiCycle; - uint16 samplesPerSec; - byte octaves; - byte compression; - uint32 volume; - - Voice8Header() { - memset(this, 0, sizeof(Voice8Header)); - } - - void load(Common::ReadStream &stream); -}; +class AudioStream; AudioStream *make8SVXStream(Common::ReadStream &stream, bool loop); - } #endif |