AudioOutputFrame

From TrillWiki

Jump to: navigation, search

The audioOutputFrame function will actually play data which has been received from the remote connection.

Compatibility: 3.0 and higher

Contents

Syntax

plugin_send(MYGUID,"audioOutputFrame",audio_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

AudioOutputFrame utilitizes the audio_t structure.

struct audio_t 
{ 
    unsigned int                struct_size; 

    int                         connection_id;
    int                         window_id;

    char                        *medium;
    char                        *name;
    char                        *location;

    char                        *section;

    int                         initiated;
    int                         ask_confirmation;

    /* Audio Information
     */

    int                         codec; 

    int                         audio_sample_size;
    int                         audio_sample_rate;
    int                         audio_block_size;
    int                         audio_quality;

    int                         audio_data_length; 

    unsigned char               *audio_data; 

    ttkCallback                 callback; 
    void                        *data; 
};



medium
The medium this audio stream is being hosted over.
connection_id
The connection with which this is associated.
name
The contact with which this chat is associated.
window_id
Optionally, the window ID with which this chat is associated. (If provided, you don't need the above things for looking it up.)
audio_data
The raw audio data received from the net, to be decoded and played.


Return Value

This function returns 0 on success, or a negative value if an error occurs.

Remarks

The audio output stream for this window must have been initialized with audioOutputInitialize and started with audioOutputStart before this function can be called.


Personal tools