Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QMediaPlayer对象play后没有声音,什么情况。。

    Chinese
    2
    9
    9057
    Loading More Posts
    • 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.
    • M
      masterd last edited by

      @player = new QMediaPlayer;
      //connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
      player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3"));
      player->setVolume(50);
      player->play();@

      运行的时候没声音啊,什么个情况
      运行时提示如下
      @DirectShowPlayerService::doSetUrlSource: Unresolved error code 80070002@
      看不懂啊
      求指导

      1 Reply Last reply Reply Quote 0
      • F
        foxgod last edited by

        文件路劲是否正确??

        1 Reply Last reply Reply Quote 0
        • M
          masterd last edited by

          用本地文件也不行啊。。超级郁闷。。
          [quote author="foxgod" date="1389075391"]文件路劲是否正确??[/quote]

          1 Reply Last reply Reply Quote 0
          • F
            foxgod last edited by

            我都是播放网络MP3的,都可以,我的代码
            你的文件路劲改成绝对路劲看看,肯定可以的
            我是打成release版本没声音

            1 Reply Last reply Reply Quote 0
            • M
              masterd last edited by

              嗯,ok了,多谢啦。。。。

              1 Reply Last reply Reply Quote 0
              • F
                foxgod last edited by

                [quote author="masterd" date="1389167280"]嗯,ok了,多谢啦。。。。[/quote]

                问下,你编译成release版本后,需要加什么插件,我现在播放没声音,但是在编译器里面有声音。

                1 Reply Last reply Reply Quote 0
                • M
                  masterd last edited by

                  只试过在编译器里面运行,在外面运行不起来,少了一大堆DLL,并且我装了好几个版本的Qt,很乱很乱,就一直是在编译器里面跑的。。
                  [quote author="foxgod" date="1389854767"]
                  [quote author="masterd" date="1389167280"]嗯,ok了,多谢啦。。。。[/quote]

                  问下,你编译成release版本后,需要加什么插件,我现在播放没声音,但是在编译器里面有声音。[/quote]

                  1 Reply Last reply Reply Quote 0
                  • F
                    foxgod last edited by

                    你的程序都不发布???我,只能在编译器里面运行,就不能很别人分享你的程序。

                    1 Reply Last reply Reply Quote 0
                    • M
                      masterd last edited by

                      大哥,上面的基本上就是所有代码了,我就是简简单单的试一下看看,
                      [quote author="foxgod" date="1389857735"]你的程序都不发布???我,只能在编译器里面运行,就不能很别人分享你的程序。[/quote]

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post