mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[client] audio: adapt buffer to network jitter
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
@@ -2367,18 +2367,14 @@ static PlaybackDataResult playbackData(const void * data, size_t frameCount,
|
||||
sourceData->sourcePacketDurationSec * audio.playback.sampleRate);
|
||||
/* The device period, delivery jitter, packet phase, and resampler delay
|
||||
* define the minimum viable latency. Provider feedback directly controls
|
||||
* the source rate, so latencyOffset only applies to local rate control.
|
||||
* Provider delivery reserve is bounded because late USB packets must be
|
||||
* skipped rather than allowed to become persistent playback latency. */
|
||||
* the source rate, so latencyOffset only applies to local rate control. */
|
||||
const double latencyOffsetFrames = providerRateControl ? 0.0 :
|
||||
max(g_params.audioLatencyOffset, 0) *
|
||||
audio.playback.sampleRate / 1000.0;
|
||||
const double arrivalJitterFrames =
|
||||
sourceData->arrivalJitterSec * audio.playback.sampleRate;
|
||||
const double arrivalReserveFrames =
|
||||
(providerRateControl ?
|
||||
min(arrivalJitterFrames, backlogGuardFrames) :
|
||||
arrivalJitterFrames) + 0.001 * audio.playback.sampleRate;
|
||||
arrivalJitterFrames + 0.001 * audio.playback.sampleRate;
|
||||
const double minimumLowWaterReserveFrames =
|
||||
maxPeriodFrames * 0.1 + arrivalReserveFrames;
|
||||
const double minimumLowWaterFrames =
|
||||
|
||||
Reference in New Issue
Block a user