aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorMax Horn2006-04-29 22:33:31 +0000
committerMax Horn2006-04-29 22:33:31 +0000
commit27307acd7c6f9f9083bdcad38ba54f18d4f080b7 (patch)
treefd7360382a19b07dcca9b711080b3f6c8f64fd38 /engines/simon
parentac0ae13bee890b78442788abe6b87e514c9928a0 (diff)
downloadscummvm-rg350-27307acd7c6f9f9083bdcad38ba54f18d4f080b7.tar.gz
scummvm-rg350-27307acd7c6f9f9083bdcad38ba54f18d4f080b7.tar.bz2
scummvm-rg350-27307acd7c6f9f9083bdcad38ba54f18d4f080b7.zip
Moved the AudioCDManager as well as class AudioStream and its (standard) subclasses to namespace Audio
svn-id: r22231
Diffstat (limited to 'engines/simon')
-rw-r--r--engines/simon/animation.cpp2
-rw-r--r--engines/simon/animation.h2
-rw-r--r--engines/simon/sound.cpp14
3 files changed, 9 insertions, 9 deletions
diff --git a/engines/simon/animation.cpp b/engines/simon/animation.cpp
index adf433691e..329827b7fa 100644
--- a/engines/simon/animation.cpp
+++ b/engines/simon/animation.cpp
@@ -187,7 +187,7 @@ void MoviePlayer::startSound() {
_fd.read(buffer, size);
Common::MemoryReadStream stream(buffer, size);
- _bgSoundStream = makeWAVStream(stream);
+ _bgSoundStream = Audio::makeWAVStream(stream);
_mixer->stopHandle(_bgSound);
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream);
free(buffer);
diff --git a/engines/simon/animation.h b/engines/simon/animation.h
index b3b31c1c32..ba7cd5eaa1 100644
--- a/engines/simon/animation.h
+++ b/engines/simon/animation.h
@@ -38,7 +38,7 @@ class MoviePlayer {
Audio::Mixer *_mixer;
Audio::SoundHandle _bgSound;
- AudioStream *_bgSoundStream;
+ Audio::AudioStream *_bgSoundStream;
bool _omniTV;
bool _playing;
diff --git a/engines/simon/sound.cpp b/engines/simon/sound.cpp
index f00ff4456c..4a0124002e 100644
--- a/engines/simon/sound.cpp
+++ b/engines/simon/sound.cpp
@@ -133,7 +133,7 @@ void WavSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
byte wavFlags;
int size, rate;
- if (!loadWAVFromStream(*_file, size, rate, wavFlags)) {
+ if (!Audio::loadWAVFromStream(*_file, size, rate, wavFlags)) {
error("playSound: Not a valid WAV file");
}
@@ -151,7 +151,7 @@ void VocSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
_file->seek(_offsets[sound], SEEK_SET);
int size, rate;
- byte *buffer = loadVOCFromStream(*_file, size, rate);
+ byte *buffer = Audio::loadVOCFromStream(*_file, size, rate);
_mixer->playRaw(handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE);
}
@@ -187,7 +187,7 @@ void MP3Sound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeMP3Stream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, Audio::makeMP3Stream(_file, size));
}
#endif
@@ -211,7 +211,7 @@ void VorbisSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeVorbisStream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, Audio::makeVorbisStream(_file, size));
}
#endif
@@ -235,7 +235,7 @@ void FlacSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeFlacStream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, Audio::makeFlacStream(_file, size));
}
#endif
@@ -588,7 +588,7 @@ void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint soun
int size = READ_LE_UINT32(soundData + 4);
Common::MemoryReadStream stream(soundData, size);
- if (!loadWAVFromStream(stream, size, rate, flags, &compType, &blockAlign)) {
+ if (!Audio::loadWAVFromStream(stream, size, rate, flags, &compType, &blockAlign)) {
error("playSoundData: Not a valid WAV data");
}
@@ -628,7 +628,7 @@ void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint soun
flags |= Audio::Mixer::FLAG_LOOP;
if (compType == 2) {
- AudioStream *sndStream = makeADPCMStream(&stream, size, kADPCMMS, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
+ Audio::AudioStream *sndStream = Audio::makeADPCMStream(&stream, size, Audio::kADPCMMS, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
buffer = (byte *)malloc(size * 4);
size = sndStream->readBuffer((int16*)buffer, size * 2);
size *= 2; // 16bits.