本文整理汇总了C++中SoundEntry::setVolumeSmoothly方法的典型用法代码示例。如果您正苦于以下问题:C++ SoundEntry::setVolumeSmoothly方法的具体用法?C++ SoundEntry::setVolumeSmoothly怎么用?C++ SoundEntry::setVolumeSmoothly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoundEntry
的用法示例。
在下文中一共展示了SoundEntry::setVolumeSmoothly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateQueue
void SoundQueue::updateQueue() {
if (getAmbientState() & kAmbientSoundEnabled) {
SoundEntry *entry = getEntry(kSoundTagAmbient);
if (!entry || getFlags()->flag_3 || (entry && entry->getTime() > getSound()->getAmbientSoundDuration())) {
getSound()->playAmbientSound(0x45);
} else {
if (getSound()->needToChangeAmbientVolume()) {
entry->setVolumeSmoothly(getSound()->getChangedAmbientVolume());
getSound()->clearAmbientVolumeChange();
}
}
}
for (Common::List<SoundEntry *>::iterator it = _soundList.begin(); it != _soundList.end(); ++it) {
SoundEntry *entry = *it;
if (entry == NULL)
error("[SoundQueue::updateQueue] Invalid entry found in sound queue");
// 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 volume
if (!entry->update() && !(entry->getStatus() & kSoundFlagKeepAfterFinish)) {
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;
}