Linux 设置蓝牙扬声器以从您的 Android / iOS 手机流式传输音频

[ad_1]

o 如何将音频从 Apple iOS 或 Google Android 手机传输到笔记本电脑或台式机扬声器? 让我们看看如何设置蓝牙扬声器,将音频从 Android / iOS 手机流式传输到基于 Linux 的笔记本电脑或台式机,这些笔记本电脑或台式机拥有更好的音频扬声器。

为什么要将音频从手机传输到 Linux 笔记本电脑或台式机?

我有 罗技 Z623 2.1 多媒体音箱. 他们真的很可爱。 但是,每当我连接到 VPN 进行工作时,Google 音乐网络播放器都会禁用许多曲目。 所以我在我的手机上播放音乐。 但是,我的手机的音质很低而且很差。 我不想购买智能音箱或外接蓝牙设备来播放音乐。 所以我的搜索让我进入了 Arch Linux 蓝牙 wiki 帮助页面,用于远程音频播放。

Linux 设置蓝牙扬声器从 Android / iOS 手机流式传输音频

实际上,您需要支持蓝牙的 Linux 笔记本电脑/台式机以及 PulseAudio 声音软件。 以下是步骤。

步骤 1 – 搜索蓝牙 Linux 驱动程序

由于我使用的是 Ubuntu Linux 20.04 LTS(命令也应该在 Debian 上工作),我使用 apt 命令/apt-cache 命令搜索模块:
apt-cache search pulseaudio | grep -i blue
Fedora Linux 用户尝试使用 dnf 命令
dnf search pulseaudio-module-bluetooth

RHEL/CentOS Linux 用户需要使用 yum 命令:
yum search pulseaudio-module-bluetooth

Suse/OpenSUSE Linux 用户尝试使用 zypper 命令:
zypper search pulseaudio-module-bluetooth
Arch Linux 用户使用 pacman 搜索包如下:
pacman -Ss pulseaudio | grep -i blue

包裹名字:

extra/pulseaudio-bluetooth 13.99.2+11+g05f567086-1
    Bluetooth support for PulseAudio

步骤 2 – 安装蓝牙 Linux 驱动程序以从 Android / iOS 流式传输音频

到目前为止,您学习了如何搜索 PulseAudio 的蓝牙支持,现在按照您的 Linux 发行版安装软件:
## Debian/Ubuntu Linux ##
sudo apt install pulseaudio-module-bluetooth
## CentOS/RHEL 8.x or Fedora Linux latest ##
sudo dnf install pulseaudio-module-bluetooth
## SUSE/OpenSUSE Linux ##
sudo zypper in pulseaudio-module-bluetooth
## Arch Linux user ##
sudo pacman -Syu pulseaudio-bluetooth

步骤 3 – 如何配置 Linux 以通过蓝牙发送声音

现在安装了 PulseAudio 蓝牙 Linux 驱动程序,然后编辑以下文件:
sudo vim /etc/pulse/system.pa

附加以下指令:

### Adding bluetooth audio streaming on Linux - Oct/14/2020 ###
load-module module-bluetooth-policy
load-module module-bluetooth-discover

步骤 4 – 在 Linux 上重新启动蓝牙服务

笔记: 无需以 root 用户身份重新启动蓝牙。 换句话说,以普通用户身份运行命令。

语法如下:
## Kill a running daemon on Linux ##
$ pulseaudio --kill
## Start the daemon if it is not running ##
$ pulseaudio --start

步骤 5 – 将您的 Android / iOS 手机与您的计算机配对

就这些了。 我们都准备好了。 接下来,将您的 Google Android 或 Apple iOS 设备(例如 iPad 或 iPhone)与您的 Linux 笔记本电脑或台式机配对。 例如:

  1. 通过访问设置选项打开手机上的蓝牙。
  2. 使用基于 Gnome 的 Linux 桌面时,打开活动概览并开始输入蓝牙。
  3. 点击蓝牙打开面板。
  4. 确保蓝牙已启用,您的计算机将开始搜索设备:
  5. 您需要在手机和 Linux 桌面上确认代码:
    Linux pair mobile phone using Bluetooth
  6. 确保在您的移动应用中选择您的蓝牙扬声器/Airplay:
    Google Android Pixel blast music to Linux destop
    Apple iOS stream music to Linux bluetooth speaker

结论

现在您知道如何将音频从 iOS 或 Android 手机/平板电脑流式传输到 Linux 驱动的计算机。 请务必查看 拱维基 和脉冲音频 文档页面 用于远程音频播放的其他蓝牙配置选项。

[ad_2]

Related Posts