forked from mia/Aegisub
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:
parent
6f2294e8be
commit
3aaf515950
1 changed files with 5 additions and 2 deletions
|
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue