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

View file

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