[vlc-commits] darwin aout modules: fix mono playback (refs #13826)
Felix Paul Kühne
git at videolan.org
Thu Feb 12 20:48:03 CET 2015
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Feb 12 20:47:15 2015 +0100| [4817603a4cd918673c3eaa130c903daa52807984] | committer: Felix Paul Kühne
darwin aout modules: fix mono playback (refs #13826)
This matches the ALSA implementation now.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4817603a4cd918673c3eaa130c903daa52807984
---
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 b7a751d..5dc14f5 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