summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2015-03-23 18:29:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-23 18:29:20 +0000
commit17fe26e5b500671ca0773b57b77fa63b113aadae (patch)
tree521d1db72da5e9dbfd198f9302d095863a29e917 /include
parent7be5db4925258f113aa228e7212d66243adcaf6f (diff)
parenta5017872000a938667c76d760a866547c3719d09 (diff)
downloadframeworks_av-17fe26e5b500671ca0773b57b77fa63b113aadae.zip
frameworks_av-17fe26e5b500671ca0773b57b77fa63b113aadae.tar.gz
frameworks_av-17fe26e5b500671ca0773b57b77fa63b113aadae.tar.bz2
Merge "Update AudioTrack constructor and set() comments"
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h2
-rw-r--r--include/media/AudioTrack.h17
2 files changed, 13 insertions, 6 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 0b15f27..5fd055c 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -61,7 +61,7 @@ public:
public:
// FIXME use m prefix
size_t frameCount; // number of sample frames corresponding to size;
- // on input to obtainBuffer() it is the number of frames desired,
+ // on input to obtainBuffer() it is the number of frames desired
// on output from obtainBuffer() it is the number of available
// frames to be read
// on input to releaseBuffer() it is currently ignored
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index e919dd4..81b1181 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -150,9 +150,6 @@ public:
/* Creates an AudioTrack object and registers it with AudioFlinger.
* Once created, the track needs to be started before it can be used.
* Unspecified values are set to appropriate default values.
- * With this constructor, the track is configured for streaming mode.
- * Data to be rendered is supplied by write() or by the callback EVENT_MORE_DATA.
- * Intermixing a combination of write() and non-ignored EVENT_MORE_DATA is not allowed.
*
* Parameters:
*
@@ -170,13 +167,21 @@ public:
* configuration. Zero means to use a default value.
* flags: See comments on audio_output_flags_t in <system/audio.h>.
* cbf: Callback function. If not null, this function is called periodically
- * to provide new data and inform of marker, position updates, etc.
+ * to provide new data in TRANSFER_CALLBACK mode
+ * and inform of marker, position updates, etc.
* user: Context for use by the callback receiver.
* notificationFrames: The callback function is called each time notificationFrames PCM
* frames have been consumed from track input buffer.
* This is expressed in units of frames at the initial source sample rate.
* sessionId: Specific session ID, or zero to use default.
* transferType: How data is transferred to AudioTrack.
+ * offloadInfo: If not NULL, provides offload parameters for
+ * AudioSystem::getOutputForAttr().
+ * uid: User ID of the app which initially requested this AudioTrack
+ * for power management tracking, or -1 for current user ID.
+ * pid: Process ID of the app which initially requested this AudioTrack
+ * for power management tracking, or -1 for current process ID.
+ * pAttributes: If not NULL, supersedes streamType for use case selection.
* threadCanCallJava: Not present in parameter list, and so is fixed at false.
*/
@@ -199,7 +204,9 @@ public:
/* Creates an audio track and registers it with AudioFlinger.
* With this constructor, the track is configured for static buffer mode.
* Data to be rendered is passed in a shared memory buffer
- * identified by the argument sharedBuffer, which must be non-0.
+ * identified by the argument sharedBuffer, which should be non-0.
+ * If sharedBuffer is zero, this constructor is equivalent to the previous constructor
+ * but without the ability to specify a non-zero value for the frameCount parameter.
* The memory should be initialized to the desired data before calling start().
* The write() method is not supported in this case.
* It is recommended to pass a callback function to be notified of playback end by an