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. Porting QAudioDevice to QT6.2

Porting QAudioDevice to QT6.2

Scheduled Pinned Locked Moved Solved General and Desktop
qt6
2 Posts 2 Posters 461 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.
  • D Offline
    D Offline
    Dmitriano
    wrote on last edited by Dmitriano
    #1

    I tried to build my app with QT6.2 and all the code compiled except the code that uses QAudioDevice

    1. There are no signals anymore:
        connect(&audioOutput, &QAudioOutput::notify, this, &MyClass::onNotify, Qt::DirectConnection);
        connect(&audioOutput, &QAudioOutput::stateChanged, this, &MyClass::onStateChanged, Qt::DirectConnection);
    
    1. And there are no start/stop methods:
        audioOutput.start(pDevice);
        audioOutput.stop();
    

    In my code I create QAudioOutput and QIODevice by opening a file, call audioOutput.start(pDevice) and handle the signals to loop the sound.

    What is the right way to make this work with QT6.2?

    How to play multiple sounds at a time?

    Are there some examples?

    See an example working with QT5 for more information.

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

      Hi,

      I think you are looking for QAudioSink.

      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
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved