mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] audio: fix latency calculation
This commit is contained in:
parent
4b080f7610
commit
46da447429
@ -356,9 +356,8 @@ void audio_tick(unsigned long long tickCount)
|
|||||||
if (audio.audioDev->playback.latency)
|
if (audio.audioDev->playback.latency)
|
||||||
frames += audio.audioDev->playback.latency();
|
frames += audio.audioDev->playback.latency();
|
||||||
|
|
||||||
const float latency = frames > 0
|
|
||||||
? audio.playback.sampleRate / (float)frames
|
const float latency = frames / (float)(audio.playback.sampleRate / 1000);
|
||||||
: 0.0f;
|
|
||||||
|
|
||||||
ringbuffer_push(audio.playback.timings, &latency);
|
ringbuffer_push(audio.playback.timings, &latency);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user