aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/sound.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2013-08-01 23:36:20 +0200
committerAlyssa Milburn2013-08-02 00:01:11 +0200
commit5b6d3078c9174f0b932b88bf9aeef7c11c3cb190 (patch)
tree1e3d6f4097b18e14968625442283f4fb97fc787f /engines/tony/sound.cpp
parent9c02f5b59355590219fb37a0f1ec2b325acae9eb (diff)
downloadscummvm-rg350-5b6d3078c9174f0b932b88bf9aeef7c11c3cb190.tar.gz
scummvm-rg350-5b6d3078c9174f0b932b88bf9aeef7c11c3cb190.tar.bz2
scummvm-rg350-5b6d3078c9174f0b932b88bf9aeef7c11c3cb190.zip
TONY: Add a hack to work around amigaos4 issues.
Diffstat (limited to 'engines/tony/sound.cpp')
-rw-r--r--engines/tony/sound.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 90ae241db0..547f31906e 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -500,7 +500,13 @@ bool FPStream::loadFile(const Common::String &fileName, uint32 codec, int bufSiz
break;
case FPCODEC_ADPCM:
+#ifdef __amigaos4__
+ // HACK: AmigaOS 4 has weird performance problems with reading in the audio thread,
+ // so we read the whole stream into memory.
+ _rewindableStream = Audio::makeADPCMStream(_file.readStream(_size), DisposeAfterUse::YES, 0, Audio::kADPCMDVI, 44100, 2);
+#else
_rewindableStream = Audio::makeADPCMStream(&_file, DisposeAfterUse::NO, 0, Audio::kADPCMDVI, 44100, 2);
+#endif
break;
default: