sound sometimes breaks up

  • I am creating a QML application that plays sound by clicking "Play Sound Button".
    I use "QSoundEffect"
    and this application have function.
    function has hard work.

    I click button then do function.
    sound breaks up.

    code like this.

    MouseArea {
    onClicked: {
    QSoundEffect effect;
    function() {
    //hard work( TCP/IP communication)

    I'd like to here clear sound.
    How should I do?


  • Lifetime Qt Champion


    Shouldn't that "hard working" function be moved in its own thread to avoid blocking the main thread and likely the sound effect ?

  • Thanks for reply!
    I think you are right. but it's so difficult.
    Because this application so big and it has many "hard work".

    I'd like to keep sound in "hard work".
    it's impossible?

  • @nishiokas
    Why don't you move your SoundEffects in its own thread instead?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.