Merge remote-tracking branches 'neheb/1', 'neheb/2', 'neheb/3', 'neheb/4' and 'neheb/5'

This commit is contained in:
Max Kellermann
2021-11-20 07:55:24 +01:00
72 changed files with 211 additions and 211 deletions

View File

@@ -52,7 +52,7 @@ mixer_open(Mixer *mixer)
{
assert(mixer != nullptr);
const std::lock_guard<Mutex> protect(mixer->mutex);
const std::scoped_lock<Mutex> protect(mixer->mutex);
if (mixer->open)
return;
@@ -82,7 +82,7 @@ mixer_close(Mixer *mixer)
{
assert(mixer != nullptr);
const std::lock_guard<Mutex> protect(mixer->mutex);
const std::scoped_lock<Mutex> protect(mixer->mutex);
if (mixer->open)
mixer_close_internal(mixer);
@@ -119,7 +119,7 @@ mixer_get_volume(Mixer *mixer)
if (mixer->plugin.global && !mixer->failed)
mixer_open(mixer);
const std::lock_guard<Mutex> protect(mixer->mutex);
const std::scoped_lock<Mutex> protect(mixer->mutex);
if (mixer->open) {
try {
@@ -143,7 +143,7 @@ mixer_set_volume(Mixer *mixer, unsigned volume)
if (mixer->plugin.global && !mixer->failed)
mixer_open(mixer);
const std::lock_guard<Mutex> protect(mixer->mutex);
const std::scoped_lock<Mutex> protect(mixer->mutex);
if (mixer->open)
mixer->SetVolume(volume);

View File

@@ -128,13 +128,13 @@ private:
}
[[gnu::pure]]
double GetNormalizedVolume() const noexcept {
[[nodiscard]] double GetNormalizedVolume() const noexcept {
return get_normalized_playback_volume(elem,
SND_MIXER_SCHN_FRONT_LEFT);
}
[[gnu::pure]]
unsigned GetPercentVolume() const noexcept {
[[nodiscard]] unsigned GetPercentVolume() const noexcept {
return NormalizedToPercent(GetNormalizedVolume());
}