output/pipewire: make field "channels" unsigned

This commit is contained in:
Max Kellermann 2021-10-21 19:59:22 +02:00
parent 32851d1bc7
commit 866d147122

View File

@ -85,7 +85,7 @@ class PipeWireOutput final : AudioOutput {
float volume = 1.0;
PipeWireMixer *mixer = nullptr;
int channels;
unsigned channels;
/**
* The active sample format, needed for PcmSilence().
@ -293,11 +293,10 @@ PipeWireOutput::SetVolume(float _volume)
if (stream != nullptr && !restore_volume) {
float vol[SPA_AUDIO_MAX_CHANNELS];
int i;
for (i = 0; i < channels; i++) {
for (unsigned i = 0; i < channels; i++)
vol[i] = newvol;
}
if (pw_stream_set_control(stream,
SPA_PROP_channelVolumes, channels, vol,
0) != 0)