Tweak makeVOCDiskStream
* now takes a SeekableReadStream *pointer* like (almost) all other audiostream factories * fix potential memory leak in it * rename takeOwnershipOfStream to disposeAfterUse for consistency svn-id: r48184
This commit is contained in:
parent
50116130ef
commit
f24cc1c8be
6 changed files with 28 additions and 22 deletions
|
@ -588,7 +588,7 @@ void ToucheEngine::res_loadSound(int priority, int num) {
|
|||
uint32 size;
|
||||
const uint32 offs = res_getDataOffset(kResourceTypeSound, num, &size);
|
||||
_fData.seek(offs);
|
||||
Audio::AudioStream *stream = Audio::makeVOCStream(_fData, Audio::FLAG_UNSIGNED);
|
||||
Audio::AudioStream *stream = Audio::makeVOCStream(&_fData, Audio::FLAG_UNSIGNED);
|
||||
if (stream) {
|
||||
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream);
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ void ToucheEngine::res_loadSpeechSegment(int num) {
|
|||
return;
|
||||
}
|
||||
_fSpeech[i].seek(offs);
|
||||
stream = Audio::makeVOCStream(_fSpeech[i], Audio::FLAG_UNSIGNED);
|
||||
stream = Audio::makeVOCStream(&_fSpeech[i], Audio::FLAG_UNSIGNED);
|
||||
} else {
|
||||
if (num >= 750) {
|
||||
num -= 750;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue