aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-04 13:21:35 +0000
committerMartin Kiewitz2010-01-04 13:21:35 +0000
commit01ebbcf101efc6897ec11a18ca389aed24371e77 (patch)
tree8f63c8cfe96ae192be5c5f43cfb3e624dd5b845b
parent50245ba5710df184af5b5e8f0037e87b33491cfe (diff)
downloadscummvm-rg350-01ebbcf101efc6897ec11a18ca389aed24371e77.tar.gz
scummvm-rg350-01ebbcf101efc6897ec11a18ca389aed24371e77.tar.bz2
scummvm-rg350-01ebbcf101efc6897ec11a18ca389aed24371e77.zip
SCI: channels[] work, sci0 fading still not working (volume is changed though)
svn-id: r46969
-rw-r--r--engines/sci/resource.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 1ecbff6eee..3c99c9801d 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1894,7 +1894,7 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi
_tracks = new Track[_trackCount];
_tracks->digitalChannelNr = -1;
_tracks->type = TRACKTYPE_NONE;
- _tracks->channelCount = 1;
+ _tracks->channelCount = 16;
// Digital sample data included? -> Add an additional channel
if (resource->data[0] == 2)
_tracks->channelCount++;
@@ -1908,10 +1908,17 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi
channel->data = resource->data + 0x21;
channel->size = resource->size - 0x21;
}
- if (_tracks->channelCount == 2) {
+ data = resource->data + 1;
+ for (channelNr = 0; channelNr < 16; channelNr++) {
+ channel = &_tracks->channels[channelNr];
+ channel->number = channelNr;
+ channel->poly = *data >> 4;
+ data++;
+ }
+ if (_tracks->channelCount == 17) {
// Digital sample data included
- _tracks->digitalChannelNr = 1;
- sampleChannel = &_tracks->channels[1];
+ _tracks->digitalChannelNr = 16;
+ sampleChannel = &_tracks->channels[16];
// we need to find 0xFC (channel terminator) within the data
data = channel->data;
dataEnd = channel->data + channel->size;