From 2c533fdc36ddb2638211bc0a360b5a78d3875de4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 23 Nov 2014 20:41:29 -0800 Subject: Set headphones when pulse reports using the headphones port --- Alc/backends/pulseaudio.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Alc/backends') diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 0bb38cd6..861bb01e 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -706,6 +706,9 @@ static void ALCpulsePlayback_sinkInfoCallback(pa_context *UNUSED(context), const } } + device->IsHeadphones = (device->FmtChans == DevFmtStereo && info->active_port && + strcmp(info->active_port->name, "analog-output-headphones") == 0); + if(!chanmaps[i].str) { char chanmap_str[PA_CHANNEL_MAP_SNPRINT_MAX] = ""; -- cgit v1.2.3