Header for audio.c.
More...
#include <glib.h>
Go to the source code of this file.
|
GSList * | audio_get_card_list (void) |
|
GSList * | audio_get_channel_list (const char *card) |
|
Audio * | audio_new (void) |
|
void | audio_free (Audio *audio) |
|
void | audio_reload (Audio *audio) |
|
const char * | audio_get_card (Audio *audio) |
|
const char * | audio_get_channel (Audio *audio) |
|
gboolean | audio_has_mute (Audio *audio) |
|
gboolean | audio_is_muted (Audio *audio) |
|
void | audio_toggle_mute (Audio *audio, AudioUser user) |
|
gdouble | audio_get_volume (Audio *audio) |
|
void | audio_set_volume (Audio *audio, AudioUser user, gdouble volume, gint direction) |
|
void | audio_lower_volume (Audio *audio, AudioUser user) |
|
void | audio_raise_volume (Audio *audio, AudioUser user) |
|
void | audio_signals_connect (Audio *audio, AudioCallback callback, gpointer data) |
|
void | audio_signals_disconnect (Audio *audio, AudioCallback callback, gpointer data) |
|
Header for audio.c.
Header for audio.c.
Definition in file audio.h.
◆ Audio
◆ AudioCallback
◆ AudioEvent
◆ AudioSignal
◆ AudioUser
◆ audio_signal
Enumerator |
---|
AUDIO_NO_CARD | |
AUDIO_CARD_INITIALIZED | |
AUDIO_CARD_CLEANED_UP | |
AUDIO_CARD_DISCONNECTED | |
AUDIO_CARD_ERROR | |
AUDIO_VALUES_CHANGED | |
Definition at line 62 of file audio.h.
◆ audio_user
Enumerator |
---|
AUDIO_USER_UNKNOWN | |
AUDIO_USER_POPUP | |
AUDIO_USER_TRAY_ICON | |
AUDIO_USER_HOTKEYS | |
Definition at line 39 of file audio.h.
◆ audio_free()
void audio_free |
( |
Audio * |
audio | ) |
|
Free an audio instance, therefore unhooking the sound card and freeing any allocated ressources.
- Parameters
-
Definition at line 691 of file audio.c.
◆ audio_get_card()
const char* audio_get_card |
( |
Audio * |
audio | ) |
|
Get the name of the card currently hooked. This is an internal string that shouldn't be modified.
- Parameters
-
- Returns
- the name of the card.
Definition at line 353 of file audio.c.
◆ audio_get_card_list()
GSList* audio_get_card_list |
( |
void |
| ) |
|
Return the list of playable cards as a GSList. Must be freed using g_slist_free_full() and g_free().
- Returns
- a list of playable cards.
Definition at line 726 of file audio.c.
◆ audio_get_channel()
const char* audio_get_channel |
( |
Audio * |
audio | ) |
|
Get the name of the channel currently in use. This is an internal string that shouldn't be modified.
- Parameters
-
- Returns
- the name of the channel.
Definition at line 366 of file audio.c.
◆ audio_get_channel_list()
GSList* audio_get_channel_list |
( |
const char * |
card_name | ) |
|
For a given card name, return the list of playable channels as a GSList. Must be freed using g_slist_free_full() and g_free().
- Parameters
-
card_name | the name of the card for which we list the channels |
- Returns
- a list of playable channels.
Definition at line 739 of file audio.c.
◆ audio_get_volume()
gdouble audio_get_volume |
( |
Audio * |
audio | ) |
|
Get the volume in percent (value between 0 and 100).
- Parameters
-
- Returns
- the volume in percent.
Definition at line 437 of file audio.c.
◆ audio_has_mute()
gboolean audio_has_mute |
( |
Audio * |
audio | ) |
|
Whether the card has mute capabilities.
- Parameters
-
- Returns
- TRUE if the card can be muted, FALSE otherwise.
Definition at line 378 of file audio.c.
◆ audio_is_muted()
gboolean audio_is_muted |
( |
Audio * |
audio | ) |
|
Get the mute state, either TRUE or FALSE.
- Parameters
-
- Returns
- TRUE if the card is muted, FALSE otherwise.
Definition at line 395 of file audio.c.
◆ audio_lower_volume()
Lower the volume.
- Parameters
-
audio | an Audio instance. |
user | the user who performs the action. |
Definition at line 516 of file audio.c.
◆ audio_new()
Audio* audio_new |
( |
void |
| ) |
|
Create a new Audio instance. This does almost nothing actually, all the heavy job is done in the audio_hook_soundcard() function.
- Returns
- a newly allocated Audio instance.
Definition at line 710 of file audio.c.
◆ audio_raise_volume()
Raise the volume.
- Parameters
-
audio | an Audio instance. |
user | the user who performs the action. |
Definition at line 536 of file audio.c.
◆ audio_reload()
void audio_reload |
( |
Audio * |
audio | ) |
|
Reload the current preferences, and reload the hooked soundcard. This has to be called each time the preferences are modified.
- Parameters
-
Definition at line 669 of file audio.c.
◆ audio_set_volume()
void audio_set_volume |
( |
Audio * |
audio, |
|
|
AudioUser |
user, |
|
|
gdouble |
volume, |
|
|
gint |
direction |
|
) |
| |
◆ audio_signals_connect()
Connect a signal handler designed by 'callback' and 'data'. Remember to always pair 'connect' calls with 'disconnect' calls, otherwise you'll be in trouble.
- Parameters
-
audio | an Audio instance. |
callback | the callback to connect. |
data | the data to pass to the callback. |
Definition at line 337 of file audio.c.
◆ audio_signals_disconnect()
Disconnect a signal handler designed by 'callback' and 'data'.
- Parameters
-
audio | an Audio instance. |
callback | the callback to disconnect. |
data | the data to pass to the callback. |
Definition at line 318 of file audio.c.
◆ audio_toggle_mute()
Toggle the mute state.
- Parameters
-
audio | an Audio instance. |
user | the user who performs the action. |
Definition at line 412 of file audio.c.