Commit 4817603a authored by Felix Paul Kühne's avatar Felix Paul Kühne

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

This matches the ALSA implementation now.
parent 22316cd5
......@@ -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;
......
......@@ -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);
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment