aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/sound.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2013-02-25 10:32:12 -0500
committerMatthew Hoops2013-02-25 10:32:12 -0500
commitc9b1dd37c5abceda2d9a6415d474c0b980c1f5cf (patch)
treea14830088064fe6bbfa291d0f19c684992b245f3 /engines/hopkins/sound.cpp
parentb22bb6d46348a3ee6e115ceb6e84674dd763da6a (diff)
downloadscummvm-rg350-c9b1dd37c5abceda2d9a6415d474c0b980c1f5cf.tar.gz
scummvm-rg350-c9b1dd37c5abceda2d9a6415d474c0b980c1f5cf.tar.bz2
scummvm-rg350-c9b1dd37c5abceda2d9a6415d474c0b980c1f5cf.zip
HOPKINS: Don't have the TWA/APC code in the Audio namespace
Diffstat (limited to 'engines/hopkins/sound.cpp')
-rw-r--r--engines/hopkins/sound.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 43bceb06f5..de8b1115db 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -35,7 +35,7 @@
#include "audio/mods/protracker.h"
#include "audio/decoders/raw.h"
-namespace Audio {
+namespace Hopkins {
class APC_ADPCMStream : public Audio::DVI_ADPCMStream {
public:
@@ -70,7 +70,7 @@ Audio::RewindableAudioStream *makeAPCStream(Common::SeekableReadStream *stream,
return new APC_ADPCMStream(stream, disposeAfterUse, rate, stereo ? 2 : 1);
}
-class TwaAudioStream : public AudioStream {
+class TwaAudioStream : public Audio::AudioStream {
public:
TwaAudioStream(Common::String name, Common::SeekableReadStream *stream) {
_name = name;
@@ -152,7 +152,7 @@ protected:
Common::File *file = new Common::File();
if (file->open(filename + ".APC")) {
- _cueStream = Audio::makeAPCStream(file, DisposeAfterUse::YES);
+ _cueStream = makeAPCStream(file, DisposeAfterUse::YES);
return true;
}
@@ -184,12 +184,6 @@ Audio::AudioStream *makeTwaStream(Common::String name, Common::SeekableReadStrea
return new TwaAudioStream(name, stream);
}
-}
-
-/*------------------------------------------------------------------------*/
-
-namespace Hopkins {
-
SoundManager::SoundManager() {
_specialSoundNum = 0;
_soundVolume = 0;
@@ -436,7 +430,7 @@ void SoundManager::loadMusic(const Common::String &file) {
if (!f.open(filename))
error("Error opening file %s", filename.c_str());
- Audio::AudioStream *twaStream = Audio::makeTwaStream(file.c_str(), &f);
+ Audio::AudioStream *twaStream = makeTwaStream(file.c_str(), &f);
_vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, twaStream);
f.close();
}
@@ -897,7 +891,7 @@ void SoundManager::updateScummVMSoundSettings() {
*/
Audio::RewindableAudioStream *SoundManager::makeSoundStream(Common::SeekableReadStream *stream) {
if (_vm->getPlatform() == Common::kPlatformWindows)
- return Audio::makeAPCStream(stream, DisposeAfterUse::YES);
+ return makeAPCStream(stream, DisposeAfterUse::YES);
else if (_vm->getPlatform() == Common::kPlatformLinux)
return Audio::makeWAVStream(stream, DisposeAfterUse::YES);
else