Commit 029c499b authored by Max Kellermann's avatar Max Kellermann

output/pipewire: use std::fill_n()

parent 0ba867ec
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <boost/lockfree/spsc_queue.hpp> #include <boost/lockfree/spsc_queue.hpp>
#include <algorithm>
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
...@@ -293,9 +294,7 @@ PipeWireOutput::SetVolume(float _volume) ...@@ -293,9 +294,7 @@ PipeWireOutput::SetVolume(float _volume)
if (stream != nullptr && !restore_volume) { if (stream != nullptr && !restore_volume) {
float vol[MAX_CHANNELS]; float vol[MAX_CHANNELS];
std::fill_n(vol, channels, newvol);
for (unsigned i = 0; i < channels; i++)
vol[i] = newvol;
if (pw_stream_set_control(stream, if (pw_stream_set_control(stream,
SPA_PROP_channelVolumes, channels, vol, SPA_PROP_channelVolumes, channels, vol,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment