summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-09-30 16:12:31 -0700
committerEric Laurent <elaurent@google.com>2010-09-30 17:21:23 -0700
commit44d9848d6656777a18019223e0d35f2fcc67719a (patch)
treefe71003d3400dcbdfe078f8d8fad1b1fde960b2c /include/private
parent922855214d0e8ae4159794d7f751f780b3243552 (diff)
downloadframeworks_av-44d9848d6656777a18019223e0d35f2fcc67719a.zip
frameworks_av-44d9848d6656777a18019223e0d35f2fcc67719a.tar.gz
frameworks_av-44d9848d6656777a18019223e0d35f2fcc67719a.tar.bz2
Issue 3032913: improve AudioTrack recovery time
This issue showed that when an AudioTrack underruns during a too long period of time and is therefore disabled by audioflinger mixer, it takes an additional delay of up to 3 seconds to recover. This fix adds a simple mechanism to recover immediately when the client application is ready to write data again in the AudioTrack buffer Also throttle warnings on record overflows Change-Id: I8b2c71578dd134b9e60a15ee4d91b70f3799cb3d
Diffstat (limited to 'include/private')
-rw-r--r--include/private/media/AudioTrackShared.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 1510f87..c6990bf 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -42,8 +42,11 @@ namespace android {
#define CBLK_FORCEREADY_ON 0x0004 // track is considered ready immediately by AudioFlinger
#define CBLK_FORCEREADY_OFF 0x0000 // track is ready when buffer full
#define CBLK_INVALID_MSK 0x0008
-#define CBLK_INVALID_ON 0x0008 // track buffer is invalidated by AudioFlinger: must be re-created
-#define CBLK_INVALID_OFF 0x0000
+#define CBLK_INVALID_ON 0x0008 // track buffer is invalidated by AudioFlinger:
+#define CBLK_INVALID_OFF 0x0000 // must be re-created
+#define CBLK_DISABLED_MSK 0x0010
+#define CBLK_DISABLED_ON 0x0010 // track disabled by AudioFlinger due to underrun:
+#define CBLK_DISABLED_OFF 0x0000 // must be re-started
struct audio_track_cblk_t
{