linux linein 錄音
-- 預先找到linein 輸入埠的序號和名稱
-- 錄音服務啟動的時候,先執行以下指令碼,切換一下預設裝置
#!/usr/bin/env bash
PRUN=`ps aux |grep pulseaudio | grep -v grep |wc -l`
echo "pulseaudio ps cnt: ${PRUN}"
if [ "${PRUN}"x == "0"x ]
then
echo "start pulseaudio...."
/usr/bin/pulseaudio --start --log-target=syslog
fi
echo "set default mic to line in..."
#pacmd set-source-port 1 analog-input-linein
pacmd set-source-port alsa_input.pci-0000_00_1b.0.analog-stereo analog-input-linein
pacmd list-sources |grep -e "index" -e "line"
「其他文章」