Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qaudioinput
Qt 6.12 LTS is out! See what's new in the release blog

Qaudioinput

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 773 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.
  • E Offline
    E Offline
    ericMath
    wrote on last edited by
    #1

    Why int len = audio_input->bytesReady(); is not fixed in linux 64 but in windows is fixed in
    1280

    audio format is

    format.setSampleRate(16000);
    format.setChannelCount(1);
    format.setSampleSize(16);
    format.setSampleType(QAudioFormat::SignedInt);
    format.setByteOrder(QAudioFormat::LittleEndian);
    format.setCodec("audio/pcm");

    Paul ColbyP 1 Reply Last reply
    0
    • E ericMath

      Why int len = audio_input->bytesReady(); is not fixed in linux 64 but in windows is fixed in
      1280

      audio format is

      format.setSampleRate(16000);
      format.setChannelCount(1);
      format.setSampleSize(16);
      format.setSampleType(QAudioFormat::SignedInt);
      format.setByteOrder(QAudioFormat::LittleEndian);
      format.setCodec("audio/pcm");

      Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by
      #2

      Hi @ericMath,

      Why audio_input->bytesReady(); is not fixed in linux 64 but in windows is fixed in1280

      Its probably to do with the underlying OS services / drivers being completely different. For example, compare then implementations for ALSA vs Windows:

      • https://github.com/qt/qtmultimedia/blob/5.10/src/plugins/alsa/qalsaaudioinput.cpp#L491
      • https://github.com/qt/qtmultimedia/blob/5.10/src/plugins/windowsaudio/qwindowsaudioinput.cpp#L447

      Either way, you should not assume the return value to be consistent on any platform, even if it is on whatever current version of Qt you're using.

      Cheers.

      1 Reply Last reply
      3

      • Login

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