mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2026-08-11 01:51:35 +00:00
sndworker: add AudioVolume/AudioMute messages
These messages allow the guest to send the audio device volume to the
client. It uses an arbitrary scale of 16bits, which works good enough
for now.
Save VolumeState in {Playback,Record}State, so that we can send the
current volume on channel connection.
Note about future improvements:
- add exact dB support
- add client to guest volume change
Updated since v2:
- bumped record and playback interface minor version to allow
conditional compilation
Updated since v1:
- sync record volume on connection too
This commit is contained in:
parent
bbd93cdb6b
commit
da5cad88e3
13
spice.proto
13
spice.proto
@ -926,6 +926,15 @@ enum16 audio_fmt {
|
||||
S16,
|
||||
};
|
||||
|
||||
message AudioVolume {
|
||||
uint8 nchannels;
|
||||
uint16 volume[nchannels] @end;
|
||||
};
|
||||
|
||||
message AudioMute {
|
||||
uint8 mute;
|
||||
};
|
||||
|
||||
channel PlaybackChannel : BaseChannel {
|
||||
server:
|
||||
message {
|
||||
@ -947,6 +956,8 @@ channel PlaybackChannel : BaseChannel {
|
||||
} start;
|
||||
|
||||
Empty stop;
|
||||
AudioVolume volume;
|
||||
AudioMute mute;
|
||||
};
|
||||
|
||||
channel RecordChannel : BaseChannel {
|
||||
@ -958,6 +969,8 @@ channel RecordChannel : BaseChannel {
|
||||
} start = 101;
|
||||
|
||||
Empty stop;
|
||||
AudioVolume volume;
|
||||
AudioMute mute;
|
||||
client:
|
||||
message {
|
||||
uint32 time;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user