#更新系统
sudo apt-get update && sudo apt-get upgrade -y
#安装pulseaudio
sudo apt-get install pulseaudio-module-bluetooth -y
#修改pulseaudio的空闲退出时间
sudo nano /etc/pulse/daemon.conf
设置
exit-idle-time = -1
#开户pulseaudio
pulseaudio --start
#运行蓝牙控制器
bluetoothctl
power on
agent on
default-agent
scan on
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
exit
#显示可用发音设备
pacmd list-sinks
#设置默认发音设备
pacmd set-default-sink bluez_sink.XX:XX:XX:XX:XX:XX
#测试
wget http://youness.net/wp-content/uploads/2016/08/h2g2.ogg
paplay h2g2.ogg
|