c++unreal-engine5portaudio

PortAudio Device Names Language


I'm trying to utilize PortAudio in a Unreal Engine 5 project. Just started learning to use this API.

I encountered a weird problem when looking at the available devices. All device names are in chineese(?). I can't figure out why that is. How do I fix this?

get device info results

Don't know if this is useful info, but: I'm on Windows 11. My display language is English. My keyboard language is German. And those are the only language packs I have installed.


Solution

  • Found the solution:

    #include <windows.h>
    ...
    wchar_t wideName[MAX_PATH];
    MultiByteToWideChar(CP_UTF8, 0, deviceInfo->name, -1, wideName, MAX_PATH - 1);
    UE_LOG(LogTemp, Warning, TEXT("  name: %s"), wideName);