>gnome-sound

gnome-sound

Name

gnome-sound -- Sound playing routines for GNOME applications

Synopsis


#include <gnome.h>


void        gnome_sound_init                (const char *hostname);
void        gnome_sound_shutdown            (void);
int         gnome_sound_sample_load         (const char *sample_name,
                                             const char *filename);
void        gnome_sound_play                (const char *filename);

Description

These routines provide a simple way of playing sounds.

Details

gnome_sound_init ()

void        gnome_sound_init                (const char *hostname);

Initialize esd connection

This routine initializes the applications connection to the system's sound server.

The application can expect this to be automatically called if the user has requested GNOME sound support.

hostname : hostname where esd daemon resides.


gnome_sound_shutdown ()

void        gnome_sound_shutdown            (void);

shuts down the gnome sound support


gnome_sound_sample_load ()

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

Loads the audio on filename and XXXX

Loads a sound file into esound sample with the given name. Returns the esound numeric ID of the sample.

sample_name : the name of the sample
filename : the filename where the audio is stored
Returns : a sample_id, or a negative number otherwise.


gnome_sound_play ()

void        gnome_sound_play                (const char *filename);

Plays the audio stored in filename

Convenience routine to play a sound file. Fire and forget.

filename : file containing the sound sample