diff --git a/xbmc/cores/paplayer/BXAcodec.cpp b/xbmc/cores/paplayer/BXAcodec.cpp index 18d024cb272f0..08c1dce034709 100644 --- a/xbmc/cores/paplayer/BXAcodec.cpp +++ b/xbmc/cores/paplayer/BXAcodec.cpp @@ -111,3 +111,16 @@ bool BXACodec::CanInit() { return true; } + +CAEChannelInfo BXACodec::GetChannelInfo() +{ + static enum AEChannel map[2][3] = { + {AE_CH_FC, AE_CH_NULL}, + {AE_CH_FL, AE_CH_FR , AE_CH_NULL} + }; + + if (m_Channels > 2) + return CAEUtil::GuessChLayout(m_Channels); + + return CAEChannelInfo(map[m_Channels - 1]); +} diff --git a/xbmc/cores/paplayer/BXAcodec.h b/xbmc/cores/paplayer/BXAcodec.h index 31eddba96b150..0a1ff87ddb0af 100644 --- a/xbmc/cores/paplayer/BXAcodec.h +++ b/xbmc/cores/paplayer/BXAcodec.h @@ -70,5 +70,6 @@ class BXACodec : public CachingCodec virtual int64_t Seek(int64_t iSeekTime); virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize); virtual bool CanInit(); + virtual CAEChannelInfo GetChannelInfo(); };