ubuntu 安装 alsa环境
在执行ffplay out.wav播放音频时出现下面的错误:
可能是alsa的问题,查看当前系统关于音频的软件包
[email protected]:~$ dpkg -l | grep sound* ii gnome-session-canberra 0.30-2.1ubuntu1 amd64 GNOME session log in and log out sound events ii indicator-sound 12.10.2+16.04.20160406-0ubuntu1 amd64 System sound indicator. ii libasound2:amd64 1.1.0-0ubuntu1 amd64 shared library for ALSA applications ii libasound2-data 1.1.0-0ubuntu1 all Configuration files and profiles for ALSA drivers ii libasound2-dev:amd64 1.1.0-0ubuntu1 amd64 shared library for ALSA applications -- development files ii libasound2-plugins:amd64 1.1.0-0ubuntu1 amd64 ALSA library additional plugins ii libcanberra-gtk-module:amd64 0.30-2.1ubuntu1 amd64 translates GTK+ widgets signals to event sounds ii libcanberra-gtk0:amd64 0.30-2.1ubuntu1 amd64 GTK+ helper for playing widget event sounds with libcanberra ii libcanberra-gtk3-0:amd64 0.30-2.1ubuntu1 amd64 GTK+ 3.0 helper for playing widget event sounds with libcanberra ii libcanberra-gtk3-module:amd64 0.30-2.1ubuntu1 amd64 translates GTK3 widgets signals to event sounds ii libcanberra0:amd64 0.30-2.1ubuntu1 amd64 simple abstract interface for playing event sounds ii linux-sound-base 1.0.25+dfsg-0ubuntu5 all base package for ALSA and OSS sound systems ii pulseaudio 1:8.0-0ubuntu3.10 amd64 PulseAudio sound server ii pulseaudio-module-bluetooth 1:8.0-0ubuntu3.10 amd64 Bluetooth module for PulseAudio sound server ii pulseaudio-module-x11 1:8.0-0ubuntu3.10 amd64 X11 module for PulseAudio sound server ii pulseaudio-utils 1:8.0-0ubuntu3.10 amd64 Command line tools for the PulseAudio sound server ii sound-theme-freedesktop 0.8-1 all freedesktop.org sound theme ii ubuntu-sounds 0.13 all Ubuntu's GNOME audio theme ii ubuntu-touch-sounds 15.08 all sounds for the Ubuntu Touch image [email protected]:~$ dpkg -l | grep alsa ii alsa-base 1.0.25+dfsg-0ubuntu5 all ALSA driver configuration files ii alsa-utils 1.1.0-0ubuntu5 amd64 Utilities for configuring and using ALSA ii gstreamer1.0-alsa:amd64 1.8.3-1ubuntu0.2 amd64 GStreamer plugin for ALSA |
尝试sudo apt-get install libpulse-dev,然后编译SDL,发现可以使用^_^
剩下的安装包还没有装,先留着xmlto,手动安装alsa-lib。