Results 1 to 2 of 2

Thread: QAudioDeviceInfo finds no default audio device on Android

  1. #1
    Join Date
    Jan 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default QAudioDeviceInfo finds no default audio device on Android

    I have created a simple player application using QAudioOutput. it is working fine.

    Later i moved player code to separate project and built it as shared library and creating player object in my application.

    But QAudioDeviceInfo::availableDevices(QAudio::AudioOu tput)) returning empty list

    i have verified deployment package. it has multimedia dependencies

    Code:

    QAudioFormat audioFormat;
    audioFormat.setSampleRate(44100);
    audioFormat.setChannelCount(2);
    audioFormat.setSampleSize(16);
    audioFormat.setCodec("audio/pcm");
    audioFormat.setByteOrder(QAudioFormat::LittleEndia n);
    audioFormat.setSampleType(QAudioFormat::SignedInt) ;
    QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
    if (!info.isFormatSupported(audioFormat))
    {
    throw myexception("Can not play audio due to unsupported format");
    }

    Then i have created one more shared library it have a simple class inside the constructor i calling above code its working but when i include complete code it is not working

    what might be the reason

    settings:

    qt5.5

    andriod ndk12

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QAudioDeviceInfo finds no default audio device on Android

    I assume the code above is in a class that is provided by the library, correct?

    And you create an instance of that class in your main application?

    Cheers,
    _

Similar Threads

  1. Replies: 0
    Last Post: 19th March 2016, 21:27
  2. Replies: 0
    Last Post: 31st January 2016, 23:31
  3. QAudioDeviceInfo availableDevices can not find sound device in embeded arm
    By xstream71 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 29th September 2014, 14:16
  4. The device name from QAudioDeviceInfo show wrong
    By wang9658 in forum Qt Programming
    Replies: 0
    Last Post: 9th August 2012, 16:14
  5. how to cature audio in device?
    By kumari arpita in forum Newbie
    Replies: 1
    Last Post: 21st July 2012, 14:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.