diff options
author | wm4 <wm4@nowhere> | 2013-12-21 20:03:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 21:43:16 +0100 |
commit | 9242c34fa26aafb09a9973a5175c281233a13bdc (patch) | |
tree | c94bf638a38ce29c8c6e37c9c6167968e8d3cc34 /audio/out/ao_openal.c | |
parent | d8d42b44fc717c695af59c14213d54885088ea37 (diff) | |
download | mpv-9242c34fa26aafb09a9973a5175c281233a13bdc.tar.bz2 mpv-9242c34fa26aafb09a9973a5175c281233a13bdc.tar.xz |
m_option: add mp_log callback to OPT_STRING_VALIDATE options
And also convert a bunch of other code, especially ao_wasapi and
ao_portaudio.
Diffstat (limited to 'audio/out/ao_openal.c')
-rw-r--r-- | audio/out/ao_openal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c index d613b74208..3cb8ba5149 100644 --- a/audio/out/ao_openal.c +++ b/audio/out/ao_openal.c @@ -79,18 +79,18 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg) return CONTROL_UNKNOWN; } -static int validate_device_opt(const m_option_t *opt, struct bstr name, - struct bstr param) +static int validate_device_opt(struct mp_log *log, const m_option_t *opt, + struct bstr name, struct bstr param) { if (bstr_equals0(param, "help")) { if (alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT") != AL_TRUE) { - mp_msg(MSGT_AO, MSGL_FATAL, "Device listing not supported.\n"); + mp_fatal(log, "Device listing not supported.\n"); return M_OPT_EXIT; } const char *list = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER); - mp_msg(MSGT_AO, MSGL_INFO, "OpenAL devices:\n"); + mp_info(log, "OpenAL devices:\n"); while (list && *list) { - mp_msg(MSGT_AO, MSGL_INFO, " '%s'\n", list); + mp_info(log, " '%s'\n", list); list = list + strlen(list) + 1; } return M_OPT_EXIT - 1; |