diff options
author | Torbjörn Andersson | 2004-01-11 15:47:41 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-01-11 15:47:41 +0000 |
commit | cf0a73f913174599c7c28d910ecd87229fd62afd (patch) | |
tree | 7eabb5c16878d42f35d811ed13af5ed20b763f92 /sword1/music.h | |
parent | 563d95c576c817a63ec64302e67b2ee5daa97c6e (diff) | |
download | scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.tar.gz scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.tar.bz2 scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.zip |
Introduced new namespace, Sword1, removing the "Sword" and "Bs" prefixes in
the process, except for SwordEngine.
Some minor cleanups along the wa, e.g. stdafx.h already includes <stdio.h>,
<stdlib.h> and <math.h> so there shouldn't be any need to do it elsewhere.
svn-id: r12320
Diffstat (limited to 'sword1/music.h')
-rw-r--r-- | sword1/music.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sword1/music.h b/sword1/music.h index c7a4fe2e30..c050da4b2b 100644 --- a/sword1/music.h +++ b/sword1/music.h @@ -28,13 +28,15 @@ #include "sound/audiostream.h" #include "sound/rate.h" +class SoundMixer; + +namespace Sword1 { + #define TOTAL_TUNES 270 #define WAVEHEADERSIZE 0x2C -class SoundMixer; - -class SwordMusicHandle : public AudioStream { +class MusicHandle : public AudioStream { private: File _file; bool _looping; @@ -43,7 +45,7 @@ private: int _rate; bool _stereo; public: - SwordMusicHandle() : _looping(false), _fading(0) {} + MusicHandle() : _looping(false), _fading(0) {} virtual int readBuffer(int16 *buffer, const int numSamples); bool play(const char *filename, bool loop); void stop(); @@ -57,17 +59,17 @@ public: int getRate() const { return _rate; } }; -class SwordMusic { +class Music { public: - SwordMusic(OSystem *system, SoundMixer *pMixer); - ~SwordMusic(); + Music(OSystem *system, SoundMixer *pMixer); + ~Music(); void startMusic(int32 tuneId, int32 loopFlag); void fadeDown(); void setVolume(uint8 volL, uint8 volR); void giveVolume(uint8 *volL, uint8 *volR); private: st_volume_t _volumeL, _volumeR; - SwordMusicHandle _handles[2]; + MusicHandle _handles[2]; RateConverter *_converter[2]; OSystem *_system; SoundMixer *_mixer; @@ -77,4 +79,6 @@ private: static const char _tuneList[TOTAL_TUNES][8]; // in staticres.cpp }; +} // End of namespace Sword1 + #endif // BSMUSIC_H |