aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-12-25 22:58:45 +0000
committerMartin Kiewitz2009-12-25 22:58:45 +0000
commit46eb68090c36463f4683387ccc586ce3588af5b4 (patch)
tree895c220b13ba03504f90d8d86526b64343be0fea /engines
parent4dbb9c0806abc83ab40db21728e616a9c31dfbab (diff)
downloadscummvm-rg350-46eb68090c36463f4683387ccc586ce3588af5b4.tar.gz
scummvm-rg350-46eb68090c36463f4683387ccc586ce3588af5b4.tar.bz2
scummvm-rg350-46eb68090c36463f4683387ccc586ce3588af5b4.zip
SCI/newmusic: Added comments about sound resource headers
svn-id: r46567
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/resource.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index b02c05c2bf..0ec446f141 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1948,8 +1948,12 @@ int SoundResource::getChannelFilterMask(int hardwareMask) {
reverseHardwareMask = 0x08;
break;
}
- // Control-Channel -> where bit 0 is not set, bit 3 is set
data++; // Skip over digital sample flag
+ // Now all 16 channels follow. Each one is specified by a single byte
+ // Upper 4 bits of the byte is a voices count
+ // Lower 4 bits -> bit 0 means use as Adlib driver
+ // bit 1 means use as PCjr driver
+ // bit 3 means is control channel (bit 0 needs to be unset)
for (int channelNr = 0; channelNr < 16; channelNr++) {
channelMask = channelMask >> 1;
if (*data & hardwareMask) {
@@ -1969,6 +1973,9 @@ int SoundResource::getChannelFilterMask(int hardwareMask) {
case SCI_VERSION_0_LATE:
data++; // Skip over digital sample flag
+ // Now all 16 channels follow. Each one is specified by 2 bytes
+ // 1st byte is voices count
+ // 2nd byte is play-mask which specifies if the channel is supposed to get played by the corresponding hardware
for (int channelNr = 0; channelNr < 16; channelNr++) {
data++;
channelMask = channelMask >> 1;