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. Why QAudioInput::bytesReady() always returns 5120 bytes
QtWS25 Last Chance

Why QAudioInput::bytesReady() always returns 5120 bytes

Scheduled Pinned Locked Moved Unsolved General and Desktop
qaudioinput
2 Posts 2 Posters 215 Views
  • 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.
  • P Offline
    P Offline
    patent
    wrote on 7 Dec 2022, 14:32 last edited by
    #1

    Hi, I try send voice via UDP. I read data from the microphone. I check if there is available data from the microphone with the bytesReady() function and it turns out that always available data is 5120 bytes. I think it's too much to send in one datagram. I checked with wireshark and skype sends about 100 bytes in one datagram. Is it possible to somehow change the amount of data read by the microphone?

    C 1 Reply Last reply 7 Dec 2022, 16:10
    0
    • P patent
      7 Dec 2022, 14:32

      Hi, I try send voice via UDP. I read data from the microphone. I check if there is available data from the microphone with the bytesReady() function and it turns out that always available data is 5120 bytes. I think it's too much to send in one datagram. I checked with wireshark and skype sends about 100 bytes in one datagram. Is it possible to somehow change the amount of data read by the microphone?

      C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 7 Dec 2022, 16:10 last edited by
      #2

      @patent said in Why QAudioInput::bytesReady() always returns 5120 bytes:

      Is it possible to somehow change the amount of data read by the microphone?

      No, you have to split it in smaller chunks by yourself.
      And UDP can transfer up to 64k but it should not be bigger than the MTU (~1500 bytes depending on the OS and the network architecture)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0

      1/2

      7 Dec 2022, 14:32

      • Login

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