Browse files

[osx] fixed 2x video playback with spdif, qualify sample rate and cha…

…nnels/frame as can get base 960000 and 441000 KHz
  • Loading branch information...
1 parent 7a0976b commit 676b68016068b84e2817d813d827ddbdf4ada9bf @davilla davilla committed May 19, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEHALOSX.cpp
View
8 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEHALOSX.cpp
@@ -158,7 +158,8 @@ bool CCoreAudioAEHALOSX::InitializeEncoded(AudioDeviceID outputDevice, AEAudioFo
m_rawDataFormat == AE_FMT_TRUEHD || m_rawDataFormat == AE_FMT_EAC3)
{
unsigned int bps = CAEUtil::DataFormatToBits(AE_FMT_S16NE);
- if (desc.mFormat.mChannelsPerFrame == m_initformat.m_channelLayout.Count() && desc.mFormat.mBitsPerChannel == bps &&
+ if (desc.mFormat.mChannelsPerFrame == m_initformat.m_channelLayout.Count() &&
+ desc.mFormat.mBitsPerChannel == bps &&
desc.mFormat.mSampleRate == m_initformat.m_sampleRate )
{
outputFormat = desc.mFormat; // Select this format
@@ -167,9 +168,10 @@ bool CCoreAudioAEHALOSX::InitializeEncoded(AudioDeviceID outputDevice, AEAudioFo
break;
}
}
- else
+ else if (desc.mFormat.mFormatID == kAudioFormat60958AC3 || desc.mFormat.mFormatID == 'IAC3')
{
- if (desc.mFormat.mFormatID == kAudioFormat60958AC3 || desc.mFormat.mFormatID == 'IAC3')
+ if (desc.mFormat.mChannelsPerFrame == m_initformat.m_channelLayout.Count() &&
+ desc.mFormat.mSampleRate == m_initformat.m_sampleRate )
{
outputFormat = desc.mFormat; // Select this format
m_OutputBufferIndex = streamIndex;

0 comments on commit 676b680

Please sign in to comment.