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

unable to load audio/qtaudio_windows.dll



  • I have two program, A and B, program A has many functionity that use many other library, such as protobuf and fdkaac, program B is very simple, it just detect the audio input device and print the name of it. But when I launch program A, the statement QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); devices.size() return zero,it just couldn't detect the audio input device. In program B, the result is 2.
    when I run "Process Explorer" to find out what dll they had loaded, I found that the program A didn't load the qtaudio_wasapi.dll and qtaudio_windows.dll (the dll is under the folder "audio"), but the program B loaded the qtaudio_wasapi.dll and qtaudio_windows.dll, I think that's why the program A work incorrectly. but why the program A does't load the qtaudio_wasapi.dll and qtaudio_windows.dll? the program A need that dlls to work correctly.
    However, if I copy the two program to other pc to run, the two program both don't load the qtaudio_wasapi.dll and qtaudio_windows.dll, so in other pc, I don't get what I want. I just wander that the program load the Qt5core.dll, Qt5Gui.dll, Qt5Multimedia.dll and so on, but why they don't load the qtaudio_wasapi.dll and qtaudio_windows.dll?
    Here is some screenshot:
    QQ截图20200303123741.png
    QQ截图20200303123537.png QQ截图20200303122900.png



  • now, my application work correctly, it just need add this in the begining of main():
    QCoreApplication::addLibraryPath("./");
    And then create directory "plugins" in application folder and copy the audio folder to it.


  • Lifetime Qt Champion

    Hi,

    Did you use windeployqt to prepare your application for deployment ?


Log in to reply