mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -04:00
make sure the mic is the default hopefully
This commit is contained in:
+12
-1
@@ -11,10 +11,21 @@ pcm.softvol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Shareable mic capture on the Google Voice HAT (card 0)
|
||||||
|
pcm.micdup {
|
||||||
|
type dsnoop
|
||||||
|
ipc_key 2048
|
||||||
|
slave {
|
||||||
|
pcm "hw:0,0"
|
||||||
|
channels 1
|
||||||
|
rate 16000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Define a software volume (gain) for the microphone (Capture)
|
# Define a software volume (gain) for the microphone (Capture)
|
||||||
pcm.micboost {
|
pcm.micboost {
|
||||||
type softvol
|
type softvol
|
||||||
slave.pcm "dsnoop" # route through dsnoop for sharing
|
slave.pcm "micdup" # route through dsnoop wrapper
|
||||||
control {
|
control {
|
||||||
name "Micro" # name of mic gain control
|
name "Micro" # name of mic gain control
|
||||||
card 0
|
card 0
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ FLIP_ARGS=(--rotation 180)
|
|||||||
|
|
||||||
run_pipeline() {
|
run_pipeline() {
|
||||||
if [[ "${AUDIO_ENABLE}" -eq 1 ]]; then
|
if [[ "${AUDIO_ENABLE}" -eq 1 ]]; then
|
||||||
"${LIBCAMERA_BIN_PATH}" \
|
# Try audio + video; if audio device is missing, fallback to video-only.
|
||||||
|
if ! "${LIBCAMERA_BIN_PATH}" \
|
||||||
--inline \
|
--inline \
|
||||||
--timeout 0 \
|
--timeout 0 \
|
||||||
--width "${VIDEO_WIDTH}" \
|
--width "${VIDEO_WIDTH}" \
|
||||||
@@ -85,7 +86,13 @@ run_pipeline() {
|
|||||||
-flush_packets 1 \
|
-flush_packets 1 \
|
||||||
-f mpegts \
|
-f mpegts \
|
||||||
"${PUBLISH_URL}"
|
"${PUBLISH_URL}"
|
||||||
else
|
then
|
||||||
|
echo "Audio pipeline failed; falling back to video-only this run" >&2
|
||||||
|
AUDIO_ENABLE=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${AUDIO_ENABLE}" -ne 1 ]]; then
|
||||||
"${LIBCAMERA_BIN_PATH}" \
|
"${LIBCAMERA_BIN_PATH}" \
|
||||||
--inline \
|
--inline \
|
||||||
--timeout 0 \
|
--timeout 0 \
|
||||||
|
|||||||
Reference in New Issue
Block a user