QSoundEffect(qaudio): Error decoding source

简介: QSoundEffect(qaudio): Error decoding source

其他中添加音频播放的时候出现了

QSoundEffect(qaudio): Error decoding source

主要的流程是:

  1. 1.创建声音
  2. 2.设置文件路径
  3. 3.设置循环模式
  4. 4.设置音量
  5. 5。播出现这种问题,可以尝试使用其他的文件试试,这次是文件损坏了,换了个文件就好了。放

代码如下:

voice=new QSoundEffect(this);
voice->setSource(QUrl::fromLocalFile(":/media/voice/alarm2.wav"));
voice->setLoopCount(QSoundEffect::Infinite);
voice->setVolume(1.0);
voice->play();

出现这种问题,可以尝试使用其他的文件试试,这次是文件损坏了,换了个文件就好了。

相关文章
|
8月前
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
178 3
|
8月前
|
缓存 JavaScript
报错:cannot read properties of undefined “reading url“
报错:cannot read properties of undefined “reading url“
200 6
|
SQL Oracle 关系型数据库
Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<
Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<
Hive:Error while compiling statement: FAILED: ParseException cannot recognize input near '<EOF>' '<
|
8月前
Parsing error: No Babel config file detected for XXXXX
Parsing error: No Babel config file detected for XXXXX
|
PyTorch 算法框架/工具
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=405 error=11 : invalid argument
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=405 error=11 : invalid argument
237 0
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=405 error=11 : invalid argument
FFmpeg Invalid data found when processing input
FFmpeg Invalid data found when processing input
561 0
|
编解码
configure: error: You requested G729 audio codec but not found...die
configure: error: You requested G729 audio codec but not found...die
92 0
Dx unsupported class file version 52.0 Conversion to Dalvik format failed with error 1
Dx unsupported class file version 52.0 Conversion to Dalvik format failed with error 1
162 0
configure:13747: error: You requested FFmpeg (h264, h263, theora, mp4v-es) but not found...die
configure:13747: error: You requested FFmpeg (h264, h263, theora, mp4v-es) but not found...die
106 0
Error:Failed to open zip file. Re-download dependencies and sync project
Error:Failed to open zip file. Re-download dependencies and sync project
160 0