From 5cde25cb809ed1b10c4606bb32bdc0a39a1ccdf8 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sun, 4 Aug 2024 01:39:50 +0300 Subject: [PATCH] update alspeaker->stopped warning status to probably false-positive --- src/audio/AL/ALAudio.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio/AL/ALAudio.cpp b/src/audio/AL/ALAudio.cpp index ed84a59c..fe0891e3 100644 --- a/src/audio/AL/ALAudio.cpp +++ b/src/audio/AL/ALAudio.cpp @@ -151,7 +151,7 @@ void ALStream::update(double delta) { } ALSpeaker* alspeaker = dynamic_cast(p_speaker); assert(alspeaker != nullptr); - if (alspeaker->stopped) { //-V522 + if (alspeaker->stopped) { this->speaker = 0; return; } @@ -161,7 +161,8 @@ void ALStream::update(double delta) { unqueueBuffers(alsource); uint preloaded = enqueueBuffers(alsource); - if (p_speaker->isStopped() && !alspeaker->stopped) { //FIXME: !alspeaker->stopped always true //-V560 + // alspeaker->stopped is assigned to false at ALSpeaker::play(...) + if (p_speaker->isStopped() && !alspeaker->stopped) { //TODO: -V560 false-positive? if (preloaded) { p_speaker->play(); } else {