本文整理汇总了C++中SoundEntry::updateSound方法的典型用法代码示例。如果您正苦于以下问题:C++ SoundEntry::updateSound方法的具体用法?C++ SoundEntry::updateSound怎么用?C++ SoundEntry::updateSound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoundEntry
的用法示例。
在下文中一共展示了SoundEntry::updateSound方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateQueue
void SoundQueue::updateQueue() {
Common::StackLock locker(_mutex);
++_flag;
if (getSoundState() & kSoundState1) {
SoundEntry *entry = getEntry(kSoundType1);
if (!entry || getFlags()->flag_3 || (entry && entry->getTime() > getSound()->getLoopingSoundDuration())) {
getSound()->playLoopingSound(0x45);
} else {
if (getSound()->getData1() && getSound()->getData2() >= getSound()->getData1()) {
entry->update(getSound()->getData0());
getSound()->setData1(0);
}
}
}
for (Common::List<SoundEntry *>::iterator it = _soundList.begin(); it != _soundList.end(); ++it) {
SoundEntry *entry = *it;
// Original removes the entry data from the cache and sets the archive as not loaded
// and if the sound data buffer is not full, loads a new entry to be played based on
// its priority and filter id
if (!entry->updateSound() && !(entry->getStatus().status3 & 0x8)) {
entry->close();
SAFE_DELETE(entry);
it = _soundList.reverse_erase(it);
}
}
// Original update the current entry, loading another set of samples to be decoded
getFlags()->flag_3 = false;
--_flag;
}