aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Zbrog2014-03-31 22:56:01 +0200
committerlukaslw2014-06-22 19:24:14 +0200
commit94f51358508cacc1b8fa1aa4745dbba4917128ca (patch)
treed8a927a1d4f09dd696ac883f914972d8dbe8c21a
parent8e9f08cf433b556751d74aac94c09c224d58383f (diff)
downloadscummvm-rg350-94f51358508cacc1b8fa1aa4745dbba4917128ca.tar.gz
scummvm-rg350-94f51358508cacc1b8fa1aa4745dbba4917128ca.tar.bz2
scummvm-rg350-94f51358508cacc1b8fa1aa4745dbba4917128ca.zip
PRINCE: Fixed background music playback
-rw-r--r--engines/prince/prince.cpp4
-rw-r--r--engines/prince/sound.cpp7
-rw-r--r--engines/prince/sound.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index bdb05bfeda..685c397edb 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -138,8 +138,10 @@ void PrinceEngine::init() {
if (!sound->open("sound/databank.ptc"))
error("Can't open sound/databank.ptc");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "all");
+
SearchMan.add("all", all);
- SearchMan.add("data/voices", voices);
+ SearchMan.add("voices", voices);
SearchMan.add("sound", sound);
_graph = new GraphicsMan(this);
diff --git a/engines/prince/sound.cpp b/engines/prince/sound.cpp
index fcdca8a0d1..425a710aa1 100644
--- a/engines/prince/sound.cpp
+++ b/engines/prince/sound.cpp
@@ -158,7 +158,10 @@ void MusicPlayer::killMidi() {
void MusicPlayer::loadMidi(const char * name) {
Common::SeekableReadStream * stream = SearchMan.createReadStreamForMember(name);
if (!stream)
+ {
+ debug("Can't load midi stream %s", name);
return;
+ }
// Stop any currently playing MIDI file
killMidi();
@@ -168,7 +171,7 @@ void MusicPlayer::loadMidi(const char * name) {
_data = (byte *)malloc(_dataSize);
stream->read(_data, _dataSize);
- delete stream;
+ delete stream;
// Start playing the music
sndMidiStart();
@@ -216,3 +219,5 @@ void MusicPlayer::sendToChannel(byte channel, uint32 b) {
}
} // End of namespace CGE
+
+/* vim: set tabstop=4 expandtab!: */
diff --git a/engines/prince/sound.h b/engines/prince/sound.h
index 7219411b36..07ac9f38d9 100644
--- a/engines/prince/sound.h
+++ b/engines/prince/sound.h
@@ -71,3 +71,4 @@ public:
#endif
+/* vim: set tabstop=4 expandtab!: */