sound_stream icon indicating copy to clipboard operation
sound_stream copied to clipboard

Calculate delta-time from audio clock rather than using the `time` crate.

Open mitchmindtree opened this issue 10 years ago • 4 comments

mitchmindtree avatar Mar 30 '15 06:03 mitchmindtree

I am not quite sure if simply replacing precise_time_ns() with stream.get_stream_time() would be sufficient, there may be more refactoring needed, but that would be a good starting point, I suppose...

errordeveloper avatar Apr 20 '15 23:04 errordeveloper

I might try a basic test where precise_time_ns() would be printed along with stream.get_stream_time() and find out what difference there in their values.

errordeveloper avatar Apr 20 '15 23:04 errordeveloper

So precise_time_ns() as f64 / self.stream.get_stream_time() results in some jittery numbers, but don't take my word on that yet, I need to do more tests.

errordeveloper avatar Apr 21 '15 00:04 errordeveloper

Perhaps use clock_ticks? https://github.com/tomaka/clock_ticks

bvssvni avatar Apr 21 '15 09:04 bvssvni