aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/midiparser_sci.h
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-21 22:07:03 +0000
committerMartin Kiewitz2010-06-21 22:07:03 +0000
commit1041067a0c1ca2ac528338d99eaa1df677538265 (patch)
tree616f0510349ec005432bb9b9d3d1a4ded3519c43 /engines/sci/sound/midiparser_sci.h
parent6c854f30da2579c8e7059948c700fd0bcc72366d (diff)
downloadscummvm-rg350-1041067a0c1ca2ac528338d99eaa1df677538265.tar.gz
scummvm-rg350-1041067a0c1ca2ac528338d99eaa1df677538265.tar.bz2
scummvm-rg350-1041067a0c1ca2ac528338d99eaa1df677538265.zip
SCI: instead of queueing inside midiparser, we are queueing now globally in SciMusic, also some little cleanup
svn-id: r50130
Diffstat (limited to 'engines/sci/sound/midiparser_sci.h')
-rw-r--r--engines/sci/sound/midiparser_sci.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h
index 5abffdb3a1..dbd37018b1 100644
--- a/engines/sci/sound/midiparser_sci.h
+++ b/engines/sci/sound/midiparser_sci.h
@@ -55,6 +55,10 @@ class MidiParser_SCI : public MidiParser {
public:
MidiParser_SCI(SciVersion soundVersion, SciMusic *music);
~MidiParser_SCI();
+
+ void mainThreadBegin();
+ void mainThreadEnd();
+
bool loadMusic(SoundResource::Track *track, MusicEntry *psnd, int channelFilterMask, SciVersion soundVersion);
bool loadMusic(byte *, uint32) {
return false;
@@ -77,16 +81,11 @@ public:
const byte *getMixedData() const { return _mixedData; }
void tryToOwnChannels();
- void sendToDriver(uint32 b);
+ void sendFromScriptToDriver(uint32 midi);
+ void sendToDriver(uint32 midi);
void sendToDriver(byte status, byte firstOp, byte secondOp) {
sendToDriver(status | ((uint32)firstOp << 8) | ((uint32)secondOp << 16));
}
- void sendToDriverQueue(uint32 b);
- void sendToDriverQueue(byte status, byte firstOp, byte secondOp) {
- sendToDriverQueue(status | ((uint32)firstOp << 8) | ((uint32)secondOp << 16));
- }
-
- void sendQueueToDriver();
protected:
void parseNextEvent(EventInfo &info);
@@ -96,6 +95,9 @@ protected:
SciMusic *_music;
+ // this is set, when main thread calls us -> we send commands to queue instead to driver
+ bool _mainThreadCalled;
+
SciVersion _soundVersion;
byte *_mixedData;
SoundResource::Track *_track;
@@ -112,9 +114,6 @@ protected:
bool _channelUsed[16];
int16 _channelRemap[16];
bool _channelMuted[16];
-
- int _manualCommandCount;
- uint32 _manualCommands[200];
};
} // End of namespace Sci