libgaminggear
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Typedefs | Functions
audio_notificator.h File Reference

Typedefs

typedef struct
_GaminggearAudioNotificator 
GaminggearAudioNotificator
 
typedef struct
_GaminggearAudioNotification 
GaminggearAudioNotification
 

Functions

GaminggearAudioNotificatorgaminggear_audio_notificator_init (gchar const *app_name, gchar const *version_string, gchar const *sound_driver)
 Initializes an audio notificator. More...
 
void gaminggear_audio_notificator_deinit (GaminggearAudioNotificator *notificator)
 Frees an existing notificator. More...
 
GaminggearAudioNotificationgaminggear_audio_notification_new (GaminggearAudioNotificator *notificator)
 Create new notification. More...
 
void gaminggear_audio_notification_free (GaminggearAudioNotification *notification)
 Frees an existing notification. More...
 
gboolean gaminggear_audio_notification_update (GaminggearAudioNotification *notification, gchar const *filename, gdouble volume)
 Play a sound file as notification. More...
 
gboolean gaminggear_audio_notification_cancel (GaminggearAudioNotification *notification)
 Cancel a running notification. More...
 

Typedef Documentation

typedef struct _GaminggearAudioNotification GaminggearAudioNotification
typedef struct _GaminggearAudioNotificator GaminggearAudioNotificator

Function Documentation

gboolean gaminggear_audio_notification_cancel ( GaminggearAudioNotification notification)

Cancel a running notification.

Parameters
notificationNotification to be cancelled.
Return values
boolTRUE on success, else FALSE.
Since
1.0
void gaminggear_audio_notification_free ( GaminggearAudioNotification notification)

Frees an existing notification.

Parameters
notificationThe notification to be freed.
Since
1.0
GaminggearAudioNotification* gaminggear_audio_notification_new ( GaminggearAudioNotificator notificator)

Create new notification.

Parameters
notificatorA notificator.
Return values
notificationA new notification to be freed with gaminggear_audio_notification_free().
Since
1.0
gboolean gaminggear_audio_notification_update ( GaminggearAudioNotification notification,
gchar const *  filename,
gdouble  volume 
)

Play a sound file as notification.

A already running playback is cancelled before the new file is played.

Parameters
notificationThe notification that plays the sound.
filenameThe full path of the file to play.
volumeThe playback volume in dB.
Return values
boolTRUE on success, else FALSE.
Since
1.0
void gaminggear_audio_notificator_deinit ( GaminggearAudioNotificator notificator)

Frees an existing notificator.

Parameters
notificatorThe notificator to be freed.
Since
1.0
GaminggearAudioNotificator* gaminggear_audio_notificator_init ( gchar const *  app_name,
gchar const *  version_string,
gchar const *  sound_driver 
)

Initializes an audio notificator.

The nomenclature init/deinit means there is only one instance of this object supported by an application.

Parameters
app_nameThe name of the binary.
version_stringVersion of the binary.
sound_driver"alsa" or "pulse".
Return values
notificatorA new notificator object to be freed with gaminggear_audio_notificator_deinit() or NULL on error.
Since
1.0