VIDEO: Recreate the audiostream if necessary
svn-id: r55324
This commit is contained in:
parent
adbeb20f3b
commit
679a8d6ad6
1 changed files with 6 additions and 1 deletions
|
@ -1420,13 +1420,18 @@ void IMDDecoder::nextSoundSlice(bool hasNextCmd) {
|
|||
bool IMDDecoder::initialSoundSlice(bool hasNextCmd) {
|
||||
int dataLength = _soundSliceSize * _soundSlicesCount;
|
||||
|
||||
if (hasNextCmd || !_soundEnabled || !_audioStream) {
|
||||
if (hasNextCmd || !_soundEnabled) {
|
||||
// Skip sound
|
||||
|
||||
_stream->skip(dataLength);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_audioStream) {
|
||||
_audioStream = Audio::makeQueuingAudioStream(_soundFreq, false);
|
||||
_soundStage = kSoundLoaded;
|
||||
}
|
||||
|
||||
// Read, convert, queue
|
||||
|
||||
byte *soundBuf = (byte *)malloc(dataLength);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue