oss sound fixes

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@752 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2004-08-23 11:13:50 +00:00
parent 9a8b900051
commit 5632b932bc
2 changed files with 4 additions and 4 deletions

View File

@ -238,7 +238,7 @@ wave_out_play(void)
duration = (out->size * (1000000 / (g_samplewidth * g_snd_rate))); duration = (out->size * (1000000 / (g_samplewidth * g_snd_rate)));
elapsed = (tv.tv_sec - startedat_s) * 1000000 + (tv.tv_usec - startedat_us); elapsed = (tv.tv_sec - startedat_s) * 1000000 + (tv.tv_usec - startedat_us);
if (elapsed >= (duration * 7) / 10) if (elapsed >= (duration * 85) / 100)
{ {
rdpsnd_send_completion(packet->tick, packet->index); rdpsnd_send_completion(packet->tick, packet->index);
free(out->data); free(out->data);

6
xwin.c
View File

@ -1445,13 +1445,13 @@ ui_select(int rdp_socket)
rdpdr_check_fds(&rfds, &wfds, (BOOL) False); rdpdr_check_fds(&rfds, &wfds, (BOOL) False);
if (FD_ISSET(rdp_socket, &rfds))
return 1;
#ifdef WITH_RDPSND #ifdef WITH_RDPSND
if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds)) if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds))
wave_out_play(); wave_out_play();
#endif #endif
if (FD_ISSET(rdp_socket, &rfds))
return 1;
} }
} }