stopAndDeleteLater is now just stop

This commit is contained in:
Seth Alves 2017-07-11 21:21:42 -07:00
parent 3897ab2723
commit 084a989a7a
4 changed files with 3 additions and 8 deletions

View file

@ -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()) {

View file

@ -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);

View file

@ -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();
} }

View file

@ -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();
} }