summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-01-15 22:56:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-01-15 22:56:03 +0000
commitdda683a2ccb84ccc840b76e2ced10052f65ce43e (patch)
treedcea45fba84635e924e42c60c710ae2b8789c9d2 /include
parentd488982887e24f4a8e61f68d945a2f113f43579e (diff)
parentabdb990953ffe94a9dc544aea0bed17ef7d5f484 (diff)
downloadframeworks_av-dda683a2ccb84ccc840b76e2ced10052f65ce43e.zip
frameworks_av-dda683a2ccb84ccc840b76e2ced10052f65ce43e.tar.gz
frameworks_av-dda683a2ccb84ccc840b76e2ced10052f65ce43e.tar.bz2
Merge "Allow AUDIO_FORMAT_PCM_8_BIT AudioTrack buffers"
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioTrack.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index d602ee4..2e1ed6c 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -79,9 +79,7 @@ public:
size_t size; // input/output in bytes == frameCount * frameSize
// on input it is unused
// on output is the number of bytes actually filled
- // FIXME this is redundant with respect to frameCount,
- // and TRANSFER_OBTAIN mode is broken for 8-bit data
- // since we don't define the frame format
+ // FIXME this is redundant with respect to frameCount.
union {
void* raw;
@@ -154,9 +152,9 @@ public:
* streamType: Select the type of audio stream this track is attached to
* (e.g. AUDIO_STREAM_MUSIC).
* sampleRate: Data source sampling rate in Hz.
- * format: Audio format. For mixed tracks, any PCM format supported by server is OK
- * or AUDIO_FORMAT_PCM_8_BIT which is handled on client side. For direct
- * and offloaded tracks, the possible format(s) depends on the output sink.
+ * format: Audio format. For mixed tracks, any PCM format supported by server is OK.
+ * For direct and offloaded tracks, the possible format(s) depends on the
+ * output sink.
* channelMask: Channel mask, such that audio_is_output_channel(channelMask) is true.
* frameCount: Minimum size of track PCM buffer in frames. This defines the
* application's contribution to the
@@ -193,7 +191,6 @@ public:
/* Creates an audio track and registers it with AudioFlinger.
* With this constructor, the track is configured for static buffer mode.
- * The format must not be 8-bit linear PCM.
* Data to be rendered is passed in a shared memory buffer
* identified by the argument sharedBuffer, which must be non-0.
* The memory should be initialized to the desired data before calling start().
@@ -701,10 +698,7 @@ protected:
const audio_offload_info_t* mOffloadInfo;
audio_attributes_t mAttributes;
- // mFrameSize is equal to mFrameSizeAF for non-PCM or 16-bit PCM data. For 8-bit PCM data, it's
- // twice as large as mFrameSize because data is expanded to 16-bit before it's stored in buffer.
- size_t mFrameSize; // app-level frame size
- size_t mFrameSizeAF; // AudioFlinger frame size
+ size_t mFrameSize; // frame size in bytes
status_t mStatus;