Qt播放Wav音频文件
Qt使用QSoundEffect来播放wav文件附官方说明:Thisclassallowsyoutoplayuncompressedaudiofiles(typicallyWAVfiles)inagenerallylowerlatencyway,andissuitablefor"feedback"typesoundsinresponsetouseractions(e.g.virtualkeyboardsounds,positiveornegativefeedbackforpopupdialogs,orgamesounds).Iflowlatency
下载地址
用户评论
就是官方文档上的一个例子,没声音
都下了 没用啊 没声音
不错的资源,感谢分享。
亲测有用,注意在release模式下编译完后一定要把qt安装目录下的plugins/audio这个文件夹复制到你编译出来的那个文件夹里,不然只能在debug模式下放音乐,在release模式就不行,会提示这个错误,无语了,刚刚才在stackoverflow上看到这个方法的。我这边是win下的QT编译,win下测试能解决这个报错的问题。或者用windeployqt.exe xxx.exe应该也能解决这个问题。