Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QMediaPlayer对象play后没有声音,什么情况。。
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Chinese
9 Posts 2 Posters 9.9k Views
  • 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 Offline
    M Offline
    masterd
    wrote on last edited by
    #1

    @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
    0
    • F Offline
      F Offline
      foxgod
      wrote on last edited by
      #2

      文件路劲是否正确??

      1 Reply Last reply
      0
      • M Offline
        M Offline
        masterd
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • F Offline
          F Offline
          foxgod
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            masterd
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • F Offline
              F Offline
              foxgod
              wrote on last edited by
              #6

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

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

              1 Reply Last reply
              0
              • M Offline
                M Offline
                masterd
                wrote on last edited by
                #7

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

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

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  foxgod
                  wrote on last edited by
                  #8

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

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    masterd
                    wrote on last edited by
                    #9

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

                    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