Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QAudioOutput infinite loop

    Tools
    3
    4
    1233
    Loading More Posts
    • 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
      Jojo last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • J
          Jojo last edited by

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

          1 Reply Last reply Reply Quote 0
          • B
            BRULE Herman last edited by

            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 Reply Quote 0
            • First post
              Last post