summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-20 14:03:58 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-20 14:03:58 -0800
commite5198b620a9a208ec59ea8457282404725f8ff6e (patch)
tree2ff913c152607cd9d58f0e6ba620461090be7541 /include/private
parent54ffb8abf94365496a2dbf5d792b6977d6a8ef06 (diff)
downloadframeworks_av-e5198b620a9a208ec59ea8457282404725f8ff6e.zip
frameworks_av-e5198b620a9a208ec59ea8457282404725f8ff6e.tar.gz
frameworks_av-e5198b620a9a208ec59ea8457282404725f8ff6e.tar.bz2
auto import from //branches/cupcake/...@127101
Diffstat (limited to 'include/private')
-rw-r--r--include/private/media/AudioTrackShared.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 72ed281..1991aa7 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -28,6 +28,11 @@ namespace android {
#define MAX_SAMPLE_RATE 65535
#define THREAD_PRIORITY_AUDIO_CLIENT (ANDROID_PRIORITY_AUDIO)
+// Maximum cumulated timeout milliseconds before restarting audioflinger thread
+#define MAX_STARTUP_TIMEOUT_MS 3000 // Longer timeout period at startup to cope with A2DP init time
+#define MAX_RUN_TIMEOUT_MS 1000
+#define WAIT_PERIOD_MS 10
+
struct audio_track_cblk_t
{
@@ -55,9 +60,11 @@ struct audio_track_cblk_t
int16_t flowControlFlag; // underrun (out) or overrrun (in) indication
uint8_t out; // out equals 1 for AudioTrack and 0 for AudioRecord
uint8_t forceReady;
+ uint16_t bufferTimeoutMs; // Maximum cumulated timeout before restarting audioflinger
+ uint16_t waitTimeMs; // Cumulated wait time
// Padding ensuring that data buffer starts on a cache line boundary (32 bytes).
// See AudioFlinger::TrackBase constructor
- int32_t Padding[4];
+ int32_t Padding[3];
audio_track_cblk_t();
uint32_t stepUser(uint32_t frameCount);