Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QAudioOutput to speaker on iOS



  • Hi,

    I am developing an app using qt for ios and I want to be able to play audio to the speaker on the iphone. I am using QAudioOutput, and while it works I only hear audio from the ear-piece. When I use QAudioDeviceInfo::availableDevices(QAudio::AudioOutput) I only get the 'default' device, nothing else.

    Is there some additional step I need to take to select the speaker on iOS? Does Qt support any such controls?

    Thanks!
    Regards, Devin


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Something is not clear, do you mean you can only hear the sound when you plug your headphones ?



  • Hi,

    Thanks for responding.

    The Apple iPhone 6+ has an earpiece and a speaker. The speaker is at the bottom and used by apps when they want to play audio to user without headphones (like watching video, etc.).

    It seems I only have the ability to play audio out of the earpiece using Qt. Is this a known issue?

    --
    Regards, Devin



  • To clarify further, the "earpiece" is the small quiet speaker in the top of the phone that you press against your ear while talking on a phone call. The "speaker" is used for speaker-phone, playing music and video, etc. It is loud enough for these applications. The iphone's "earpiece" is only loud enough for phone-to-ear listening.

    Qt seems to not be able to access the speaker.


  • Lifetime Qt Champion

    Which version of iOS is it ?



  • Hi,

    I am testing with version iOS 10.3.2.

    Thanks, Devin


  • Lifetime Qt Champion

    I might be wrong, but from a quick look at the iOS Audio Programming Guide, I don't think you can select the output to which the sound should go programmatically.


Log in to reply