Top | ![]() |
![]() |
![]() |
![]() |
void | (*CallAudioCallback) () |
gboolean | call_audio_init () |
gboolean | call_audio_is_inited () |
void | call_audio_deinit () |
gboolean | call_audio_select_mode () |
gboolean | call_audio_select_mode_async () |
CallAudioMode | call_audio_get_audio_mode () |
gboolean | call_audio_enable_speaker () |
gboolean | call_audio_enable_speaker_async () |
CallAudioSpeakerState | call_audio_get_speaker_state () |
gboolean | call_audio_mute_mic () |
gboolean | call_audio_mute_mic_async () |
CallAudioMicState | call_audio_get_mic_state () |
To use the library call call_audio_init()
.
After initializing the library you can send audio routing requests using the
library functions.
When your application finishes call call_audio_deinit()
to free resources:
1 2 3 4 5 6 7 8 9 10 11 12 |
#include <libcallaudio.h> int main(void) { g_autoptr(GError) err = NULL; if (call_audio_init(&err)) { g_error("%s", err->message); } ... call_audio_deinit(); return 0; } |
gboolean
call_audio_init (GError **error
);
Initialize libcallaudio. This must be called before any other functions.
gboolean
call_audio_is_inited (void
);
Query whether libcallaudio has been initialized before. This can be used to ensure library calls will perform actual actions.
void
call_audio_deinit (void
);
Uninitialize the library when no longer used. Usually called on program shutdown.
gboolean call_audio_select_mode (CallAudioMode mode
,GError **error
);
Select the audio mode to use. This function is synchronous, and will return only once the operation has been executed.
gboolean call_audio_select_mode_async (CallAudioMode mode
,CallAudioCallback cb
,gpointer data
);
Select the audio mode to use.
gboolean call_audio_enable_speaker (gboolean enable
,GError **error
);
Enable or disable speaker output. This function is synchronous, and will return only once the operation has been executed.
gboolean call_audio_enable_speaker_async (gboolean enable
,CallAudioCallback cb
,gpointer data
);
Enable or disable speaker output.
CallAudioSpeakerState
call_audio_get_speaker_state (void
);
CALL_AUDIO_SPEAKER_ON
if the speaker is on, CALL_AUDIO_SPEAKER_OFF
if it is off or
CALL_AUDIO_SPEAKER_UNKNOWN
if the state is not known.
gboolean call_audio_mute_mic (gboolean mute
,GError **error
);
Mute or unmute microphone. This function is synchronous, and will return only once the operation has been executed.
gboolean call_audio_mute_mic_async (gboolean mute
,CallAudioCallback cb
,gpointer data
);
Mute or unmute microphone.
CallAudioMicState
call_audio_get_mic_state (void
);
CALL_AUDIO_MIC_ON
if the microphone is on, CALL_AUDIO_MIC_OFF
if it is off or
CALL_AUDIO_MIC_UNKNOWN
if the state is not known.