From 35649a990a5d468b6e9539c9e362d1e5a351c9c4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 Oct 2014 21:21:31 +0200 Subject: audio: add device selection & listing with --audio-device Not sure how good of an idea this is. This commit doesn't add support for this to any AO yet; the AO implementations will follow later. --- options/options.c | 2 ++ options/options.h | 1 + 2 files changed, 3 insertions(+) (limited to 'options') diff --git a/options/options.c b/options/options.c index af30a584b9..39b562ee80 100644 --- a/options/options.c +++ b/options/options.c @@ -350,6 +350,7 @@ const m_option_t mp_opts[] = { OPT_SETTINGSLIST("vo-defaults", vo.vo_defs, 0, &vo_obj_list), OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list), OPT_SETTINGSLIST("ao-defaults", ao_defs, 0, &ao_obj_list), + OPT_STRING("audio-device", audio_device, 0), OPT_FLAG("fixed-vo", fixed_vo, CONF_GLOBAL), OPT_FLAG("force-window", force_vo, CONF_GLOBAL), OPT_FLAG("ontop", vo.ontop, M_OPT_FIXED), @@ -562,6 +563,7 @@ const struct MPOpts mp_default_opts = { .mixer_init_mute = -1, .gapless_audio = -1, .audio_buffer = 0.2, + .audio_device = "auto", .vo = { .video_driver_list = NULL, .monitor_pixel_aspect = 1.0, diff --git a/options/options.h b/options/options.h index 08af7b7fc2..189df712fd 100644 --- a/options/options.h +++ b/options/options.h @@ -64,6 +64,7 @@ typedef struct MPOpts { int auto_load_scripts; struct m_obj_settings *audio_driver_list, *ao_defs; + char *audio_device; int fixed_vo; int force_vo; int softvol; -- cgit v1.2.3