aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2009-12-15 08:18:57 +0000
committerMax Horn2009-12-15 08:18:57 +0000
commitf692015301e6122b7d071a0ce52c81faa6c3b69f (patch)
treee72e430a064eb6e8cf70610cb0e8e7154a9ee57d /engines/tinsel/sound.cpp
parenteb9b31782f094578d0d824962a5660d697e71486 (diff)
downloadscummvm-rg350-f692015301e6122b7d071a0ce52c81faa6c3b69f.tar.gz
scummvm-rg350-f692015301e6122b7d071a0ce52c81faa6c3b69f.tar.bz2
scummvm-rg350-f692015301e6122b7d071a0ce52c81faa6c3b69f.zip
Got rid of ReadStream::ioFailed()
svn-id: r46379
Diffstat (limited to 'engines/tinsel/sound.cpp')
-rw-r--r--engines/tinsel/sound.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index d8ed39006a..ece054138a 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -98,12 +98,12 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
// move to correct position in the sample file
_sampleStream.seek(dwSampleIndex);
- if (_sampleStream.ioFailed() || (uint32)_sampleStream.pos() != dwSampleIndex)
+ if (_sampleStream.eos() || _sampleStream.err() || (uint32)_sampleStream.pos() != dwSampleIndex)
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
// read the length of the sample
uint32 sampleLen = _sampleStream.readUint32LE();
- if (_sampleStream.ioFailed())
+ if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
if (TinselV1PSX) {
@@ -244,12 +244,12 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
// move to correct position in the sample file
_sampleStream.seek(dwSampleIndex);
- if (_sampleStream.ioFailed() || (uint32)_sampleStream.pos() != dwSampleIndex)
+ if (_sampleStream.eos() || _sampleStream.err() || (uint32)_sampleStream.pos() != dwSampleIndex)
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
// read the length of the sample
uint32 sampleLen = _sampleStream.readUint32LE();
- if (_sampleStream.ioFailed())
+ if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
if (sampleLen & 0x80000000) {
@@ -263,11 +263,11 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
for (int32 i = 0; i < sub; i++) {
sampleLen = _sampleStream.readUint32LE();
_sampleStream.skip(sampleLen);
- if (_sampleStream.ioFailed())
+ if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
}
sampleLen = _sampleStream.readUint32LE();
- if (_sampleStream.ioFailed())
+ if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
}
@@ -553,7 +553,7 @@ void SoundManager::openSampleFiles() {
/*
// gen length of the largest sample
sampleBuffer.size = _sampleStream.readUint32LE();
- if (_sampleStream.ioFailed())
+ if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
*/
}