aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2009-04-05 07:51:31 +0000
committerPaul Gilbert2009-04-05 07:51:31 +0000
commitd90a343790ca40933418ea75fa8ff702427dcbe2 (patch)
tree2c1aa7e784603bae9702761c80762487fd902938 /engines
parent197c2bbb99771228f0161ede64b15b456881b28f (diff)
downloadscummvm-rg350-d90a343790ca40933418ea75fa8ff702427dcbe2.tar.gz
scummvm-rg350-d90a343790ca40933418ea75fa8ff702427dcbe2.tar.bz2
scummvm-rg350-d90a343790ca40933418ea75fa8ff702427dcbe2.zip
Created stub manager class for sound effects
svn-id: r39856
Diffstat (limited to 'engines')
-rw-r--r--engines/cruise/cruise.cpp2
-rw-r--r--engines/cruise/cruise.h2
-rw-r--r--engines/cruise/sound.cpp2
-rw-r--r--engines/cruise/sound.h13
4 files changed, 18 insertions, 1 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index ddedf742fb..283817d2a4 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -69,6 +69,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
CruiseEngine::~CruiseEngine() {
delete _debugger;
delete _music;
+ delete _sound;
freeSystem();
}
@@ -125,6 +126,7 @@ void CruiseEngine::initialize() {
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
_music = new MusicPlayer();
+ _sound = new SoundPlayer();
}
bool CruiseEngine::loadLanguageStrings() {
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index b07482aaac..987d283df1 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -56,6 +56,7 @@ private:
Debugger *_debugger;
MidiDriver *_driver;
MusicPlayer *_music;
+ SoundPlayer *_sound;
bool _mt32, _adlib;
int _musicVolume;
Common::StringList _langStrings;
@@ -84,6 +85,7 @@ public:
Common::Language getLanguage() const;
Common::Platform getPlatform() const;
MusicPlayer &music() { return *_music; }
+ SoundPlayer &sound() { return *_sound; }
bool mt32() const { return _mt32; }
bool adlib() const { return _adlib; }
virtual GUI::Debugger *getDebugger() { return _debugger; }
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index caf7686990..ba0b9a18bd 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -112,7 +112,7 @@ void MusicPlayer::loadSong(const char *name) {
// Get the details of the song
// TODO: Figure this out for sure for use in actually playing song
- //int numTracksMaybe = *(_songPointer + 470);
+ //int size = *(_songPointer + 470);
//int speed = 244 - *(_songPointer + 471);
//int musicSpeed = (speed * 100) / 1060;
diff --git a/engines/cruise/sound.h b/engines/cruise/sound.h
index c5d4acaa92..d2ffa080a8 100644
--- a/engines/cruise/sound.h
+++ b/engines/cruise/sound.h
@@ -45,6 +45,7 @@ private:
byte _masterVolume;
byte *_songPointer;
+ // TODO: lib_SongSize
int _songSize;
void patchMidi(uint32 adr, const byte *data, int size);
@@ -71,10 +72,22 @@ public:
bool songLoaded() const { return _songPointer != NULL; }
bool songPlayed() const { return _songPlayed; }
bool isPlaying() const { return _isPlaying; }
+ bool looping() const { return _looping; }
+ byte volume() const { return _masterVolume; }
+ byte *songData() { return _songPointer; }
void setPlaying(bool playing) { _isPlaying = playing; }
void setLoop(bool loop) { _looping = loop; }
};
+class SoundPlayer {
+public:
+ SoundPlayer() {}
+
+ void startSound(int channelNum, const byte *ptr, int size, int speed, int volume, bool loop) {}
+ void startNote(int channelNum, int speed, int volume) {}
+ void stopChannel(int channelNum) {}
+};
+
} // End of namespace Cruise
#endif