aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-11-15 10:44:58 +0000
committerJames Brown2002-11-15 10:44:58 +0000
commitd80b31f931c3f935567ca2837e2ee281fdf05bea (patch)
tree4772d1df0e100d502fe4bb15fc4f71524998f12e
parent22c3532f25f56cc2089f237657a9b6f5ff2de93b (diff)
downloadscummvm-rg350-d80b31f931c3f935567ca2837e2ee281fdf05bea.tar.gz
scummvm-rg350-d80b31f931c3f935567ca2837e2ee281fdf05bea.tar.bz2
scummvm-rg350-d80b31f931c3f935567ca2837e2ee281fdf05bea.zip
638809: Simon startup speedup
svn-id: r5559
-rw-r--r--simon/simon.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 50110c8081..78a9048813 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4735,15 +4735,8 @@ void SimonState::initSound()
#endif
#ifdef USE_MAD
if (_voice_type == FORMAT_MP3) {
- uint8 buf[2048];
- uint32 pos = 0;
- _voice_file->seek(0, SEEK_SET);
- while ((_voice_file->read(buf, 2048)) > 0) {
- if (pos == _voice_file->pos())
- break;
- pos = _voice_file->pos();
- }
- _voice_offsets[gss->NUM_EFFECTS_RESOURCES] = pos;
+ _voice_file->seek(0, SEEK_END);
+ _voice_offsets[gss->NUM_EFFECTS_RESOURCES] = _voice_file->pos();
}
#endif
}
@@ -4789,15 +4782,8 @@ void SimonState::initSound()
#endif
#ifdef USE_MAD
if (_effects_type == FORMAT_MP3) {
- uint8 buf[2048];
- uint32 pos = 0;
- _effects_file->seek(0, SEEK_SET);
- while ((_effects_file->read(buf, 2048)) > 0) {
- if (pos == _effects_file->pos())
- break;
- pos = _effects_file->pos();
- }
- _effects_offsets[gss->NUM_EFFECTS_RESOURCES] = pos;
+ _effects_file->seek(0, SEEK_END);
+ _effects_offsets[gss->NUM_EFFECTS_RESOURCES] = _effects_file->pos();
}
#endif
} else {