Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 如何Android上播放mp3?
Forum Updated to NodeBB v4.3 + New Features

如何Android上播放mp3?

Scheduled Pinned Locked Moved Chinese
3 Posts 3 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lori
    wrote on last edited by
    #1

    我的工程里面需要播放mp3文件。用QMediaPlayer来实现的,程序可以运行,但并没有播放出mp3。改用wav格式的文件测试也不可以。
    player = new QMediaPlayer;
    // ...
    player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3"));
    player->setVolume(50);
    player->play();
    编译部署了QMultiMedia下面的Player例程,也出现同样的问题。
    Qt的"文档":http://qt-project.org/doc/qt-5.1/qtmultimedia/audiooverview.html上说了:“ The compressed audio formats supported does depend on the operating system environment, and also what media plugins the user may have installed.”
    是不是我的android系统上没有公用的mp3解码器啊?如何解决?谢谢!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      billconan
      wrote on last edited by
      #2

      这种情况我一般用jni调java的程序去播放。

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jiangcaiyang
        wrote on last edited by
        #3

        我这里可以在Android的平板上播放MP3啊。测试平板台电A10

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved