Gnome::Sound - Perl extension for libgnome/gnome-sound (GNOME 1.x)


Gnome-Sound documentation  | view source Contained in the Gnome-Sound distribution.

Index


NAME

Top

Gnome::Sound - Perl extension for libgnome/gnome-sound (GNOME 1.x)

SYNOPSIS

Top

  use Gnome::Sound;
  use Gnome;

  Gnome->init($PACKAGE, $VERSION);

  Gnome::Sound::init($hostname);
  $sample_id = Gnome::Sound::sample_load($sample_name, $filename);
  Gnome::Sound::play($filename);
  Gnome::Sound::shutdown();

DESCRIPTION

Top

This module is a Perl interface to gnome-sound, which provides sound playing routines for GNOME applications (http://www.gnome.org). These routines make use of the esd sound daemon.

It is important to note that Gnome->init( ) must be called before using these functions.

Gnome::Sound::init( HOSTNAME );

This initializes a connection to the esd sound server on HOSTNAME. This function must be called before using any other functions from this module. HOSTNAME is a string, or scalar containing a string, and will usually be 'localhost'.

Gnome::Sound::shutdown( );

Shuts down the connection to the sound server. This function must be called before the end of your program.

Gnome::Sound::sample_load( SAMPLE_NAME, FILENAME );

Loads sound file, FILENAME, into an esound sample with the name SAMPLE_NAME. Both SAMPLE_NAME and FILENAME are strings. Returns the esound numeric ID of the sample, or a negative number otherwise.

Gnome::Sound::play( FILENAME );

Plays the sound file FILENAME. This is a convenient wrapper around a number of esd functions, as will probably be the most used function.

SEE ALSO

Top

Gnome

AUTHOR

Top

Mark A. Stratman <mark@sporkstorms.org>

COPYRIGHT

Top


Gnome-Sound documentation  | view source Contained in the Gnome-Sound distribution.