Sound Streaming

차례

Synopsis
Description
Details

Sound Streaming - support for bidirectional audio comminucation

Synopsis

#define ednet_sound_stream_destroy

typedef EDNetSoundStream;

EDNetSoundStream *ednet_sound_stream_new           (int               channel,
                                                    const char       *name);
void              ednet_sound_stream_ref           (EDNetSoundStream *s);
void              ednet_sound_stream_unref         (EDNetSoundStream *s);
const char       *ednet_sound_stream_get_name      (EDNetSoundStream *s);
void              ednet_sound_stream_set_name      (EDNetSoundStream *s,
                                                    const char       *name);
void              ednet_sound_stream_add_client    (EDNetSoundStream *s,
                                                    EDNetClient      *client);
void              ednet_sound_stream_remove_client (EDNetSoundStream *s,
                                                    EDNetClient      *client);
void              ednet_sound_stream_do_event      (EDNetSoundStream *s,
                                                    const EDNetEvent *e,
                                                    EDNetClient      *client);

Description

The EDNetSoundStream acts as a audio streaming server. You don't need to create a EDNetSound for capturing or send reply to the server for requesting audio streaming.

Details

ednet_sound_stream_destroy

#define ednet_sound_stream_destroy (s)     (s)

EDNetSoundStream

typedef struct _EDNetSoundStream EDNetSoundStream;

A sound stream object to send audio frames to remote servers.

ednet_sound_stream_new ()

EDNetSoundStream *ednet_sound_stream_new           (int               channel,
                                                    const char       *name);

Creates a new EDNetSoundStream object.

channel :

audio channel number (0 is default)

name :

audio device name

Returns :

a new EDNetSoundStream, NULL if errors occurred.

ednet_sound_stream_ref ()

void              ednet_sound_stream_ref           (EDNetSoundStream *s);

Adds a reference to the sound streaming object.

ednet_sound_stream_unref ()

void              ednet_sound_stream_unref         (EDNetSoundStream *s);

Removes a reference from the sound streaming object, deallocating the object if no references remain.

ednet_sound_stream_get_name ()

const char       *ednet_sound_stream_get_name      (EDNetSoundStream *s);

Returns the name of the audio device used for sound streaming.

ednet_sound_stream_set_name ()

void              ednet_sound_stream_set_name      (EDNetSoundStream *s,
                                                    const char       *name);

Sets the name of the audio device used for sound streaming.

s :

a EDNetSoundStream

name :

audio device name

ednet_sound_stream_add_client ()

void              ednet_sound_stream_add_client    (EDNetSoundStream *s,
                                                    EDNetClient      *client);

Adds a EDNetClient to the sound streaming object, which will transmit captured audio frames to the server connected with the client.

s :

a EDNetSoundStream

client :

a EDNetClient

ednet_sound_stream_remove_client ()

void              ednet_sound_stream_remove_client (EDNetSoundStream *s,
                                                    EDNetClient      *client);

Removes a EDNetClient from the sound streaming object.

s :

a EDNetSoundStream

client :

a EDNetClient

ednet_sound_stream_do_event ()

void              ednet_sound_stream_do_event      (EDNetSoundStream *s,
                                                    const EDNetEvent *e,
                                                    EDNetClient      *client);

Hands over network events for the sound stream object to process requests like EDNET_EVENT_CHANNEL_LIST_REQUEST, EDNET_EVENT_CHANNEL_PROPERTY_REQUEST, EDNET_EVENT_STREAM_REQUEST automatically.

s :

a EDNetSoundStream

e :

a EDNetEvent

client :

a EDNetClient