globalenemy
globalenemy

Reputation: 127

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.

Upvotes: -1

Views: 66

Answers (1)

globalenemy
globalenemy

Reputation: 127

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);

Upvotes: 1

Related Questions