[Scummvm-cvs-logs] SF.net SVN: scummvm:[46955] scummvm/trunk/engines/sci/sfx/soundcmd.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jan 3 22:51:30 CET 2010
Revision: 46955
http://scummvm.svn.sourceforge.net/scummvm/?rev=46955&view=rev
Author: thebluegr
Date: 2010-01-03 21:51:30 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
Fixed regression from commit #46950 (fixes KQ6CD, Pharkas CD, and others)
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2010-01-03 21:50:13 UTC (rev 46954)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2010-01-03 21:51:30 UTC (rev 46955)
@@ -271,6 +271,15 @@
_state->sfx_add_song(build_iterator(_resMan, number, type, handle), 0, handle, number);
+
+ // Notify the engine
+ if (_soundVersion <= SCI_VERSION_0_LATE)
+ PUT_SEL32V(_segMan, obj, state, kSoundInitialized);
+ else
+ PUT_SEL32(_segMan, obj, nodePtr, obj);
+
+ PUT_SEL32(_segMan, obj, handle, obj);
+
#else
MusicEntry *newSound = new MusicEntry();
@@ -302,24 +311,23 @@
newSound->pStreamAud = _audio->getAudioStream(number, 65535, &sampleLen);
newSound->soundType = Audio::Mixer::kSpeechSoundType;
} else {
- // If sound resource doesnt exist, we are supposed to leave nodePtr/handle selector alone
- // otherwise character selection music in qfg1vga wont work.
- if (!newSound->soundRes)
- return;
- _music->soundInitSnd(newSound);
+ if (newSound->soundRes)
+ _music->soundInitSnd(newSound);
}
_music->pushBackSlot(newSound);
+ if (newSound->soundRes || newSound->pStreamAud) {
+ // Notify the engine
+ if (_soundVersion <= SCI_VERSION_0_LATE)
+ PUT_SEL32V(_segMan, obj, state, kSoundInitialized);
+ else
+ PUT_SEL32(_segMan, obj, nodePtr, obj);
+
+ PUT_SEL32(_segMan, obj, handle, obj);
+ }
#endif
- // Notify the engine
- if (_soundVersion <= SCI_VERSION_0_LATE)
- PUT_SEL32V(_segMan, obj, state, kSoundInitialized);
- else
- PUT_SEL32(_segMan, obj, nodePtr, obj);
-
- PUT_SEL32(_segMan, obj, handle, obj);
}
void SoundCommandParser::cmdPlaySound(reg_t obj, int16 value) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list