mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +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)
|
||||
frames += audio.audioDev->playback.latency();
|
||||
|
||||
const float latency = frames > 0
|
||||
? audio.playback.sampleRate / (float)frames
|
||||
: 0.0f;
|
||||
|
||||
const float latency = frames / (float)(audio.playback.sampleRate / 1000);
|
||||
|
||||
ringbuffer_push(audio.playback.timings, &latency);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user