From 1cd8f6f4f88f7717f0fcafbb5d47de0af59d5fb7 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 21 Sep 2023 15:28:58 -0700 Subject: Stream audio levels to and from viewers via DataChannels --- indra/llwebrtc/llwebrtc.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/llwebrtc/llwebrtc.h') diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index a6e754684e..f1ba1620e3 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -45,6 +45,7 @@ namespace llwebrtc { LLSYMEXPORT void init(); +LLSYMEXPORT void terminate(); struct LLWebRTCIceCandidate { @@ -69,8 +70,7 @@ typedef std::vector LLWebRTCVoiceDeviceList; class LLWebRTCDevicesObserver { public: - virtual void OnRenderDevicesChanged(const LLWebRTCVoiceDeviceList &render_devices) = 0; - virtual void OnCaptureDevicesChanged(const LLWebRTCVoiceDeviceList &capture_devices) = 0; + virtual void OnDevicesChanged(const LLWebRTCVoiceDeviceList &render_devices, const LLWebRTCVoiceDeviceList &capture_devices) = 0; }; class LLWebRTCDeviceInterface @@ -89,11 +89,20 @@ class LLWebRTCDeviceInterface virtual double getTuningMicrophoneEnergy() = 0; }; +class LLWebRTCAudioObserver +{ + public: + virtual void OnAudioLevel(float level) = 0; +}; + class LLWebRTCAudioInterface { public: + virtual void setAudioObserver(LLWebRTCAudioObserver *observer) = 0; + virtual void unsetAudioObserver(LLWebRTCAudioObserver *observer) = 0; virtual void setMute(bool mute) = 0; virtual void setSpeakerVolume(float volume) = 0; // volume between 0.0 and 1.0 + virtual void requestAudioLevel() = 0; }; class LLWebRTCDataObserver -- cgit v1.2.3