Restore channel parameter. Abuse stream index as channel index.

This commit is contained in:
Michael Jumper 2013-09-24 12:13:38 -07:00
parent fbdb6876d9
commit e1798ee3db
3 changed files with 6 additions and 3 deletions

View File

@ -136,7 +136,7 @@ void guac_audio_stream_end(guac_audio_stream* audio) {
/* Send audio */ /* Send audio */
guac_protocol_send_audio(audio->client->socket, audio->stream, guac_protocol_send_audio(audio->client->socket, audio->stream,
audio->encoder->mimetype, duration); audio->stream->index, audio->encoder->mimetype, duration);
guac_protocol_send_blob(audio->client->socket, audio->stream, guac_protocol_send_blob(audio->client->socket, audio->stream,
audio->encoded_data, audio->encoded_data_used); audio->encoded_data, audio->encoded_data_used);

View File

@ -282,12 +282,13 @@ int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp);
* *
* @param socket The guac_socket connection to use. * @param socket The guac_socket connection to use.
* @param stream The stream to use. * @param stream The stream to use.
* @param channel The index of the audio channel to use.
* @param mimetype The mimetype of the data being sent. * @param mimetype The mimetype of the data being sent.
* @param duration The duration of the sound being sent, in milliseconds. * @param duration The duration of the sound being sent, in milliseconds.
* @return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream, int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream,
const char* mimetype, double duration); int channel, const char* mimetype, double duration);
/** /**
* Sends a file instruction over the given guac_socket connection. * Sends a file instruction over the given guac_socket connection.

View File

@ -417,7 +417,7 @@ int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
} }
int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream, int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream,
const char* mimetype, double duration) { int channel, const char* mimetype, double duration) {
int ret_val; int ret_val;
@ -426,6 +426,8 @@ int guac_protocol_send_audio(guac_socket* socket, const guac_stream* stream,
guac_socket_write_string(socket, "5.audio,") guac_socket_write_string(socket, "5.audio,")
|| __guac_socket_write_length_int(socket, stream->index) || __guac_socket_write_length_int(socket, stream->index)
|| guac_socket_write_string(socket, ",") || guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_int(socket, channel)
|| guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_string(socket, mimetype) || __guac_socket_write_length_string(socket, mimetype)
|| guac_socket_write_string(socket, ",") || guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_double(socket, duration) || __guac_socket_write_length_double(socket, duration)