summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi_utils.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-30 21:50:11 +0200
committerwm4 <wm4@nowhere>2015-07-30 21:50:11 +0200
commitfefac2c941149fb49bcb5126060be74494d0c287 (patch)
tree9835f45627a3c3bbb18f8e037ed0ff5ea24606a8 /audio/out/ao_wasapi_utils.c
parentc8fab7cc7b98af8da0bf734dbdb1a3efc5db977e (diff)
downloadmpv-fefac2c941149fb49bcb5126060be74494d0c287.tar.bz2
mpv-fefac2c941149fb49bcb5126060be74494d0c287.tar.xz
win32: more wchar_t -> WCHAR replacements
This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility.
Diffstat (limited to 'audio/out/ao_wasapi_utils.c')
-rwxr-xr-xaudio/out/ao_wasapi_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c
index 8410d0fcf5..fdd0048ae1 100755
--- a/audio/out/ao_wasapi_utils.c
+++ b/audio/out/ao_wasapi_utils.c
@@ -34,7 +34,7 @@
#include "osdep/io.h"
#include "osdep/timer.h"
-#define MIXER_DEFAULT_LABEL L"mpv - video player"
+#define MIXER_DEFAULT_LABEL u"mpv - video player"
DEFINE_PROPERTYKEY(mp_PKEY_Device_FriendlyName,
0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20,
@@ -190,7 +190,7 @@ bool wasapi_fill_VistaBlob(wasapi_state *state)
{
if (!state)
goto exit_label;
- state->VistaBlob.hAvrt = LoadLibraryW(L"avrt.dll");
+ state->VistaBlob.hAvrt = LoadLibraryW(u"avrt.dll");
if (!state->VistaBlob.hAvrt)
goto exit_label;
@@ -620,7 +620,7 @@ static HRESULT init_session_display(struct wasapi_state *state) {
EXIT_ON_ERROR(hr);
GetModuleFileNameW(NULL, path, MAX_PATH);
- lstrcatW(path, L",-IDI_ICON1");
+ lstrcatW(path, u",-IDI_ICON1");
hr = IAudioSessionControl_SetDisplayName(state->pSessionControl, MIXER_DEFAULT_LABEL, NULL);
EXIT_ON_ERROR(hr);
@@ -725,7 +725,7 @@ reinit:
if (state->VistaBlob.hAvrt) {
state->hTask =
- state->VistaBlob.pAvSetMmThreadCharacteristicsW(L"Pro Audio", &state->taskIndex);
+ state->VistaBlob.pAvSetMmThreadCharacteristicsW(u"Pro Audio", &state->taskIndex);
}
MP_VERBOSE(state, "Format fixed. Using %lld byte buffer block size\n",