Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Qaudioinput

    General and Desktop
    2
    2
    197
    Loading More Posts
    • 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
      ericMath last edited by

      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");

      P 1 Reply Last reply Reply Quote 0
      • P
        Paul Colby @ericMath last edited by

        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 Reply Quote 3
        • First post
          Last post