Hi,
Now I am working on a new music player. I use the foo_out_dsound_ex plugin to handle audio output. But in this player, I must get accurate play time( millisecond ) from
foo_out_dsound_ex. At first , I find there are some codes in ds_stream_i::update() that calculate current play time, but I find the time is not accurate especially when the machine performance is very low. Later, I find that the ds_stream_i::flush_internal () function in ds_stream_i::update() reset the current play time to zero when there is no data in buffer. And flush_internal function is called under two condition:
1. music ends;
2. the decoder thread does not fill data into buffer because some reason( in this case, the reason is the machine performance is very low ).
I comment out the codes that reset play time in flush_internal function. That make things better but the play time is not accurate.
Can someone give me some hints? Thanks in advance!
BTW, forgive my poor English huh.gif