feat: improve audio latency
This commit is contained in:
parent
a22b951035
commit
ba6c47d5a8
4 changed files with 15 additions and 6 deletions
|
@ -1,8 +1,10 @@
|
|||
# https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#split-file-configuration
|
||||
# https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#setting-buffer-size-quantum
|
||||
# https://docs.pipewire.org/page_man_pipewire_conf_5.html
|
||||
context.properties = {
|
||||
default.clock.min-quantum = 32
|
||||
default.clock.quantum = 32
|
||||
default.clock.quantum-floor = 8
|
||||
default.clock.min-quantum = 8
|
||||
|
||||
default.clock.quantum = 16
|
||||
|
||||
default.clock.max-quantum = 32
|
||||
default.clock.quantum-limit = 32
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ monitor.alsa.rules = [
|
|||
{
|
||||
matches = [
|
||||
{
|
||||
node.name = "alsa_output.pci-0000_06_00.6.analog-stereo"
|
||||
# PCI analog audio output (usually the 3.5mm audio jack)
|
||||
device.name = "~alsa_output\.pci-.*\.analog-sterio"
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
OSU_PATH=$(find ~/Programs/AppImages -regex '.*gearlever_osu_.*\.appimage')
|
||||
gamemoderun $OSU_PATH
|
||||
# https://github.com/PipeWire/pipewire?tab=readme-ov-file#usage
|
||||
# osu! uses a sample rate of 44100 kHz instead of the usual 48000 kHz for some reason.
|
||||
# Setting PIPEWIRE_LATENCY=8/48000 does not force it to use 48kHz sample rate and I'm going to respect its default value.
|
||||
PIPEWIRE_LATENCY=8/48000 gamemoderun $OSU_PATH
|
||||
|
|
|
@ -28,6 +28,9 @@ func init() {
|
|||
// - https://www.reddit.com/r/linuxaudio/comments/v66mj6/comment/ibjupwb
|
||||
// - https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio
|
||||
|
||||
// todo: https://docs.pipewire.org/page_man_pipewire-client_conf_5.html
|
||||
// todo: https://docs.pipewire.org/page_man_pipewire-pulse_conf_5.html
|
||||
|
||||
wrapper.ParuOnce("pipewire")
|
||||
wrapper.ParuOnce("pipewire-alsa")
|
||||
wrapper.ParuOnce("pipewire-jack")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue