diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index b665dd280..7fbd16597 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -53,6 +53,7 @@ #include +#include #include #include @@ -293,9 +294,7 @@ PipeWireOutput::SetVolume(float _volume) if (stream != nullptr && !restore_volume) { float vol[MAX_CHANNELS]; - - for (unsigned i = 0; i < channels; i++) - vol[i] = newvol; + std::fill_n(vol, channels, newvol); if (pw_stream_set_control(stream, SPA_PROP_channelVolumes, channels, vol,