搜索后找到了对应的解决方案,原话是这样的

If you built your own SDL, you probably didn’t have development headers
for PulseAudio (or ALSA), so it’s trying to use /dev/dsp, which doesn’t
exist on many modern Linux systems (hence, SDL_Init(SDL_INIT_AUDIO)
succeeds, but no devices are found when you try to open one). “apt-get
install libasound2-dev libpulse-dev” and rebuild SDL…let the configure
script find the new headers so it includes PulseAudio and ALSA support.

其实说白了就是你编译的环境默认使用dsp设备播放,但是由于现代操作系统已经不支持dsp了
你需要安装 libasound2-dev libpulse-dev这些库使SDL能使用PulseAudio播放.

sudo apt  install libasound2-dev libpulse-dev

相关文章:

  • 2021-12-03
  • 2021-09-19
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-02-05
  • 2021-10-07
猜你喜欢
  • 2021-12-07
  • 2021-08-09
  • 2021-06-26
  • 2021-07-18
  • 2021-04-27
  • 2021-09-04
相关资源
相似解决方案