mate-sound

mate-sound — Sound playing routines.

Synopsis

#include <libmate/libmate.h>

void                mate_sound_init                    (const char *hostname);
void                mate_sound_shutdown                (void);
void                mate_sound_play                    (const char *filename);
int                 mate_sound_sample_load             (const char *sample_name,
                                                         const char *filename);
int                 mate_sound_connection_get          (void);

Description

This API has been deprecated. Use libcanberra or libcanberra-gtk instead.

This module provides wrapper functions for playing sound samples. Currently it just wraps the esound daemon, but the API is flexible enough that other sound infrastructures can be included in the future.

These functions also allow for the fact that no sound may be supported on the current platform. So applications can safely call these functions to play sounds and they will just quietly return if no action is possible.

Details

mate_sound_init ()

void                mate_sound_init                    (const char *hostname);

Warning

mate_sound_init is deprecated and should not be used in newly-written code.

Initialize the esd connection.

Deprecated: 2.30

hostname :

Hostname where esd daemon resides.

mate_sound_shutdown ()

void                mate_sound_shutdown                (void);

Warning

mate_sound_shutdown is deprecated and should not be used in newly-written code.

Shuts down the mate sound support.

Deprecated: 2.30


mate_sound_play ()

void                mate_sound_play                    (const char *filename);

Warning

mate_sound_play is deprecated and should not be used in newly-written code.

Plays the audio stored in filename, if possible. Fail quietly if playing is not possible (due to missing sound support or for other reasons).

Deprecated: 2.30: Use ca_context_play(), ca_gtk_play_for_widget() or ca_gtk_play_for_event() instead

filename :

File containing the sound sample.

mate_sound_sample_load ()

int                 mate_sound_sample_load             (const char *sample_name,
                                                         const char *filename);

Warning

mate_sound_sample_load is deprecated and should not be used in newly-written code.

Loads the audio from filename and load it into the canberra cache for later playing. Programs will rarely want to call this function directly. Use mate_sound_play() instead for fire and forget sound playing.

sample_name :

The name of the sample.

filename :

The filename where the audio is stored.

Returns :

-1 or -2 Deprecated: 2.30: Use ca_context_cache() or ca_context_cache_full() instead

mate_sound_connection_get ()

int                 mate_sound_connection_get          (void);

Warning

mate_sound_connection_get is deprecated and should not be used in newly-written code.

Returns :

-1 Deprecated: 2.30