Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[DROID][AE] Only restart the sink when necessary.

  • Loading branch information...
commit b99d6470cf40e968464960aa458677d2dcadfe4c 1 parent 33557c6
Trent Nelson authored
View
7 xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -81,7 +81,8 @@ CAESinkAUDIOTRACK::~CAESinkAUDIOTRACK()
bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
{
- m_format = format;
+ m_lastFormat = format;
+ m_format = format;
if (AE_IS_RAW(m_format.m_dataFormat))
m_passthrough = true;
@@ -167,9 +168,7 @@ void CAESinkAUDIOTRACK::Deinitialize()
bool CAESinkAUDIOTRACK::IsCompatible(const AEAudioFormat &format, const std::string &device)
{
- return ((m_format.m_sampleRate == format.m_sampleRate) &&
- (m_format.m_dataFormat == format.m_dataFormat) &&
- (m_format.m_channelLayout == format.m_channelLayout));
+ return m_lastFormat == format || m_format == format;
}
double CAESinkAUDIOTRACK::GetDelay()
View
1  xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
@@ -57,6 +57,7 @@ class CAESinkAUDIOTRACK : public IAESink
static CAEDeviceInfo m_info;
AEAudioFormat m_format;
+ AEAudioFormat m_lastFormat;
double m_volume;
volatile int m_min_frames;
int16_t *m_alignedS16;
Please sign in to comment.
Something went wrong with that request. Please try again.