]> git.sesse.net Git - vlc/commitdiff
darwin aout modules: fix mono playback (refs #13826)
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 12 Feb 2015 19:47:15 +0000 (20:47 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 12 Feb 2015 19:48:00 +0000 (20:48 +0100)
This matches the ALSA implementation now.

modules/audio_output/audioqueue.c
modules/audio_output/audiounit_ios.c
modules/audio_output/auhal.c

index c945a85bc7084d81cccc6d31eb9545ed093cc78b..312fcb9eada673f7c71d034a26cd1d078c8de202 100644 (file)
@@ -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;
 
index cd45d10e666f960cdc6e76958407d05ddb8c0f89..4645306afb4305ed00d6905f7ef55bb216cde5cf 100644 (file)
@@ -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);
index b7a751d5640e703ea33f542af0111cc9a195d59e..5dc14f5edef40fdb113e6f129e5c2a4dab18bee0 100644 (file)
@@ -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));