| 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 () |
| gboolean | call_audio_enable_speaker () |
| gboolean | call_audio_enable_speaker_async () |
| gboolean | call_audio_mute_mic () |
| gboolean | call_audio_mute_mic_async () |
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.
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.