[vlc-commits] darwin aout modules: fix mono playback (refs #13826)

Felix Paul Kühne git at videolan.org
Thu Feb 12 22:09:26 CET 2015


vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Feb 12 20:47:15 2015 +0100| [116a62804529a10830e6b222c43ecfc78a9ca725] | committer: Jean-Baptiste Kempf

darwin aout modules: fix mono playback (refs #13826)

This matches the ALSA implementation now.

(cherry picked from commit 4817603a4cd918673c3eaa130c903daa52807984)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=116a62804529a10830e6b222c43ecfc78a9ca725
---

 modules/audio_output/audioqueue.c    |    2 +-
 modules/audio_output/audiounit_ios.c |    2 +-
 modules/audio_output/auhal.c         |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/audioqueue.c b/modules/audio_output/audioqueue.c
index c945a85..312fcb9 100644
--- a/modules/audio_output/audioqueue.c
+++ b/modules/audio_output/audioqueue.c
@@ -144,7 +144,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
     if (error != noErr)
         return VLC_EGENERIC;
     fmt->i_format = VLC_CODEC_FL32;
-    fmt->i_physical_channels = AOUT_CHANS_STEREO;
+    fmt->i_original_channels = fmt->i_physical_channels = AOUT_CHANS_STEREO;
     aout_FormatPrepare(fmt);
     p_aout->sys->i_rate = fmt->i_rate;
 
diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c
index cd45d10..4645306 100644
--- a/modules/audio_output/audiounit_ios.c
+++ b/modules/audio_output/audiounit_ios.c
@@ -200,7 +200,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
     AudioStreamBasicDescription streamDescription;
     streamDescription.mSampleRate = fmt->i_rate;
     fmt->i_format = VLC_CODEC_FL32;
-    fmt->i_physical_channels = AOUT_CHANS_STEREO;
+    fmt->i_physical_channels = fmt->i_original_channels = AOUT_CHANS_STEREO;
     streamDescription.mFormatID = kAudioFormatLinearPCM;
     streamDescription.mFormatFlags = kAudioFormatFlagsNativeFloatPacked; // FL32
     streamDescription.mChannelsPerFrame = aout_FormatNbChannels(fmt);
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 9bdd4fd..10459f0 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -635,6 +635,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
         msg_Warn(p_aout, "device driver does not support kAudioDevicePropertyPreferredChannelLayout - using stereo fallback [%4.4s]", (char *)&err);
         fmt->i_physical_channels = AOUT_CHANS_STEREO;
     }
+    fmt->i_original_channels = fmt->i_physical_channels;
 
     msg_Dbg(p_aout, "selected %d physical channels for device output", aout_FormatNbChannels(fmt));
     msg_Dbg(p_aout, "VLC will output: %s", aout_FormatPrintChannels(fmt));



More information about the vlc-commits mailing list