summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-07-17 12:17:14 -0700
committerEric Laurent <elaurent@google.com>2009-07-23 06:03:39 -0700
commita553c25b33c99b345cf1c8688f8df0ed8df14e5a (patch)
tree025c461b13e66ad0ceac8d0f8d9b13fd88ae168a /include/private
parentebd7bc54028949619bbf3fa5ed6c1188f588c230 (diff)
downloadframeworks_base-a553c25b33c99b345cf1c8688f8df0ed8df14e5a.zip
frameworks_base-a553c25b33c99b345cf1c8688f8df0ed8df14e5a.tar.gz
frameworks_base-a553c25b33c99b345cf1c8688f8df0ed8df14e5a.tar.bz2
Fix issue 1795088 Improve audio routing code
Initial commit for review. Integrated comments after patch set 1 review. Fixed lockup in AudioFlinger::ThreadBase::exit() Fixed lockup when playing tone with AudioPlocyService startTone()
Diffstat (limited to 'include/private')
-rw-r--r--include/private/media/AudioTrackShared.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 496a739..8e2db20 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -55,17 +55,18 @@ struct audio_track_cblk_t
uint32_t volumeLR;
};
uint32_t sampleRate;
+ // NOTE: audio_track_cblk_t::frameSize is not equal to AudioTrack::frameSize() for
+ // 8 bit PCM data: in this case, mCblk->frameSize is based on a sample size of
+ // 16 bit because data is converted to 16 bit before being stored in buffer
+ uint32_t frameSize;
uint8_t channels;
uint8_t flowControlFlag; // underrun (out) or overrrun (in) indication
uint8_t out; // out equals 1 for AudioTrack and 0 for AudioRecord
- uint8_t forceReady;
+ 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[1];
- // Cache line boundary
-
+ // Cache line boundary (32 bytes)
+
audio_track_cblk_t();
uint32_t stepUser(uint32_t frameCount);
bool stepServer(uint32_t frameCount);