aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJames Brown2002-03-02 12:54:37 +0000
committerJames Brown2002-03-02 12:54:37 +0000
commit945d81761b1e567a00fe54617959fbcef18c80d7 (patch)
tree018031a848235499bd76672acdd240665ee925fb /sound
parentddad6760a5d7db5786476ba95cc309ab80173c15 (diff)
downloadscummvm-rg350-945d81761b1e567a00fe54617959fbcef18c80d7.tar.gz
scummvm-rg350-945d81761b1e567a00fe54617959fbcef18c80d7.tar.bz2
scummvm-rg350-945d81761b1e567a00fe54617959fbcef18c80d7.zip
Added a new '-t' commandline option to set TEMPO_BASE (note: In decimal, not hex.. should fix).
svn-id: r3641
Diffstat (limited to 'sound')
-rw-r--r--sound/imuse.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index c69dee198f..4bc67c26f7 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -187,7 +187,7 @@ bool SoundEngine::start_sound(int sound) {
player = allocate_player(128);
if (!player)
return false;
-
+
player->clear();
return player->start_sound(sound);
}
@@ -220,7 +220,7 @@ void SoundEngine::init_players() {
for (i=ARRAYSIZE(_players); i!=0; i--, player++) {
player->_active = false;
- player->_se = this;
+ player->_se = this;
}
}
@@ -1059,8 +1059,12 @@ int Player::start_seq_sound(int sound) {
void Player::set_tempo(uint32 b) {
uint32 i,j;
-
- i = TEMPO_BASE;
+printf("is: %d\n", _se->_s->_gameTempo);
+ if (_se->_s->_gameTempo < 1000)
+ i = TEMPO_BASE;
+ else
+ i = _se->_s->_gameTempo;
+ printf("Tempo set to: %d\n", i);
j = _tempo = b;
while (i&0xFFFF0000 || j&0xFFFF0000) { i>>=1; j>>=1; }