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. QAuidoInput buffer size problem
Forum Updated to NodeBB v4.3 + New Features

QAuidoInput buffer size problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
qaudioinputbufferqt5.9
2 Posts 2 Posters 1.1k 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.
  • R Offline
    R Offline
    returnx
    wrote on last edited by
    #1

    Hey my friends, I have a problem with QAudioInput class on Desktop platforms:
    If I would like to get a specific number of samples from microphone, for example N samples:
    On Windows : I should set the BufferSize of QAudioInput Object to N*5 to get the N samples on writeData function of attached QIODevice object to the QAudioInput Object
    On OSX : I should set the same N as the buffer size
    Is there anyone who had the same experience?
    Do you know why the buffer size has not reliable behavior?

    Qt version: 5.9
    Host machine architecture: x64
    OS: windows, mac, Linux [Ubuntu]

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

      Hi,

      See the documentation of bufferSize, you may not get what you requested because setting e.g. a too small buffer size might trigger overflow problem.

      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
      1

      • Login

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