diff options
| author | athrxx | 2014-04-15 14:30:32 +0200 |
|---|---|---|
| committer | athrxx | 2018-11-14 17:22:19 +0100 |
| commit | f67ca1ba4704d450a4a2b3139da46da135122c0e (patch) | |
| tree | 633a714b859e8f866e422ac1eae9f034b3ebb297 | |
| parent | 506f900f9446cc7df91c0384e70e4dc7a98cc43a (diff) | |
| download | scummvm-rg350-f67ca1ba4704d450a4a2b3139da46da135122c0e.tar.gz scummvm-rg350-f67ca1ba4704d450a4a2b3139da46da135122c0e.tar.bz2 scummvm-rg350-f67ca1ba4704d450a4a2b3139da46da135122c0e.zip | |
AUDIO: (FM-TOWNS) - remove wave memory limit
(This is basically an unnecessary emulation of a hardware limitation. EOB II will try to load approximately 70 KByte of samples for the outro sequence, which would lead to some missing sounds with the 64 Kbyte limit).
| -rw-r--r-- | audio/softsynth/fmtowns_pc98/towns_audio.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp index 2506e02c2b..7d61631936 100644 --- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp @@ -728,7 +728,11 @@ int TownsAudioInterfaceInternal::intf_loadSamples(va_list &args) { if (dest >= 65536 || size == 0 || size > 65536) return 3; if (size + dest > 65536) - return 5; + // EOB II FM-TOWNS tries to load more than 65536 bytes of wave sounds for the outro sequence. + // This means that some sfx would not play. Since we don't really need the memory limit, + // I have commented out the error return and added a warning instead. + warning("FM-TOWNS AUDIO: exceeding wave memory size by %d bytes", size + dest - 65536); + // return 5; int dwIndex = _numWaveTables - 1; for (uint32 t = _waveTablesTotalDataSize; dwIndex && (dest < t); dwIndex--) @@ -796,9 +800,13 @@ int TownsAudioInterfaceInternal::intf_loadWaveTable(va_list &args) { s->readHeader(data); _waveTablesTotalDataSize += s->size; - callback(32, _waveTablesTotalDataSize, s->size, data + 32); + int res = callback(32, _waveTablesTotalDataSize, s->size, data + 32); + if (res) { + _waveTablesTotalDataSize -= s->size; + _numWaveTables--; + } - return 0; + return res; } int TownsAudioInterfaceInternal::intf_unloadWaveTable(va_list &args) { |
