diff options
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r-- | engines/sci/resource.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 862f9cc4f4..2f1110cc5a 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2152,4 +2152,18 @@ int SoundResource::getChannelFilterMask(int hardwareMask, bool wantsRhythm) { return channelMask; } +byte SoundResource::getInitialVoiceCount(byte channel) { + byte *data = _innerResource->data; + + if (_soundVersion > SCI_VERSION_0_LATE) + return 0; // TODO + + data++; // Skip over digital sample flag + + if (_soundVersion == SCI_VERSION_0_EARLY) + return data[channel] >> 4; + else + return data[channel * 2]; +} + } // End of namespace Sci |