2017-05-05 142 views
0
QMediaPlayer* _player = new QmediaPlayer(this);  
QUrl url = QUrl::fromLocalFile("test.amr"); 
_player->setMedia(url); 
_player->play(); 

_player->errorString() is DirectShowPlayerService::doRender: Unresolved error code 80040266 

我需要将amr转换为mp3,然后使用qmediaplayer播放?Qt5如何播放amr音频,QMediaPlayer不支持?

回答

0

通过QMediaPlayer支持的格式取决于你使用的后端,在Windows使用DirectShow和支持的格式格式发现here,可惜amr格式并不在列表中。

欲了解更多信息,你可以阅读here