Skip to content
Browse files

[DROID][AE] Don't crash on passthrough.

The AudioTrack sink only ever wants S16LE.
  • Loading branch information...
1 parent ca63894 commit 6bfb0c83d482a2085e630c522064025c5dc619b2 @t-nelson t-nelson committed Feb 25, 2014
Showing with 2 additions and 14 deletions.
  1. +2 −14 xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
View
16 xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -105,21 +105,9 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
break;
}
}
- m_format.m_sampleRate = sampleRate;
- // default to AE_FMT_S16LE,
- // then check if we can support the requested format.
- AEDataFormat dataFormat = AE_FMT_S16LE;
- for (size_t i = 0; i < m_info.m_dataFormats.size(); i++)
- {
- if (m_format.m_dataFormat == m_info.m_dataFormats[i])
- {
- dataFormat = m_format.m_dataFormat;
- break;
- }
- }
-
- m_format.m_dataFormat = dataFormat;
+ m_format.m_sampleRate = sampleRate;
+ m_format.m_dataFormat = AE_FMT_S16LE;
m_format.m_channelLayout = m_info.m_channels;
m_format.m_frameSize = m_format.m_channelLayout.Count() *
(CAEUtil::DataFormatToBits(m_format.m_dataFormat) / 8);

0 comments on commit 6bfb0c8

Please sign in to comment.
Something went wrong with that request. Please try again.