RmAudio

RmAudio — Audio handling functions

Functions

void rm_audio_register ()
void rm_audio_unregister ()
RmAudio * rm_audio_get ()
gpointer rm_audio_open ()
gsize rm_audio_read ()
gsize rm_audio_write ()
gboolean rm_audio_close ()
GSList * rm_audio_get_plugins ()
gchar * rm_audio_get_name ()

Types and Values

Description

Audio contains handling of plugins and common audio functions.

Functions

rm_audio_register ()

void
rm_audio_register (RmAudio *audio);

Register new audio plugin - set it as internal audio device.

Parameters

audio

a RmAudio

 

rm_audio_unregister ()

void
rm_audio_unregister (RmAudio *audio);

Unregister audio plugin

Parameters

audio

a RmAudio

 

rm_audio_get ()

RmAudio *
rm_audio_get (gchar *name);

Find audio as requested by name.

Parameters

name

name of audio to lookup

 

Returns

a RmAudio, or NULL on error


rm_audio_open ()

gpointer
rm_audio_open (RmAudio *audio,
               gchar *device_name);

Open current audio plugin.

Parameters

audio

a RmAudio

 

device_name

device name

 

Returns

private audio data pointer or NULL% on error


rm_audio_read ()

gsize
rm_audio_read (RmAudio *audio,
               gpointer audio_priv,
               guchar *data,
               gsize size);

Read of audio plugin.

Parameters

audio

a RmAudio

 

audio_priv

private audio data (see rm_audio_open)

 

data

data pointer

 

size

number of bytes to read

 

Returns

number of bytes read or -1 on error


rm_audio_write ()

gsize
rm_audio_write (RmAudio *audio,
                gpointer audio_priv,
                guchar *data,
                gsize size);

Write data to audio plugin.

Parameters

audio

a RmAudio

 

audio_priv

private audio data (see audio_open)

 

data

data to write to audio device

 

size

number of bytes to write

 

Returns

number of bytes written or -1 on error


rm_audio_close ()

gboolean
rm_audio_close (RmAudio *audio,
                gpointer audio_priv);

Close current audio device

Parameters

audio

a RmAudio

 

audio_priv

private audio data (see audio_open)

 

Returns

TRUE% on success, otherwise FALSE%


rm_audio_get_plugins ()

GSList *
rm_audio_get_plugins (void);

Get list of audio plugins.

Returns

audio plugin list


rm_audio_get_name ()

gchar *
rm_audio_get_name (RmAudio *audio);

Get audio name of audio .

Parameters

audio

a RmAudio

 

Returns

audio name

Types and Values

enum RmAudioType

Type of audio device.

Members

RM_AUDIO_OUTPUT

Output audio device (speaker)

 

RM_AUDIO_INPUT

Input audio device (microphone)

 

RmAudio

typedef struct {
} RmAudio;

The RmAudio contains only private fileds and should not be directly accessed.


RmAudioDevice

typedef struct {
} RmAudioDevice;

The RmAudioDevice contains only private fileds and should not be directly accessed.