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. Problem while playing songs after deployment
Qt 6.11 is out! See what's new in the release blog

Problem while playing songs after deployment

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.0k 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.
  • C Offline
    C Offline
    CLBSII
    wrote on last edited by
    #1

    Hi everyone,

    I made an application that play diverses song using Qt 5.15.2 on Windows. It works well using QT IDE and now I want to use the executable as a standalone to deploy it on other platforms. My program use the following QT class for play songs: QMediaPlaylist and QMediaPlayer.

    I created a dedicated folder containing:

    • platforms/qwindows.dll
    • audio/qtaudio_windows.dll
    • mediaservice/dsengine.dll
    • mediaservice/qtmedia_audioengine.dll
    • playlistformats/qtmultimedia_m3u.dll
    • myProgram.exe
    • libgcc_s_seh-1.dll
    • libstdc++-6.dll
    • libwinpthread-1.dll
    • Qt5Core.dll
    • Qt5Gui.dll
    • Qt5Multimedia.dll
    • Qt5MultimediaQuick.dll
    • Qt5MultimediaWidgets.dll
    • Qt5Network.dll
    • Qt5OpenGL.dll
    • Qt5Widgets.dll

    The executable run well but each time I need to play a sound, it doesn't work (no sounds) and it crashes after a while.

    Any idea on how to solve this ?

    Thanks !

    PS : right now I testing this on the same platform where I have developed the code

    artwawA 1 Reply Last reply
    0
    • C Offline
      C Offline
      CLBSII
      wrote on last edited by
      #6

      OK after thinking about the possibilities, I decided to remake a part of my code to include the audio player into the main class instead of a thread.

      So now it works.

      1 Reply Last reply
      0
      • C CLBSII

        Hi everyone,

        I made an application that play diverses song using Qt 5.15.2 on Windows. It works well using QT IDE and now I want to use the executable as a standalone to deploy it on other platforms. My program use the following QT class for play songs: QMediaPlaylist and QMediaPlayer.

        I created a dedicated folder containing:

        • platforms/qwindows.dll
        • audio/qtaudio_windows.dll
        • mediaservice/dsengine.dll
        • mediaservice/qtmedia_audioengine.dll
        • playlistformats/qtmultimedia_m3u.dll
        • myProgram.exe
        • libgcc_s_seh-1.dll
        • libstdc++-6.dll
        • libwinpthread-1.dll
        • Qt5Core.dll
        • Qt5Gui.dll
        • Qt5Multimedia.dll
        • Qt5MultimediaQuick.dll
        • Qt5MultimediaWidgets.dll
        • Qt5Network.dll
        • Qt5OpenGL.dll
        • Qt5Widgets.dll

        The executable run well but each time I need to play a sound, it doesn't work (no sounds) and it crashes after a while.

        Any idea on how to solve this ?

        Thanks !

        PS : right now I testing this on the same platform where I have developed the code

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #2

        @CLBSII Please try to run windeployqt against your application and then try? In that dedicated folder of yours.

        For more information please re-read.

        Kind Regards,
        Artur

        C 1 Reply Last reply
        0
        • artwawA artwaw

          @CLBSII Please try to run windeployqt against your application and then try? In that dedicated folder of yours.

          C Offline
          C Offline
          CLBSII
          wrote on last edited by
          #3

          @artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.

          But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?

          I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.

          artwawA KroMignonK 2 Replies Last reply
          0
          • C CLBSII

            @artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.

            But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?

            I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.

            artwawA Offline
            artwawA Offline
            artwaw
            wrote on last edited by
            #4

            @CLBSII Then there might be an issue, yes.

            For more information please re-read.

            Kind Regards,
            Artur

            1 Reply Last reply
            0
            • C CLBSII

              @artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.

              But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?

              I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by
              #5

              @CLBSII said in Problem while playing songs after deployment:

              I had to put my audio player in a Thread. Maybe it has something to do with this ?

              How did you do this?
              Are you sure all class instances used by your player are running in the right thread?

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              1 Reply Last reply
              0
              • C Offline
                C Offline
                CLBSII
                wrote on last edited by
                #6

                OK after thinking about the possibilities, I decided to remake a part of my code to include the audio player into the main class instead of a thread.

                So now it works.

                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