aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98
diff options
context:
space:
mode:
Diffstat (limited to 'audio/softsynth/fmtowns_pc98')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.cpp14
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) {