mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse: update per channel volumes
Use the channelVolume property to update the individual channel volumes. Update property values to match pulseaudio. Handle the case where the number of channels changes. In pulse this can normally never happen. Emit a remove and add of the node when this happens as to not confuse pulse clients.
This commit is contained in:
parent
5e2b740ee0
commit
69ad904b63
4 changed files with 211 additions and 104 deletions
|
|
@ -246,6 +246,8 @@ struct global {
|
|||
uint32_t monitor;
|
||||
float volume;
|
||||
bool mute;
|
||||
uint32_t n_channel_volumes;
|
||||
float channel_volumes[SPA_AUDIO_MAX_CHANNELS];
|
||||
} node_info;
|
||||
/* for devices */
|
||||
struct {
|
||||
|
|
@ -382,7 +384,8 @@ struct pa_stream {
|
|||
uint32_t buffer_size;
|
||||
uint32_t buffer_offset;
|
||||
|
||||
float volume;
|
||||
uint32_t n_channel_volumes;
|
||||
float channel_volumes[SPA_AUDIO_MAX_CHANNELS];
|
||||
bool mute;
|
||||
pa_operation *drain;
|
||||
uint64_t queued;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue