change to hardware2

This commit is contained in:
Chris Frankland-Wright 2025-06-24 23:09:34 +01:00
parent 4a4dd4b334
commit 4361edd63f

View file

@ -7,9 +7,8 @@ import time
import select import select
def start_ltc_stream(): def start_ltc_stream():
# Launch ffmpeg piped into ltcdump
ffmpeg = subprocess.Popen( ffmpeg = subprocess.Popen(
["ffmpeg", "-f", "alsa", "-i", "default", "-ac", "1", "-ar", "48000", "-f", "s16le", "-"], ["ffmpeg", "-f", "alsa", "-i", "hw:2", "-ac", "1", "-ar", "48000", "-f", "s16le", "-"],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL stderr=subprocess.DEVNULL
) )
@ -19,11 +18,12 @@ def start_ltc_stream():
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
text=True, text=True,
bufsize=1 # Line-buffered bufsize=1
) )
ffmpeg.stdout.close() # Let ltcdump consume the pipe ffmpeg.stdout.close()
return ffmpeg, ltcdump return ffmpeg, ltcdump
def main(stdscr): def main(stdscr):
curses.curs_set(0) curses.curs_set(0)
stdscr.nodelay(True) stdscr.nodelay(True)