Commit 409684b2 authored by aymeric's avatar aymeric
Browse files

fix time overflow for long calls.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@757 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 5c7e92d3
......@@ -914,7 +914,7 @@ typedef struct WinSnd{
WAVEHDR hdrs_write[WINSND_OUT_NBUFS];
queue_t rq;
ms_mutex_t mutex;
unsigned int bytes_read;
uint64_t bytes_read;
unsigned int nbufs_playing;
bool_t running;
......@@ -943,7 +943,7 @@ static void winsnd_apply_settings(WinSnd *d){
#ifndef _TRUE_TIME
static uint64_t winsnd_get_cur_time( void *data){
WinSnd *d=(WinSnd*)data;
uint64_t curtime=((uint64_t)d->bytes_read*1000)/(uint64_t)d->wfx.nAvgBytesPerSec;
uint64_t curtime=(d->bytes_read*1000)/(uint64_t)d->wfx.nAvgBytesPerSec;
/* ms_debug("winsnd_get_cur_time: bytes_read=%u return %lu\n",d->bytes_read,(unsigned long)curtime); */
return curtime;
}
......
......@@ -1177,7 +1177,7 @@ typedef struct WinSndDs{
WAVEFORMATEX wfx;
queue_t rq;
ms_mutex_t mutex;
unsigned int bytes_read;
uint64_t bytes_read;
unsigned int nbufs_playing;
int32_t stat_input;
......@@ -1276,7 +1276,7 @@ static void winsndds_apply_settings(WinSndDs *d){
static uint64_t winsndds_get_cur_time( void *data){
WinSndDs *d=(WinSndDs*)data;
uint64_t curtime=((uint64_t)d->bytes_read*1000)/(uint64_t)d->wfx.nAvgBytesPerSec;
uint64_t curtime=(d->bytes_read*1000)/(uint64_t)d->wfx.nAvgBytesPerSec;
return curtime;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment