From fc00c1c00998990b269653728fe745f883eed15b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 24 Nov 2014 12:45:51 -0800 Subject: Trace PulseAudio's active port --- Alc/backends/pulseaudio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 861bb01e..dcb1a508 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -706,8 +706,11 @@ 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(info->active_port) + TRACE("Active port: %s (%s)\n", info->active_port->name, info->active_port->description); + device->IsHeadphones = (info->active_port && + strcmp(info->active_port->name, "analog-output-headphones") == 0 && + device->FmtChans == DevFmtStereo); if(!chanmaps[i].str) { -- cgit v1.2.3