Permalink
Browse files

ASIO: Call convertASIOString() in getLastDriverError()

  • Loading branch information...
ed95 committed Jan 10, 2019
1 parent 0fbb753 commit 6bb7618e1e29186c77586bf4944b1efda229a4a0
Showing with 4 additions and 2 deletions.
  1. +4 −2 modules/juce_audio_devices/native/juce_win32_ASIO.cpp
@@ -770,7 +770,7 @@ class ASIOAudioIODevice : public AudioIODevice,
if (CharPointer_UTF8::isValidString (text, length))
return String::fromUTF8 (text, length);

WCHAR wideVersion[64] = {};
WCHAR wideVersion[512] = {};
MultiByteToWideChar (CP_ACP, 0, text, length, wideVersion, numElementsInArray (wideVersion));
return wideVersion;
}
@@ -1113,9 +1113,11 @@ class ASIOAudioIODevice : public AudioIODevice,
String getLastDriverError() const
{
jassert (asioObject != nullptr);

char buffer[512] = {};
asioObject->getErrorMessage (buffer);
return String (buffer, sizeof (buffer) - 1);

return convertASIOString (buffer, sizeof (buffer));
}

String initDriver()

0 comments on commit 6bb7618

Please sign in to comment.