aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorJohannes Schickel2011-11-16 20:25:21 +0100
committerJohannes Schickel2011-11-16 20:31:22 +0100
commitc5ff6b431b960f599aee562baa1a15e0edcec451 (patch)
treea7fa93f99e1175adf0981e3921f6ffc0976d4e11 /engines/agi
parentd8ea08f42546518a30e4aeaaf54ded920cd7e5de (diff)
downloadscummvm-rg350-c5ff6b431b960f599aee562baa1a15e0edcec451.tar.gz
scummvm-rg350-c5ff6b431b960f599aee562baa1a15e0edcec451.tar.bz2
scummvm-rg350-c5ff6b431b960f599aee562baa1a15e0edcec451.zip
AGI: Change two local SharedPtr uses to ScopedPtr.
I took the opportunity to add two CHECKMEs to the code, which seems to load a file into memory for no real apparent reason.
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/sound_2gs.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index c5cfa125d6..b15950f31d 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -719,7 +719,10 @@ bool SoundGen2GS::loadInstrumentHeaders(Common::String &exePath, const IIgsExeIn
}
// Read the whole executable file into memory
- Common::SharedPtr<Common::SeekableReadStream> data(file.readStream(file.size()));
+ // CHECKME: Why do we read the file into memory first? It does not seem to be
+ // kept outside of this function. Is the processing of the data too slow
+ // otherwise?
+ Common::ScopedPtr<Common::SeekableReadStream> data(file.readStream(file.size()));
file.close();
// Check that we got enough data to be able to parse the instruments
@@ -769,8 +772,11 @@ bool SoundGen2GS::loadWaveFile(Common::String &wavePath, const IIgsExeInfo &exeI
Common::File file;
// Open the wave file and read it into memory
+ // CHECKME: Why do we read the file into memory first? It does not seem to be
+ // kept outside of this function. Is the processing of the data too slow
+ // otherwise?
file.open(wavePath);
- Common::SharedPtr<Common::SeekableReadStream> uint8Wave(file.readStream(file.size()));
+ Common::ScopedPtr<Common::SeekableReadStream> uint8Wave(file.readStream(file.size()));
file.close();
// Check that we got the whole wave file