24 #ifndef __GUAC_AUDIO_H
25 #define __GUAC_AUDIO_H
196 const unsigned char* data,
int length);
216 const unsigned char* data,
int length);
void guac_audio_stream_write_encoded(guac_audio_stream *audio, const unsigned char *data, int length)
Appends arbitrarily-encoded data to the encoded_data buffer within the given audio stream...
void guac_audio_encoder_end_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is closed.
Definition: audio-fntypes.h:42
int bps
The number of bits per sample per channel for PCM data.
Definition: audio.h:126
int encoded_data_used
Number of bytes in the encoded data buffer.
Definition: audio.h:88
guac_audio_encoder * encoder
Arbitrary codec encoder.
Definition: audio.h:99
guac_audio_encoder_begin_handler * begin_handler
Handler which will be called when the audio stream is opened.
Definition: audio.h:49
Type definitions related to Guacamole protocol streams.
void guac_audio_stream_write_pcm(guac_audio_stream *stream, const unsigned char *data, int length)
Writes PCM data to the given audio stream.
int used
Number of bytes in buffer.
Definition: audio.h:73
Type definitions related to the Guacamole client structure, guac_client.
Function type definitions related to simple streaming audio.
guac_client * client
The client associated with this audio stream.
Definition: audio.h:104
void guac_audio_encoder_write_handler(guac_audio_stream *audio, const unsigned char *pcm_data, int length)
Handler which is called when the audio stream is flushed.
Definition: audio-fntypes.h:47
guac_audio_encoder_write_handler * write_handler
Handler which will be called when the audio stream is flushed.
Definition: audio.h:54
void guac_audio_stream_flush(guac_audio_stream *stream)
Flushes the given audio stream.
guac_stream * stream
The actual stream associated with this audio stream.
Definition: audio.h:109
void guac_audio_stream_end(guac_audio_stream *stream)
Ends the current audio packet, writing the finished packet as an audio instruction.
void guac_audio_stream_free(guac_audio_stream *stream)
Frees the given audio stream.
void * data
Encoder-specific state data.
Definition: audio.h:136
Guacamole proxy client.
Definition: client.h:87
Type definitions related to simple streaming audio.
const char * mimetype
The mimetype of the audio data encoded by this audio encoder.
Definition: audio.h:44
Basic audio stream.
Definition: audio.h:63
unsigned char * encoded_data
Encoded audio data buffer, as written by the encoder.
Definition: audio.h:83
int rate
The number of samples per second of PCM data sent to this stream.
Definition: audio.h:114
int encoded_data_length
Maximum number of bytes in the encoded data buffer.
Definition: audio.h:93
Arbitrary audio codec encoder.
Definition: audio.h:38
guac_audio_encoder_end_handler * end_handler
Handler which will be called when the audio stream is closed.
Definition: audio.h:59
Represents a single stream within the Guacamole protocol.
Definition: stream.h:35
int length
Maximum number of bytes in buffer.
Definition: audio.h:78
void guac_audio_stream_begin(guac_audio_stream *stream, int rate, int channels, int bps)
Begins a new audio packet within the given audio stream.
unsigned char * pcm_data
PCM data buffer, 16-bit samples, 2-channel, 44100 Hz.
Definition: audio.h:68
guac_audio_stream * guac_audio_stream_alloc(guac_client *client, guac_audio_encoder *encoder)
Allocates a new audio stream which encodes audio data using the given encoder.
int channels
The number of audio channels per sample of PCM data.
Definition: audio.h:120
void guac_audio_encoder_begin_handler(guac_audio_stream *audio)
Handler which is called when the audio stream is opened.
Definition: audio-fntypes.h:37
int pcm_bytes_written
The number of PCM bytes written since the audio chunk began.
Definition: audio.h:131