app: edit per-application volume in the audio tab

Each configured source gets a slider that sends updateAudioSource as it
moves, so a change is heard while dragging. The demo data now includes two
application sources and a microphone, which the screenshots use.

Also look the game up by recording id in the review screen, so a refresh
that adds a recording does not change what is open.
This commit is contained in:
vhaudiquet committed 2026-11-15 22:14:23 +01:00
1 parent 0377141e4f
commit 8883e93d2b
5 files changed
+85 -14

No files matched your search

+48 -2
View File
@@ -10,7 +10,7 @@ use crate::history::{self, QueueCategory, Timeline};
use crate::ipc::{self, Daemon};
use crate::os;
use crate::screens;
use crate::settings::Settings;
use crate::settings::{AudioSource, AudioSourceType, Settings};
use crate::ui::{self, Paint, body, heading};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -170,7 +170,53 @@ impl App {
};
self.games = history::sample();
self.games_loaded = true;
let settings = Settings::default();
self.devices = AudioDevices {
input_devices: vec![AudioDevice {
id: "mic-1".into(),
name: "Microphone (USB Audio)".into(),
is_default: true,
}],
output_devices: vec![
AudioDevice {
id: "out-1".into(),
name: "Speakers (Realtek)".into(),
is_default: true,
},
AudioDevice {
id: "out-2".into(),
name: "Headphones (USB Audio)".into(),
is_default: false,
},
],
};
self.encoders = Encoders {
available: vec![EncoderInfo {
id: "jim_nvenc".into(),
name: "NVIDIA NVENC".into(),
available: true,
is_hardware: true,
}],
current: "jim_nvenc".into(),
};
let mut settings = Settings::default();
settings.audio.capture_apps = vec![
AudioSource {
id: "discord".into(),
name: "Discord".into(),
source_type: AudioSourceType::Application,
device: "Discord.exe".into(),
volume: Some(80),
enabled: true,
},
AudioSource {
id: "spotify".into(),
name: "Spotify".into(),
source_type: AudioSourceType::Application,
device: "Spotify.exe".into(),
volume: Some(35),
enabled: true,
},
];
self.form.apply(&settings);
self.settings = Some(settings);
}