aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-23 20:41:29 -0800
committerChris Robinson <[email protected]>2014-11-23 20:41:29 -0800
commit2c533fdc36ddb2638211bc0a360b5a78d3875de4 (patch)
treebfcfacd7e1405b574ac4d002928442266f48ae9d /Alc/backends/pulseaudio.c
parent033cf3dca952bb8348f2726a8a6d48a9bd62b8a0 (diff)
Set headphones when pulse reports using the headphones port
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r--Alc/backends/pulseaudio.c3
1 files changed, 3 insertions, 0 deletions
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] = "";