[XMP] Make volume atomic, fixed issue with invalid SetVolume received from guest

- Replaced invalid log
This commit is contained in:
Gliniak
2025-10-28 20:11:47 +01:00
parent a25bbed1c3
commit 344e8538e0
6 changed files with 12 additions and 7 deletions

View File

@@ -448,7 +448,7 @@ void AudioMediaPlayer::RemovePlaylist(uint32_t handle) {
}
X_STATUS AudioMediaPlayer::SetVolume(float volume) {
volume_ = std::min(volume, 1.0f);
volume_.store(std::min(volume, 1.0f));
std::unique_lock<xe_mutex> guard(driver_mutex_);
if (!driver_) {