work around wxString format oddity (interesting. wx doesn't seem to use swprintf internally.)

Originally committed to SVN as r331.
This commit is contained in:
David Lamparter 2006-04-14 22:47:08 +00:00
parent 6f2294e8be
commit 3aaf515950
1 changed files with 5 additions and 2 deletions

View File

@ -52,8 +52,11 @@ PortAudioPlayer::PortAudioPlayer() {
// Initialize portaudio
if (!pa_refcount) {
PaError err = Pa_Initialize();
if (err != paNoError)
throw wxString::Format(_T("Failed opening PortAudio with error: %s"), Pa_GetErrorText(err));
if (err != paNoError) {
static wchar_t errormsg[2048];
swprintf(errormsg, 2048, L"Failed opening PortAudio: %s", Pa_GetErrorText(err));
throw (const wchar_t *)errormsg;
}
pa_refcount++;
}