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. Playing SoundEffect freezes app
Forum Updated to NodeBB v4.3 + New Features

Playing SoundEffect freezes app

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 199 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.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    Hi,
    I have Qt 5.7 Windows app. It is QML/C++ game, I redraw its objects on every afterAnimating signal of Window QML Type.

    It has been running without any major troubles since 2016 but recently many users reported this minor issue: every time SoundEffect is played the game freezes for a fraction of second.

    The sound effect is like this:

        SoundEffect {
            objectName: "deathSound"
            source: "qrc:/cars/sound/death.wav"
            volume: soundLevel
        }
    

    and is played like this from C++:

    m_wrongItemSound->play();
    

    When I delete m_wrongItemSound->play(); from the source code, there is no freeze.

    Any idea how to solve this issue?

    Pl45m4P 1 Reply Last reply
    0
    • M MartinD

      Hi,
      I have Qt 5.7 Windows app. It is QML/C++ game, I redraw its objects on every afterAnimating signal of Window QML Type.

      It has been running without any major troubles since 2016 but recently many users reported this minor issue: every time SoundEffect is played the game freezes for a fraction of second.

      The sound effect is like this:

          SoundEffect {
              objectName: "deathSound"
              source: "qrc:/cars/sound/death.wav"
              volume: soundLevel
          }
      

      and is played like this from C++:

      m_wrongItemSound->play();
      

      When I delete m_wrongItemSound->play(); from the source code, there is no freeze.

      Any idea how to solve this issue?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @MartinD said in Playing SoundEffect freezes app:

      I have Qt 5.7 Windows app

      Qt 5.7 is quite old. Could be a bug that got fixed in later versions.

      every time SoundEffect is played the game freezes for a fraction of second.

      No matter what sound you play? Or just this one?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      M 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @MartinD said in Playing SoundEffect freezes app:

        I have Qt 5.7 Windows app

        Qt 5.7 is quite old. Could be a bug that got fixed in later versions.

        every time SoundEffect is played the game freezes for a fraction of second.

        No matter what sound you play? Or just this one?

        M Offline
        M Offline
        MartinD
        wrote on last edited by
        #3

        @Pl45m4 Thanks for your reply. Unfortunately, I don't have enough resources to update my app for newer Qt.

        We have 3 different sounds that can play during different situations in the game, any of the sound produces the issue.

        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