Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1KB

  1. diff --git a/src/qjackctlInterfaceComboBox.cpp b/src/qjackctlInterfaceComboBox.cpp
  2. index b95f4c6..a0848e8 100644
  3. --- a/src/qjackctlInterfaceComboBox.cpp
  4. +++ b/src/qjackctlInterfaceComboBox.cpp
  5. @@ -47,6 +47,9 @@
  6. #include <iostream>
  7. #include <cstring>
  8. #include <portaudio.h>
  9. +#ifdef WIN32
  10. +#include <windows.h>
  11. +#endif
  12. #endif
  13. #ifdef CONFIG_ALSA_SEQ
  14. @@ -218,11 +221,19 @@ private:
  15. const PaDeviceIndex iNumDevice = Pa_GetDeviceCount();
  16. {
  17. +#ifdef WIN32
  18. + wchar_t wideDeviceName[MAX_PATH];
  19. +#endif
  20. QMutexLocker locker(&PortAudioProber::mutex);
  21. if (PortAudioProber::names.isEmpty()) {
  22. for (PaDeviceIndex i = 0; i < iNumDevice; ++i) {
  23. PaDeviceInfo *pDeviceInfo = const_cast<PaDeviceInfo *> (Pa_GetDeviceInfo(i));
  24. +#ifdef WIN32
  25. + MultiByteToWideChar(CP_UTF8, 0, pDeviceInfo->name, -1, wideDeviceName, MAX_PATH-1);
  26. + const QString sName = hostNames[pDeviceInfo->hostApi] + "::" + QString::fromWCharArray(wideDeviceName);
  27. +#else
  28. const QString sName = hostNames[pDeviceInfo->hostApi] + "::" + QString(pDeviceInfo->name);
  29. +#endif
  30. PortAudioProber::names.push_back(sName);
  31. }
  32. }