summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_coreaudio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-03 19:21:22 +0200
committerwm4 <wm4@nowhere>2015-07-03 19:28:00 +0200
commit514af9fbd1e27b3cfd27598cc85c29d8159b89a0 (patch)
treeeba62d57836aa4648b0f3a392492fbd0a5974afb /audio/out/ao_coreaudio.c
parente9e323f35da7247d8a36f3d2a33a76f8bc98fde0 (diff)
downloadmpv-514af9fbd1e27b3cfd27598cc85c29d8159b89a0.tar.bz2
mpv-514af9fbd1e27b3cfd27598cc85c29d8159b89a0.tar.xz
ao_coreaudio: add exclusive suboption
Diffstat (limited to 'audio/out/ao_coreaudio.c')
-rw-r--r--audio/out/ao_coreaudio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c
index 07ccd17468..1cf38326a2 100644
--- a/audio/out/ao_coreaudio.c
+++ b/audio/out/ao_coreaudio.c
@@ -39,6 +39,7 @@ struct priv {
AudioStreamID original_asbd_stream;
int change_physical_format;
+ int exclusive;
};
static int64_t ca_get_hardware_latency(struct ao *ao) {
@@ -151,8 +152,8 @@ static int init(struct ao *ao)
{
struct priv *p = ao->priv;
- if (!af_fmt_is_pcm(ao->format)) {
- MP_WARN(ao, "detected IEC61937, redirecting to coreaudio_exclusive\n");
+ if (!af_fmt_is_pcm(ao->format) || p->exclusive) {
+ MP_VERBOSE(ao, "redirecting to coreaudio_exclusive\n");
ao->redirect = "coreaudio_exclusive";
return CONTROL_ERROR;
}
@@ -423,6 +424,7 @@ const struct ao_driver audio_out_coreaudio = {
.priv_size = sizeof(struct priv),
.options = (const struct m_option[]){
OPT_FLAG("change-physical-format", change_physical_format, 0),
+ OPT_FLAG("exclusive", exclusive, 0),
{0}
},
};