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

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 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?

    Christian EhrlicherC 1 Reply Last reply
    0
    • P patent

      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?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 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

      • Login

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