aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Nelson <trent.a.b.nelson@gmail.com>2014-01-02 13:09:11 -0700
committerTrent Nelson <trent.a.b.nelson@gmail.com>2014-01-06 22:49:22 -0700
commit4d6500e63c70415f6688b571fccc622d158ba59a (patch)
tree8007dfd3aa91b03ed70cfd18b29acbb096f23025
parentda1e7691173664a61401367f972e6732141a1eac (diff)
[DROID][AE] Fix 250ms audio delay on AML devices
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp9
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
index 4c67923a8a..46a0f3afa5 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -181,6 +181,15 @@ double CAESinkAUDIOTRACK::GetDelay()
return delay;
}
+double CAESinkAUDIOTRACK::GetLatency()
+{
+#if defined(HAS_LIBAMCODEC)
+ if (aml_present())
+ return 0.250;
+#endif
+ return 0.0;
+}
+
double CAESinkAUDIOTRACK::GetCacheTotal()
{
// total amount that the audio sink can buffer in units of seconds
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
index 183e5d8300..e63778d0e4 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
@@ -41,6 +41,7 @@ public:
virtual void Deinitialize();
virtual double GetDelay ();
+ virtual double GetLatency ();
virtual double GetCacheTotal ();
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false);
virtual void Drain ();