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. QAudioOutput: control of buffer sizes.
Forum Updated to NodeBB v4.3 + New Features

QAudioOutput: control of buffer sizes.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k 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.
  • B Offline
    B Offline
    bsomervi
    wrote on 6 Aug 2013, 14:32 last edited by
    #1

    Hi,

    I am having trouble with synthesised audio output on Windows. I have a synthesiser which is implemented as a QIODevice and run QAudioOutput in pull mode. When the application creates and exec()'s a dialog while audio output is running I get a stutter. I am synthesising in the GUI thread and thought that I might not be producing samples fast enough. The first try to fix this was to increase the buffer size of the QAudioOutput.

    Increasing the buffer size helps on Linux but on Windows there is a problem. The first time I start the QAudioOutput instance I get the buffer size I requested, but if I stop and restart the stream I always seem to get a bufferSize of 19200 bytes. I worked around this by setting the buffer size before every start() call.

    On Windows it seems to take the length of the data buffer (in time) to complete the stop of the stream even when reset() is called before stop().

    Also what open mode should I be using on my QIODevice, I've tried WriteOnly and WriteOnly|Unbuffered but don't see much difference. Also should the device be sequential or not; I cannot implement random access esily (and don't think I should need to for a stream). I ask about QIODevice::isSequential() because I see a warning about not being able to call seek() which was surprising; why would QAudioOutput call seek()?

    Regards
    Bill.

    1 Reply Last reply
    0

    1/1

    6 Aug 2013, 14:32

    • Login

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