## gnome-sound

gnome-sound

## Functions

void | gnome_sound_init ()
void | gnome_sound_shutdown ()
void | gnome_sound_play ()
int | gnome_sound_sample_load ()
int | gnome_sound_connection_get ()

## Includes

    #include <libgnome/libgnome.h>

## Description

## Functions

### gnome_sound_init ()

    void
    gnome_sound_init (const char *hostname);

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

Initialize the esd connection.

`Deprecated` : 2.30

#### Parameters

hostname | Hostname where esd daemon resides. |

### gnome_sound_shutdown ()

    void
    gnome_sound_shutdown (void);

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

Shuts down the gnome sound support.

`Deprecated` : 2.30

### gnome_sound_play ()

    void
    gnome_sound_play (const char *filename);

`gnome_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

#### Parameters

filename | File containing the sound sample. |

### gnome_sound_sample_load ()

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

`gnome_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 `gnome_sound_play()` instead for fire and forget sound playing.

#### Parameters

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

### gnome_sound_connection_get ()

    int
    gnome_sound_connection_get (void);

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

#### Returns

-1

`Deprecated` : 2.30

## Types and Values