SCI32: Rewrite digital audio engine
This provides a complete implementation of kDoAudio through SCI2.1mid, plus partial implementation of SCI3 features. Digital audio calls shunted through kDoSound have also been updated to go through the SCI32 audio mixer, though these shunts are a bit hacky because the ScummVM implementation of kDoSound does not currently match how SSCI kDoSound is designed. It is probably possible in the future to just replace the SCI1.1 audio code (audio.cpp) with the new SCI32 code, since the major differences seem to be that (1) SCI1.1 only supported one digital audio playback channel (this is configurable already), (2) it had extra commands for CD audio playback and queued sample playback.
This commit is contained in:
parent
5d3385750d
commit
46551fd4b5
19 changed files with 2341 additions and 56 deletions
|
@ -26,6 +26,9 @@
|
|||
#include "common/fs.h"
|
||||
#include "common/macresman.h"
|
||||
#include "common/textconsole.h"
|
||||
#ifdef ENABLE_SCI32
|
||||
#include "common/memstream.h"
|
||||
#endif
|
||||
|
||||
#include "sci/resource.h"
|
||||
#include "sci/resource_intern.h"
|
||||
|
@ -221,6 +224,12 @@ void Resource::writeToStream(Common::WriteStream *stream) const {
|
|||
stream->write(data, size);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SCI32
|
||||
Common::SeekableReadStream *Resource::makeStream() const {
|
||||
return new Common::MemoryReadStream(data, size, DisposeAfterUse::NO);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32 Resource::getAudioCompressionType() const {
|
||||
return _source->getAudioCompressionType();
|
||||
}
|
||||
|
@ -229,7 +238,6 @@ uint32 AudioVolumeResourceSource::getAudioCompressionType() const {
|
|||
return _audioCompressionType;
|
||||
}
|
||||
|
||||
|
||||
ResourceSource::ResourceSource(ResSourceType type, const Common::String &name, int volNum, const Common::FSNode *resFile)
|
||||
: _sourceType(type), _name(name), _volumeNumber(volNum), _resourceFile(resFile) {
|
||||
_scanned = false;
|
||||
|
@ -1445,13 +1453,18 @@ void ResourceManager::readResourcePatchesBase36() {
|
|||
files.clear();
|
||||
|
||||
// audio36 resources start with a @, A, or B
|
||||
// sync36 resources start with a #
|
||||
// sync36 resources start with a #, S, or T
|
||||
if (i == kResourceTypeAudio36) {
|
||||
SearchMan.listMatchingMembers(files, "@???????.???");
|
||||
SearchMan.listMatchingMembers(files, "A???????.???");
|
||||
SearchMan.listMatchingMembers(files, "B???????.???");
|
||||
} else
|
||||
} else {
|
||||
SearchMan.listMatchingMembers(files, "#???????.???");
|
||||
#ifdef ENABLE_SCI32
|
||||
SearchMan.listMatchingMembers(files, "S???????.???");
|
||||
SearchMan.listMatchingMembers(files, "T???????.???");
|
||||
#endif
|
||||
}
|
||||
|
||||
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
|
||||
name = (*x)->getName();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue