Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT Android audio stream type
Forum Updated to NodeBB v4.3 + New Features

QT Android audio stream type

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 615 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.
  • R Offline
    R Offline
    Rennegar
    wrote on last edited by
    #1

    I am trying to use QAudioOutput and QAudioInput on an android device with a bluetooth headset. When switching the device to communication mode the microphone works, but the output produces no more sound. I am assuming this is related to the behavior described in the android documentation:

    startBluetoothSco()

    The issue seems to be QAudioOutput will use the STREAM_MUSIC by default. I'm unable to find how I may change this to STREAM_VOICE_CALL as per documentation.

    How to set the stream type for the audio?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rennegar
      wrote on last edited by
      #2

      Found the solution using setCategory(). It's unfortunate the category options are undocumented as they are platform specific. Entering a garbage category will cause a LogCat message showing the options: "alarm", "media", "notification", "ring", "system" and "voice".

      Using category "voice" makes QAudioOutput usable with bluetoothSCO.

      1 Reply Last reply
      2
      • N Offline
        N Offline
        nostar
        wrote on last edited by nostar
        #3

        I'm trying to use QAudioInput and QAudioOutput with a bluetooth headset as well. My app works with QAudioOutput to the headset but wont use the bluetooth mic vie QAudioInput. Can you tell me what 'switching the device to communication mode' means? I am testing with an M98 heaset and Samsung S8 phone.

        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