summaryrefslogtreecommitdiff
path: root/drivers/wasapi
diff options
context:
space:
mode:
authorBraden Bodily <thebodily@gmail.com>2019-08-14 20:57:49 -0600
committerRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-17 12:33:15 +0200
commit71d71d55b5c0d6da4d1555823ac432bf0b33389a (patch)
tree20b2e819d599d6d1bd459bb51880c31e97cfe825 /drivers/wasapi
parent40640a01dc90be00e55e4eef3c7800401ef63b18 (diff)
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
Diffstat (limited to 'drivers/wasapi')
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index b0f102f1a3..adc3cc8d65 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -296,8 +296,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
}
hr = p_device->audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, streamflags, p_capture ? REFTIMES_PER_SEC : 0, 0, pwfex, NULL);
- ERR_EXPLAIN("WASAPI: Initialize failed with error 0x" + String::num_uint64(hr, 16));
- ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+ ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: Initialize failed with error 0x" + String::num_uint64(hr, 16) + ".");
if (p_capture) {
hr = p_device->audio_client->GetService(IID_IAudioCaptureClient, (void **)&p_device->capture_client);