Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QAudioOutput infinite loop
Forum Updated to NodeBB v4.3 + New Features

QAudioOutput infinite loop

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 1.6k 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.
  • J Offline
    J Offline
    Jojo
    wrote on last edited by
    #1

    Hello @ all,

    I'm sorry for the bad english
    Here's my problem:

    I have a class which plays a sound wave with a QBuffer as QIODevice, a QBytearray as wave buffer and a QAudioOutput, but only for limited time.
    For my program the soundwave must play 'forever' until I stop it.
    But while playing, I must be able to edit the wave.

    Do you have a solution for this problem?

    Thanks for all answers!

    Jo

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

      Hi and welcome to devnet,

      Why not have e.g a QTimer calling a function generating the audio data ? It could also be done in a secondary thread.

      Hope it helps

      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
      • J Offline
        J Offline
        Jojo
        wrote on last edited by
        #3

        Thanks for your answer.
        I'll try it and give you a reply

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BRULE Herman
          wrote on last edited by
          #4

          Hi,
          My solution, reimplement QBuffer::read():
          https://github.com/alphaonex86/CatchChallenger/blob/master/client/base/QInfiniteBuffer.cpp
          https://github.com/alphaonex86/CatchChallenger/blob/master/client/base/QInfiniteBuffer.h
          Work well to do an audio loop.
          Cheers,

          Developer of Ultracopier/Supercopier and of the game CatchChallenger, CEO of DataCenter/ISP Confiared

          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