Is there a way to get the full audio device name in Windows XP and later?
I can use MIXERCAPS but the szPname member will limit to 32 characters (in
If you use the classic Windows Multimedia interface you probably can't get around the MAXPNAMELEN limitation, since that's compiled into Windows itself.
However you might be able to get the full device name if you use DirectSound instead. The following code is untested but I think it should work.
BOOL CALLBACK EnumCallback(LPGUID guid, LPCSTR descr, LPCSTR modname, LPVOID ctx)
{
std::vector *names = (std::vector*)ctx;
names->push_back(std::string(descr));
return TRUE;
}
int main()
{
std::vector names;
if (!FAILED(DirectSoundEnumerate(&EnumCallback, &names)))
{
// do stuff
}
}