Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML Audio is not able to access mp3 file in qrc (windows)
Forum Updated to NodeBB v4.3 + New Features

QML Audio is not able to access mp3 file in qrc (windows)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qrcqmlaudiowindows
16 Posts 3 Posters 5.4k Views 2 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.
  • R raf924

    @Albus It might be a path error. Check if the file is indeed in your qrc file and check that you're using the right prefix.

    A Offline
    A Offline
    Albus
    wrote on last edited by Albus
    #6

    @raf924 Thanks for your advice. I am sure the path is correct, since it works normally in other 3 platforms.

    1 Reply Last reply
    0
    • SGaistS SGaist

      Do you also have the DirectX plugin ?

      From a quick code check the WMF should handle the qrc case

      A Offline
      A Offline
      Albus
      wrote on last edited by
      #7

      @SGaist Do you mean "dsengine.dll"? I do have this DirectShow plugin installed.
      And this dll is not loaded while running my program.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #8

        Then try to move it of the multimedia plugin folder to ensure that the WMF plugin gets loaded

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply
        0
        • SGaistS SGaist

          Then try to move it of the multimedia plugin folder to ensure that the WMF plugin gets loaded

          A Offline
          A Offline
          Albus
          wrote on last edited by
          #9

          @SGaist I renamed these dll, nothing special happened, the program ran normally (but when playing the mp3 file, the error was : MediaPlayer fail to load source).

          Actually, early before when I first tried to run my program, it failed to load every dll it needed, thus I had to copy all dll to have a fast try. But WMF and DS dlls are never asked.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #10

            Starting your application with QT_DEBUG_PLUGINS set to 1 will show you what gets loaded

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 Reply Last reply
            1
            • SGaistS SGaist

              Starting your application with QT_DEBUG_PLUGINS set to 1 will show you what gets loaded

              A Offline
              A Offline
              Albus
              wrote on last edited by
              #11

              @SGaist Thanks for the hint. I searched the entire output, not wmf, not dsengine is found.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #12

                Which are loaded ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                A 1 Reply Last reply
                0
                • SGaistS SGaist

                  Which are loaded ?

                  A Offline
                  A Offline
                  Albus
                  wrote on last edited by
                  #13

                  @SGaist here is the list:
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/platforms/qminimal.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/platforms/qoffscreend.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/platforms/qwindows.dll"
                  loaded library "C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick.2/qtquick2plugind.dll"
                  C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Controls/qtquickcontrolsplugind.dll, metadata=
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Controls/qtquickcontrolsplugind.dll"
                  C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Window.2/windowplugind.dll, metadata=
                  loaded library "C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Window.2/windowplugind.dll"
                  C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Layouts/qquicklayoutsplugind.dll, metadata=
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/qml/QtQuick/Layouts/qquicklayoutsplugind.dll"
                  C:/Qt/Qt5.5.1/5.5/msvc2012/qml/Qt/labs/folderlistmodel/qmlfolderlistmodelplugind.dll, "C:/Qt/Qt5.5.1/5.5/msvc2012/qml/Qt/labs/folderlistmodel/qmlfolderlistmodelplugind.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qgenericbearer.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qgenericbearerd.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qnativewifibearer.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qnativewifibearerd.dll"
                  loaded library "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qgenericbearerd.dll"
                  loaded library "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/bearer/qnativewifibearerd.dll"
                  loaded library "wlanapi"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/audio/qtaudio_windows.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qdds.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qgif.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qicns.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qico.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qjp2.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qjpeg.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qmng.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qsvg.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qtga.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qtiff.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qwbmpd.pdb"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/imageformats/qwebp.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/sqldrivers/qsqlite.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/sqldrivers/qsqlited.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/sqldrivers/qsqlmysql.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/sqldrivers/qsqlodbc.dll"
                  "C:/Qt/Qt5.5.1/5.5/msvc2012/plugins/sqldrivers/qsqlpsql.dll"

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #14

                    What code are you using to play that audio file ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    A 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      What code are you using to play that audio file ?

                      A Offline
                      A Offline
                      Albus
                      wrote on last edited by
                      #15

                      @SGaist here is my code :

                      MediaPlayer {
                          id: music
                          autoPlay: true
                          source: "qrc:///musics/musics/Highway_Wildflowers.mp3"
                          loops: Audio.Infinite
                          volume: 0.6 * CallBacks.getFastAudioSettings()[1]
                      }
                      
                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #16

                        Then it probably is using the audio plugin which I'm not sure at all is supporting qrc

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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