Make audio buffers const.

This commit is contained in:
Michael Jumper 2013-08-09 16:52:25 -07:00
parent bfbebe3c16
commit 6e3bbe38d5
4 changed files with 7 additions and 7 deletions

View File

@ -153,7 +153,7 @@ void guac_audio_stream_free(guac_audio_stream* audio) {
}
void guac_audio_stream_write_pcm(guac_audio_stream* audio,
unsigned char* data, int length) {
const unsigned char* data, int length) {
/* Update counter */
audio->pcm_bytes_written += length;
@ -194,7 +194,7 @@ void guac_audio_stream_flush(guac_audio_stream* audio) {
}
void guac_audio_stream_write_encoded(guac_audio_stream* audio,
unsigned char* data, int length) {
const unsigned char* data, int length) {
/* Resize audio buffer if necessary */
if (audio->encoded_data_used + length > audio->encoded_data_length) {

View File

@ -63,7 +63,7 @@ typedef void guac_audio_encoder_end_handler(guac_audio_stream* audio);
* Handler which is called when the audio stream is flushed.
*/
typedef void guac_audio_encoder_write_handler(guac_audio_stream* audio,
unsigned char* pcm_data, int length);
const unsigned char* pcm_data, int length);
/**
* Arbitrary audio codec encoder.
@ -231,7 +231,7 @@ void guac_audio_stream_end(guac_audio_stream* stream);
* @param length The number of bytes of PCM data provided.
*/
void guac_audio_stream_write_pcm(guac_audio_stream* stream,
unsigned char* data, int length);
const unsigned char* data, int length);
/**
* Flushes the given audio stream.
@ -251,7 +251,7 @@ void guac_audio_stream_flush(guac_audio_stream* stream);
* @param length The number of bytes of data provided.
*/
void guac_audio_stream_write_encoded(guac_audio_stream* audio,
unsigned char* data, int length);
const unsigned char* data, int length);
#endif

View File

@ -164,7 +164,7 @@ void ogg_encoder_end_handler(guac_audio_stream* audio) {
}
void ogg_encoder_write_handler(guac_audio_stream* audio,
unsigned char* pcm_data, int length) {
const unsigned char* pcm_data, int length) {
/* Get state */
ogg_encoder_state* state = (ogg_encoder_state*) audio->data;

View File

@ -167,7 +167,7 @@ void wav_encoder_end_handler(guac_audio_stream* audio) {
}
void wav_encoder_write_handler(guac_audio_stream* audio,
unsigned char* pcm_data, int length) {
const unsigned char* pcm_data, int length) {
/* Get state */
wav_encoder_state* state = (wav_encoder_state*) audio->data;