mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 06:22:10 +02:00
stopAndDeleteLater is now just stop
This commit is contained in:
parent
3897ab2723
commit
084a989a7a
4 changed files with 3 additions and 8 deletions
|
@ -413,16 +413,12 @@ void AudioInjector::triggerDeleteAfterFinish() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stateHas(AudioInjectorState::Finished)) {
|
if (stateHas(AudioInjectorState::Finished)) {
|
||||||
stopAndDeleteLater();
|
stop();
|
||||||
} else {
|
} else {
|
||||||
_state |= AudioInjectorState::PendingDelete;
|
_state |= AudioInjectorState::PendingDelete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInjector::stopAndDeleteLater() {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioInjectorPointer AudioInjector::playSound(SharedSoundPointer sound, const float volume,
|
AudioInjectorPointer AudioInjector::playSound(SharedSoundPointer sound, const float volume,
|
||||||
const float stretchFactor, const glm::vec3 position) {
|
const float stretchFactor, const glm::vec3 position) {
|
||||||
if (!sound || !sound->isReady()) {
|
if (!sound || !sound->isReady()) {
|
||||||
|
|
|
@ -84,7 +84,6 @@ public slots:
|
||||||
|
|
||||||
void stop();
|
void stop();
|
||||||
void triggerDeleteAfterFinish();
|
void triggerDeleteAfterFinish();
|
||||||
void stopAndDeleteLater();
|
|
||||||
|
|
||||||
const AudioInjectorOptions& getOptions() const { return _options; }
|
const AudioInjectorOptions& getOptions() const { return _options; }
|
||||||
void setOptions(const AudioInjectorOptions& options);
|
void setOptions(const AudioInjectorOptions& options);
|
||||||
|
|
|
@ -30,7 +30,7 @@ AudioInjectorManager::~AudioInjectorManager() {
|
||||||
auto& timePointerPair = _injectors.top();
|
auto& timePointerPair = _injectors.top();
|
||||||
|
|
||||||
// ask it to stop and be deleted
|
// ask it to stop and be deleted
|
||||||
timePointerPair.second->stopAndDeleteLater();
|
timePointerPair.second->stop();
|
||||||
|
|
||||||
_injectors.pop();
|
_injectors.pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,5 +44,5 @@ ScriptAudioInjector::~ScriptAudioInjector() {
|
||||||
|
|
||||||
void ScriptAudioInjector::stopInjectorImmediately() {
|
void ScriptAudioInjector::stopInjectorImmediately() {
|
||||||
qCDebug(scriptengine) << "ScriptAudioInjector::stopInjectorImmediately called to stop audio injector immediately.";
|
qCDebug(scriptengine) << "ScriptAudioInjector::stopInjectorImmediately called to stop audio injector immediately.";
|
||||||
_injector->stopAndDeleteLater();
|
_injector->stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue