【问题标题】:No sound using sdl2_mixer from Homebrew使用 Homebrew 的 sdl2_mixer 没有声音
【发布时间】:2016-05-08 06:07:43
【问题描述】:

我的朋友让我为他们测试一个使用sdl2_mixer 来获取声音的程序。我使用的是 OS X 10.11。

我从 Homebrew 安装了sdl2_mixer,但是当我运行程序时,没有声音。

我们尝试了.mp3.ogg 文件,但无济于事。

显示这个警告,但不知道是不是跟问题有关:

This application, or a library it uses, is using the deprecated Carbon
Component Manager for hosting Audio Units. Support for this will be 
removed in a future release. Also, this makes the host incompatible with 
version 3 audio units. Please transition to the API's in AudioComponent.h.

【问题讨论】:

    标签: homebrew sdl-2 osx-elcapitan


    【解决方案1】:

    编辑
    显然这不再起作用了。请参阅下面 Mike 的评论。


    经过大量搜索,我尝试重新安装 sdl2_mixer,并在 Homebrew 中启用了可选的编译选项。

    首先,我删除了 sdl2_mixer 的原始安装

    brew remove sdl2_mixer
    

    然后我跑了

    brew --info sdl2_mixer
    

    找出我可以启用的编译选项。

    最后,我用

    重新安装了sdl2_mixer
    brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod \
    --with-libmodplug --with-libvorbis --with-smpeg2
    

    并非所有这些编译选项在每种情况下都是必需的。您可以一次只启用一个来进行试验,直到找到适合您情况的那个。

    (我很确定问题中提到的折旧警告与声音的成功或不成功播放无关,因为即使声音播放正常,警告仍然显示。)

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-04
    • 2014-09-09
    • 1970-01-01
    • 1970-01-01
    • 2023-03-13
    • 1970-01-01
    • 2017-03-16
    相关资源
    最近更新 更多