DirectAudio on by default

Everyone who never touched the toggle gets it; anyone who turned it off keeps it off (the setting is
only stored when changed). Off, the client's sound came from AAudio driven inside proot, which
stutters on some devices.
This commit is contained in:
The412Banner committed 2026-09-23 11:08:39 -04:00
1 parent 5956154051
commit 097b67d7e1
2 files changed
+4 -4

No files matched your search

@@ -146,7 +146,7 @@ object DeviceReport {
k("FEX preset", SessionPrefs.fexPreset(context).ifEmpty { "FEX defaults" })
k("Skip xalia", SessionPrefs.noXalia(context))
k("proot without seccomp", SessionPrefs.prootNoSeccomp(context))
k("DirectAudio for games", SessionPrefs.directAudio(context))
k("DirectAudio (games and client)", SessionPrefs.directAudio(context))
k("Microphone", SessionPrefs.micEnabled(context))
k("On-screen controls", SessionPrefs.oscMode(context))
k("Touch mode", SessionPrefs.touchMode(context))
@@ -69,10 +69,10 @@ object SessionPrefs {
}
/**
* DirectAudio for the games the client launches: Wine's audio driver inside them replaced by
* ours, which talks to a helper on this side. The client itself keeps PulseAudio either way.
* DirectAudio: games' Wine audio driver and the client's own sound both go through the relay
* helper on this side. On unless the user turned it off; off, PulseAudio drives the device.
*/
fun directAudio(context: Context): Boolean = prefs(context).getBoolean("directAudio", false)
fun directAudio(context: Context): Boolean = prefs(context).getBoolean("directAudio", true)
fun setDirectAudio(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("directAudio", on).apply()