feat: AudioRecorder accepts device param — reads audio.device from config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-01 20:32:44 +02:00
parent 5e7faa8844
commit ef4aa2a840
3 changed files with 17 additions and 2 deletions
+11
View File
@@ -27,3 +27,14 @@ def test_recorder_save_wav(tmp_path):
with wave.open(out) as wf:
assert wf.getframerate() == 16000
assert wf.getnchannels() == 1
def test_recorder_stores_device_param():
from audio import AudioRecorder
rec = AudioRecorder(device="my-pipewire-source")
assert rec.device == "my-pipewire-source"
def test_recorder_device_none_when_empty_string():
from audio import AudioRecorder
rec = AudioRecorder(device="")
assert rec.device is None