From 505c8b384b7198e1e7a0508480648747f6019597 Mon Sep 17 00:00:00 2001 From: Edouard Lafargue W6ELA Date: Wed, 13 Apr 2016 15:15:35 -0500 Subject: [PATCH] Portaudio Mono * Observed on OS X, fldigi cannot work on audio cards with mono output - it requests 2 channels from PortAudio no matter what and portaudio will complain if the audio output is only mono. - modified SoundPort::init_stream to make sure that if max_channels < 2 sd[1].params.channelCount is updated to max_channels --- src/soundcard/sound.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/soundcard/sound.cxx b/src/soundcard/sound.cxx index 609dcdbb..4c21e731 100644 --- a/src/soundcard/sound.cxx +++ b/src/soundcard/sound.cxx @@ -1602,6 +1602,8 @@ void SoundPort::init_stream(unsigned dir) else sd[1].params.suggestedLatency = (*sd[dir].idev)->defaultHighOutputLatency; sd[1].params.hostApiSpecificStreamInfo = NULL; + if (max_channels < 2) + sd[1].params.channelCount = max_channels; } const vector& rates = supported_rates[dir][(*sd[dir].idev)->name];