diff options
author | Max Horn | 2009-12-15 08:18:57 +0000 |
---|---|---|
committer | Max Horn | 2009-12-15 08:18:57 +0000 |
commit | f692015301e6122b7d071a0ce52c81faa6c3b69f (patch) | |
tree | e72e430a064eb6e8cf70610cb0e8e7154a9ee57d /engines/tinsel/sound.cpp | |
parent | eb9b31782f094578d0d824962a5660d697e71486 (diff) | |
download | scummvm-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.cpp | 14 |
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)); */ } |