File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -411,12 +411,19 @@ enum SoundIndex {
411411};
412412```
413413
414- 需要注意的是 SFML不支持 ` .mp3 ` 格式的音频文件,大家可以使用 ffmpeg 或者其它软件[ 网站] ( https://www.freeconvert.com/audio-converter ) 将音频转换为支持的格式。
414+ > [ !Note]
415+ >
416+ > ~~ 需要注意的是 SFML不支持 ` .mp3 ` 格式的音频文件,大家可以使用 ffmpeg 或者其它软件[ 网站] ( https://www.freeconvert.com/audio-converter ) 将音频转换为支持的格式。~~
417+ >
418+ > SFML 自 [ 2.6] ( https://github.com/SFML/SFML/releases/tag/2.6.0 ) 版本开始通过 ** [ minimp3] ( https://github.com/lieff/minimp3 ) ** 支持 ` .mp3 ` 格式的音频文件。不过新版本的 SFML 也要求更高版本的工具链。
419+ >
420+ > 如果只是为了播放 ` .mp3 ` 的音乐,也可以直接使用 ` minimp3 ` 。
415421
416422如果是测试使用,不知道去哪生成这些语音播报,我们推荐 [ ` tts-vue ` ] ( https://github.com/LokerL/tts-vue ) 。
417423
418424> 我们的代码也可以在 Linux 中运行,并且整体仅需 C++11 标准(除了 ` soundResources ` 数组)。
419425> SFML 依赖于 [ ** FLAC** ] ( https://xiph.org/flac/ ) 和 [ ** OpenAL** ] ( https://www.openal.org/ ) 这两个库。官网上[ 下载] ( https://www.sfml-dev.org/download/sfml/2.5.1/ ) 的 windows 版本的 SFML 已包含这些依赖,但在 Linux 上需要用户自行下载并安装它们。如:
426+ >
420427> ``` shell
421428> sudo apt-get install libflac-dev
422429> sudo apt-get install libopenal-dev
You can’t perform that action at this time.
0 commit comments