bool SCXTrack::openSound(Common::String soundName, Common::SeekableReadStream *file) { _soundName = soundName; Audio::RewindableAudioStream *scxStream = makeSCXStream(file, DisposeAfterUse::YES); if (_soundType == Audio::Mixer::kMusicSoundType) _stream = Audio::makeLoopingAudioStream(scxStream, 0); else _stream = scxStream; _handle = new Audio::SoundHandle(); return true; }
bool SCXTrack::openSound(const Common::String &filename, const Common::String &soundName, const Audio::Timestamp *start) { Common::SeekableReadStream *file = g_resourceloader->openNewStreamFile(filename); if (!file) { Debug::debug(Debug::Sound, "Stream for %s not open", soundName.c_str()); return false; } _soundName = soundName; Audio::RewindableAudioStream *scxStream = makeSCXStream(file, start, DisposeAfterUse::YES); _stream = scxStream; _handle = new Audio::SoundHandle(); return true; }