From 23ee2984b20cbb802b0491ad4c528bac4e795f13 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 23 May 2011 12:20:17 +0200 Subject: 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 --- client/marshallers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/marshallers.h b/client/marshallers.h index c913a28..47faeff 100644 --- a/client/marshallers.h +++ b/client/marshallers.h @@ -26,6 +26,8 @@ typedef struct { void (*msg_SpiceMsgEmpty)(SpiceMarshaller *m, SpiceMsgEmpty *msg); void (*msg_SpiceMsgData)(SpiceMarshaller *m, SpiceMsgData *msg); + void (*msg_SpiceMsgAudioVolume)(SpiceMarshaller *m, SpiceMsgAudioVolume *msg); + void (*msg_SpiceMsgAudioMute)(SpiceMarshaller *m, SpiceMsgAudioMute *msg); void (*msgc_ack_sync)(SpiceMarshaller *m, SpiceMsgcAckSync *msg); void (*msgc_pong)(SpiceMarshaller *m, SpiceMsgPing *msg); void (*msgc_disconnecting)(SpiceMarshaller *m, SpiceMsgDisconnect *msg); -- cgit v1.2.3