diff options
Diffstat (limited to 'sky')
-rw-r--r-- | sky/intro.cpp | 8 | ||||
-rw-r--r-- | sky/intro.h | 4 | ||||
-rw-r--r-- | sky/music/adlibmusic.cpp | 2 | ||||
-rw-r--r-- | sky/music/adlibmusic.h | 8 | ||||
-rw-r--r-- | sky/sky.cpp | 4 | ||||
-rw-r--r-- | sky/sound.cpp | 10 | ||||
-rw-r--r-- | sky/sound.h | 4 |
7 files changed, 21 insertions, 19 deletions
diff --git a/sky/intro.cpp b/sky/intro.cpp index e4a517b0e9..f677282c54 100644 --- a/sky/intro.cpp +++ b/sky/intro.cpp @@ -618,7 +618,7 @@ uint16 Intro::_floppyIntroSeq[] = { SEQEND }; -Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, SoundMixer *mixer, OSystem *system) { +Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, Audio::Mixer *mixer, OSystem *system) { _skyDisk = disk; _skyScreen = screen; @@ -739,7 +739,7 @@ bool Intro::nextPart(uint16 *&data) { // directly, but this will have to do for now. memset(vData, 127, sizeof(struct dataFileHeader)); _mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025, - SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE); + Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED, SOUND_VOICE); return true; case WAITVOICE: while (_mixer->isSoundHandleActive(_voice)) @@ -756,12 +756,12 @@ bool Intro::nextPart(uint16 *&data) { case LOOPBG: _mixer->stopID(SOUND_BG); _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, - SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, SOUND_BG); + Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_LOOP, SOUND_BG); return true; case PLAYBG: _mixer->stopID(SOUND_BG); _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, - SoundMixer::FLAG_UNSIGNED, SOUND_BG); + Audio::Mixer::FLAG_UNSIGNED, SOUND_BG); return true; case STOPBG: _mixer->stopID(SOUND_BG); diff --git a/sky/intro.h b/sky/intro.h index 2e97663781..e7840fa120 100644 --- a/sky/intro.h +++ b/sky/intro.h @@ -36,7 +36,7 @@ class Text; class Intro { public: - Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, SoundMixer *mixer, OSystem *system); + Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, Audio::Mixer *mixer, OSystem *system); ~Intro(void); bool doIntro(bool floppyIntro); bool _quitProg; @@ -51,7 +51,7 @@ private: Sound *_skySound; Text *_skyText; OSystem *_system; - SoundMixer *_mixer; + Audio::Mixer *_mixer; uint8 *_textBuf, *_saveBuf; uint8 *_bgBuf; diff --git a/sky/music/adlibmusic.cpp b/sky/music/adlibmusic.cpp index 6db9b83359..57f507ff46 100644 --- a/sky/music/adlibmusic.cpp +++ b/sky/music/adlibmusic.cpp @@ -26,7 +26,7 @@ namespace Sky { -AdlibMusic::AdlibMusic(SoundMixer *pMixer, Disk *pDisk) +AdlibMusic::AdlibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pDisk) { _driverFileBase = 60202; diff --git a/sky/music/adlibmusic.h b/sky/music/adlibmusic.h index b4be9b8cde..d24fe7256e 100644 --- a/sky/music/adlibmusic.h +++ b/sky/music/adlibmusic.h @@ -26,13 +26,15 @@ #include "sound/audiostream.h" #include "sound/fmopl.h" -class SoundMixer; +namespace Audio { + class Mixer; +} namespace Sky { class AdlibMusic : public AudioStream, public MusicBase { public: - AdlibMusic(SoundMixer *pMixer, Disk *pDisk); + AdlibMusic(Audio::Mixer *pMixer, Disk *pDisk); ~AdlibMusic(void); virtual void setVolume(uint8 volume); @@ -47,7 +49,7 @@ public: private: FM_OPL *_opl; - SoundMixer *_mixer; + Audio::Mixer *_mixer; uint8 *_initSequence; uint32 _sampleRate, _nextMusicPoll; virtual void setupPointers(void); diff --git a/sky/sky.cpp b/sky/sky.cpp index c3b93ebd76..47458e431f 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -283,8 +283,8 @@ int SkyEngine::init(GameDetector &detector) { if (!_mixer->isReady()) warning("Sound initialisation failed"); - _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _floppyIntro = ConfMan.getBool("alt_intro"); _skyDisk = new Disk(_gameDataPath); diff --git a/sky/sound.cpp b/sky/sound.cpp index 0efc41bf9e..c65579d950 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1017,7 +1017,7 @@ SfxQueue Sound::_sfxQueue[MAX_QUEUED_FX] = { { 0, 0, 0, 0} }; -Sound::Sound(SoundMixer *mixer, Disk *pDisk, uint8 pVolume) { +Sound::Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume) { _skyDisk = pDisk; _soundData = NULL; _mixer = mixer; @@ -1034,7 +1034,7 @@ Sound::~Sound(void) { void Sound::playSound(uint32 id, byte *sound, uint32 size, SoundHandle *handle) { byte flags = 0; - flags |= SoundMixer::FLAG_UNSIGNED|SoundMixer::FLAG_AUTOFREE; + flags |= Audio::Mixer::FLAG_UNSIGNED|Audio::Mixer::FLAG_AUTOFREE; size -= sizeof(struct dataFileHeader); byte *buffer = (byte *)malloc(size); memcpy(buffer, sound+sizeof(struct dataFileHeader), size); @@ -1105,13 +1105,13 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) { uint16 dataSize = (_sfxInfo[(sound << 3) | 2] << 8) | _sfxInfo[(sound << 3) | 3]; uint16 dataLoop = (_sfxInfo[(sound << 3) | 6] << 8) | _sfxInfo[(sound << 3) | 7]; - byte flags = SoundMixer::FLAG_UNSIGNED; + byte flags = Audio::Mixer::FLAG_UNSIGNED; uint32 loopSta = 0, loopEnd = 0; if (dataLoop) { loopSta = dataSize - dataLoop; loopEnd = dataSize; - flags |= SoundMixer::FLAG_LOOP; + flags |= Audio::Mixer::FLAG_LOOP; } if (channel == 0) @@ -1242,7 +1242,7 @@ bool Sound::startSpeech(uint16 textNum) { rate = 11025; _mixer->stopID(SOUND_SPEECH); - _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, SOUND_SPEECH); + _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, rate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE, SOUND_SPEECH); return true; } diff --git a/sky/sound.h b/sky/sound.h index b6888977c7..2f9d68c3a9 100644 --- a/sky/sound.h +++ b/sky/sound.h @@ -49,7 +49,7 @@ protected: public: - SoundMixer *_mixer; + Audio::Mixer *_mixer; SoundHandle _voiceHandle; SoundHandle _effectHandle; SoundHandle _bgSoundHandle; @@ -62,7 +62,7 @@ protected: void playSound(uint32 id, byte *sound, uint32 size, SoundHandle *handle); public: - Sound(SoundMixer *mixer, Disk *pDisk, uint8 pVolume); + Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume); ~Sound(void); void loadSection(uint8 pSection); |