diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-08-06 12:10:27 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-08-06 12:10:27 -0700 |
commit | 2e17b70fcde032cc43f8aaf5aec052cdb3efff92 (patch) | |
tree | de740d50af3fed1291f465d4ba29da41540924fa /sesman | |
parent | 46c4a1fe4e26dae0709b82972432b06314bc0585 (diff) | |
download | xrdp-proprietary-2e17b70fcde032cc43f8aaf5aec052cdb3efff92.tar.gz xrdp-proprietary-2e17b70fcde032cc43f8aaf5aec052cdb3efff92.zip |
chansrv: sound_send_wave_data changes
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/chansrv/sound.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 687bf883..08ae7c6b 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -382,7 +382,7 @@ sound_send_wave_data_chunk(char *data, int data_bytes) if (g_sent_flag[(g_cBlockNo + 1) & 0xff] & 1) { LOG(10, ("sound_send_wave_data_chunk: no room")); - return 1; + return 2; } else { @@ -442,6 +442,7 @@ sound_send_wave_data(char *data, int data_bytes) int chunk_bytes; int data_index; int error; + int res; LOG(10, ("sound_send_wave_data: sending %d bytes", data_bytes)); data_index = 0; @@ -460,13 +461,20 @@ sound_send_wave_data(char *data, int data_bytes) g_buf_index += chunk_bytes; if (g_buf_index >= BBUF_SIZE) { - if (sound_send_wave_data_chunk(g_buffer, BBUF_SIZE) != 0) + g_buf_index = 0; + res = sound_send_wave_data_chunk(g_buffer, BBUF_SIZE); + if (res == 2) + { + /* don't need to error on this */ + LOG(0, ("sound_send_wave_data: dropped, no room")); + break; + } + else if (res != 0) { LOG(10, ("sound_send_wave_data: error")); error = 1; break; } - g_buf_index = 0; } data_bytes -= chunk_bytes; data_index += chunk_bytes; |