6 #ifndef ZDK_NET_AudioEndpointControl_h
7 #define ZDK_NET_AudioEndpointControl_h
9 #include "native_shared_ptr.h"
10 #include "PublicInterfaces.h"
11 #include "AudioRoutingEndpoint.h"
12 #include "EchoCancellationType.h"
13 #include "AudioSourcePresetType.h"
14 #include "AudioDevice.h"
15 #include "AutomaticGainControlType.h"
17 #include "AudioResampler.h"
18 #include "AudioFileFormat.h"
20 #include "AudioOutputDeviceType.h"
21 #include "AudioEventsHandler.h"
25 using namespace System::Collections::Generic;
29 ref class AudioDevice;
31 ref class AudioEventsHandler;
44 static bool RegisterEventListeners()
46 std::shared_ptr<GeneralStatusEventListener> AudioEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
47 AudioEventsHandler_Listener = AudioEventsHandler_Listener_tmp.get();
48 listenersMap->try_emplace(
reinterpret_cast<intptr_t
>(AudioEventsHandler_Listener), std::move(AudioEventsHandler_Listener_tmp));
52 static bool RegisteredEventListeners = RegisterEventListeners();
54 ZDK::IAudioEndpointControl* cppRef =
nullptr;
68 property ZDK_NET::AudioRoutingEndpoint AudioEndpoint
70 ZDK_NET::AudioRoutingEndpoint get();
71 void set(ZDK_NET::AudioRoutingEndpoint value);
82 property double MicLevel
85 void set(
double value);
99 property double OutputLevel
102 void set(
double value);
116 property double RingLevel
119 void set(
double value);
130 property ZDK_NET::EchoCancellationType EchoCancellation
132 ZDK_NET::EchoCancellationType get();
133 void set(ZDK_NET::EchoCancellationType value);
145 property bool HighPassFilter
148 void set(
bool value);
163 property float PreAmplifier
166 void set(
float value);
178 property bool NoiseSuppression
181 void set(
bool value);
192 property ZDK_NET::AudioSourcePresetType AudioSourcePreset
194 ZDK_NET::AudioSourcePresetType get();
195 void set(ZDK_NET::AudioSourcePresetType value);
204 property List<AudioDevice^>^ AudioDevices
206 List<AudioDevice^>^ get();
218 property bool MicBoost
221 void set(
bool value);
240 property bool EnableFixedSpeakerGain
243 void set(
bool value);
276 property double FixedSpeakerGain
279 void set(
double value);
568 virtual long long Handle()
override;
570 virtual void Initialize()
override;
572 virtual void ReleaseReference()
override;
ZDK_NET::Result ^ SetAutomaticGainControlMode(ZDK_NET::AutomaticGainControlType type, float gain)
Configures the Automatic Gain Control (AGC) filter working mode.
API invocation status result.
Definition: Result.h:24
ZDK_NET::Result ^ StartSound(ZDK_NET::Sound^ sound, ZDK_NET::AudioOutputDeviceType outputType)
Start playback of a sound.
ZDK_NET::AudioDevice ^ GetCurrentOutputDevice()
Gets the selected output audio device.
ZDK_NET::Result ^ SetCurrentRingDevice(ZDK_NET::AudioDevice^ device)
Select the ringing audio device.
Audio device description.
Definition: AudioDevice.h:22
void AddStatusListener(ZDK_NET::AudioEventsHandler^ value)
Adds audio events listener.
ZDK_NET::Result ^ SetCurrentOutputDevice(ZDK_NET::AudioDevice^ device)
Select the output audio device.
ZDK_NET::Result ^ MuteInput(bool value)
Mute or unmute the input device/microphone.
ZDK_NET::Result ^ Resampler(ZDK_NET::AudioResampler value)
Configures the audio resampler to be used.
ZDK Sound description.
Definition: Sound.h:21
ZDK_NET::Sound ^ AddSoundFromMemory(unsigned char *data, int length, int sampleLen, int frequency, bool repeat, int pauseMs)
Load a sound from a memory buffer.
ZDK_NET::Result ^ SetCurrentInputDevice(ZDK_NET::AudioDevice^ device)
Select the input audio device.
ZDK_NET::Result ^ StopSound(ZDK_NET::Sound^ sound, ZDK_NET::AudioOutputDeviceType outputType)
Stops playback of a sound.
Definition: GeneralStatusEventListener.h:90
ZDK_NET::AudioDevice ^ GetCurrentRingDevice()
Gets the selected ringing audio device.
ZDK_NET::Result ^ StopPlayback()
Stops any playback.
ZDK_NET::Result ^ MuteOutput(bool value)
Mute or unmute the output device/speaker.
ZDK_NET::AudioDevice ^ GetDeviceByName(System::String^ name)
Gets an audio device with the given name if exists, otherwise - nullptr.
ZDK_NET::AudioDevice ^ GetCurrentInputDevice()
Gets the selected input audio device.
Audio endpoint's main entry point.
Definition: AudioEndpointControl.h:39
Definition: AudioEventsHandler.h:114
void DropStatusListener(ZDK_NET::AudioEventsHandler^ value)
Drops audio events listener.
ZDK_NET::Result ^ StartPlayback(ZDK_NET::Sound^ sound, ZDK_NET::AudioOutputDeviceType monitorDevice)
Starts playback over the current call.
ZDK_NET::Result ^ HostApi(ZDK_NET::HostAPI value)
Configures the audio host API to be used.
ZDK_NET::Sound ^ AddSoundFromFile(System::String^ filePath, ZDK_NET::AudioFileFormat fileFormat, bool repeat, int pauseMs)
Load a sound from a file.
ZDK_NET::AutomaticGainControlType GetAutomaticGainControlMode()
Gets the configured Automatic Gain Control (AGC) filter working mode.
ZDK_NET::Result ^ SetCallRecordingNotifySound(ZDK_NET::Sound^ sound, ZDK_NET::AudioOutputDeviceType monitorDevice)
Sets the sound to be played over the current call on every recording start.
float GetAutomaticGainControlGain()
Gets the configured Automatic Gain Control (AGC) fixed gain.