diff options
| author | salmonik <salmonik@tuta.io> | 2026-09-09 14:56:03 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-09-09 14:56:03 +0200 |
| commit | ab56abdcde033dab0128d423dd2985505db1afc1 (patch) | |
| tree | bb902813810c7e2b85d2f1c976ca70c3be62a2c4 | |
| parent | test recorder ring semantics; extract mix_tick (diff) | |
| download | senator-sperma-ab56abdcde033dab0128d423dd2985505db1afc1.tar.gz senator-sperma-ab56abdcde033dab0128d423dd2985505db1afc1.zip | |
record: 2x gain on mp3 encode
| -rw-r--r-- | src/recording/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/recording/mod.rs b/src/recording/mod.rs index 74ec516..d0a94be 100644 --- a/src/recording/mod.rs +++ b/src/recording/mod.rs | |||
| @@ -217,6 +217,11 @@ pub async fn encode_mp3(pcm_s16le: &[u8], sample_rate: u32) -> Result<Vec<u8>> { | |||
| 217 | "1", | 217 | "1", |
| 218 | "-i", | 218 | "-i", |
| 219 | "pipe:0", | 219 | "pipe:0", |
| 220 | // Discord playback levels land quiet in recordings; 2x loudness. | ||
| 221 | // Output-side option, so it sits after `-i`. Clipping on loud | ||
| 222 | // overlaps is acceptable for voice. | ||
| 223 | "-af", | ||
| 224 | "volume=2.0", | ||
| 220 | "-c:a", | 225 | "-c:a", |
| 221 | "libmp3lame", | 226 | "libmp3lame", |
| 222 | "-b:a", | 227 | "-b:a", |
