Skip to content

Commit

Permalink
AESinkPULSE: Actually set channel map
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsch committed Jan 29, 2014
1 parent eb9aeb3 commit 1c13d4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
Expand Up @@ -446,7 +446,10 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device)
info[0] = pa_format_info_new();
info[0]->encoding = AEFormatToPulseEncoding(format.m_dataFormat);
if(!passthrough)
{
pa_format_info_set_sample_format(info[0], AEFormatToPulseFormat(format.m_dataFormat));
pa_format_info_set_channel_map(info[0], &map);
}
pa_format_info_set_channels(info[0], m_Channels);

// PA requires m_encodedRate in order to do EAC3
Expand Down Expand Up @@ -476,7 +479,7 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device)

pa_sample_spec spec;
#if PA_CHECK_VERSION(2,0,0)
pa_format_info_to_sample_spec(info[0], &spec, &map);
pa_format_info_to_sample_spec(info[0], &spec, NULL);
#else
spec.rate = (AEFormatToPulseEncoding(format.m_dataFormat) == PA_ENCODING_EAC3_IEC61937) ? 4 * samplerate : samplerate;
spec.format = AEFormatToPulseFormat(format.m_dataFormat);
Expand Down

0 comments on commit 1c13d4a

Please sign in to comment.