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

No audio devices available on Android !!



  • Dear all,
    I did some tests with audio on android platform with Qt 5 beta 1.
    All tests failed because the availableDevices return nothing. It seems that the tablet does not have any input or output audio devices, and of course it's not true !! The tablet has both input and output devices working correctly with others apps.

    What happens ?? Qt 5 multimedia is not yet ported to android platform ?? I read on the blog that there is support for multimedia... so, I should use it ??
    I tryed all audio examples and none of them work on android.
    :-( :-(
    Some advice ??

    Thanks,
    Gianluca.



  • Same problem on Qt 5.1 final release!



  • Shall we file a bug ??
    How can we do that ??
    I don't know how to start the process of submitting a bug.
    Do you know ??





  • [quote author="AlterX" date="1372928950"]I did some days ago!

    "here":https://bugreports.qt-project.org/browse/QTBUG-32119[/quote]

    You may want to update JIRA with comment then.



  • I don't know...I think they already know



  • [quote author="AlterX" date="1372929770"]I don't know...I think they already know[/quote]
    They may already know. However, sometimes a short statement helps those guys. It helps also others.



  • Ok, yes I've done again...anyway there are several threads on android audio issue.



  • Damn! I get this in the application output when I try to create a QAudioRecorder:

    "audiocapturesession.cpp:159 (bool AudioCaptureSession::setFormat(const QAudioFormat&)): failed to setFormat using preferred.."

    -- Do you get this? --

    and then, trying to 'enumerate' input devices I get an empty list...



  • I don't know...I think we need to wait until Qt android goes out the tech preview :(



  • Dear all,
    definitely there is not multimedia support yet !! :-(
    And they are not going to implement it until the Qt 5.2

    I found a way to bypass the problem and use the audio devices, but it requires to implement a middle layer to access the underlying android java API and iOS API.
    For accessing the iOS API it's very easy because objective-c allow to mix C/C++ with objective-c. For android, it's a bit more complicated because you must use the JNI (that are very confusing for me).

    There are some topics on how to do access underlying API:
    http://community.kde.org/Necessitas/JNI
    http://qt-project.org/forums/viewthread/28774/

    For now, it's the only way to play and to record audio from mobile devices with Qt 5.

    Cheers,
    Gianluca.



  • Hello everyone,
    the Qt 5.2 alpha is out... I didn't tried yet, so I don't know if they implemented the AudioInput and AudioOutput.
    Do someone in this thread tried the AudioInput/Output with Qt 5.2 alpha ??
    The problem above has been resolved ??

    Cheers,
    Gianluca.



  • We need to wait for Qt 5.2 official release to get the Multimedia support for Android devices.



  • I have tried the 5.2 beta released today, but I still get no devices. Should it have been supported in the beta or do we have to wait for the final release?

    Andreas



  • :-( that's a really bad news !!
    I cannot understand why there is still this problem.
    In the page of the 5.2 features it is clearly stated that the low-latency audio was added.
    http://qt-project.org/wiki/New-Features-in-Qt-5.2
    At that page, near the bottom, there is the section with Android and iOS where it is been declared that the audio was supported.

    So, again, my question is: "What they mean for supporting low-latency audio if there is no possibility to use because we still get no devices ??"
    Please, can someone involved into the Qt development answer to this question, and how they tested audio features on android and iOS without any devices available ??



  • Hello,
    same problem for me (Windows 7 + Qt5.2 Beta + Android deployment on several different devices). Question for muaddib and Gianluca: what environment do you use (Linux/Windows/Mac) ? Could this bug be related to QTBUG-34275 ?
    Maybe the problem does not occur on Linux/Mac ?
    A simple way to show the problem is to compile the 'examples/multimedia/audiooutput' project. It works fine when compiled on desktop (audio devices appear in the QComboBox), but not on Android device.



  • On Linux and Mac I cannot even build and run the audiooutput example :-(

    On Mac, it seems that iOS lacks completly the multimedia module :-(
    On Linux, it comply that it did not find Qt5Quick.so library ... but the audiooutput it is not a Quick application :-(



  • Some news !
    After struggling a bit for compile the audioinput and audiooutput on linux for android ... I successful run the two example and they found various input/output devices.

    So, it seems that Audio Input and Output works on Android if the app has been built from a linux machine.



  • I am on windows 7 as well and deploying on a Nexus 4. The bug looks relevant, but I couldn't find any references to opensles in any of the logs when building or deploying.



  • hello,I come across the same issue ,how to deal with? i am on win32.

    [quote author="Gianluca" date="1382634372"]Some news !
    After struggling a bit for compile the audioinput and audiooutput on linux for android ... I successful run the two example and they found various input/output devices.

    So, it seems that Audio Input and Output works on Android if the app has been built from a linux machine.
    [/quote]



  • well played Gianluca, on my side unfortunately I don't have Linux or Mac environment to test Android deployment.
    muaddib, me neither I don't see any reference to opensl, but when I build I have this warning 'Warning: Dependency not found: C:/Qt/Qt5.2.0/5.2.0-beta1/android_armv7/plugins/audio', and in the bug I mentioned, the description talks about a problem in 'plugins/audio' for Windows, I don't know if this is linked.
    I also tried yesterday's last snapshot (2013-10-24_112) and the problem is still there.



  • Because it works on my linux machine, I think that you are blocked by the bug mentioned above: https://bugreports.qt-project.org/browse/QTBUG-34275
    So, you don't have any alternative but wait for Qt 5.2.0 RC1



  • Hi all,
    just to inform you that the problem was resolved on Windows by downloading the latest Qt5.2 Beta snapshot (2013-11-01_126/). The audio device is now recognized and I can play audio files.



  • Hi all
    strange is that my audio is working with the precompiled Qt5.2 Beta1 for android.
    I habe a Huawei Tablet with android 4.1.2
    Video is partly working but with stutter/judder.
    I'm building now fresh from git and will tell you tomorrow my results.


Log in to reply