summaryrefslogtreecommitdiffstats
path: root/include/media/AudioSystem.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-01-16 12:31:12 -0800
committerGlenn Kasten <gkasten@google.com>2014-01-16 17:23:52 -0800
commitd631d962a831de8b7614b14d7368eae60c816893 (patch)
treeb60bef3f42918b00bd022cfd4e8e9585d687d34d /include/media/AudioSystem.h
parentb5ccb2d99b2af400c70777a6452f090ac14f5a96 (diff)
downloadframeworks_av-d631d962a831de8b7614b14d7368eae60c816893.zip
frameworks_av-d631d962a831de8b7614b14d7368eae60c816893.tar.gz
frameworks_av-d631d962a831de8b7614b14d7368eae60c816893.tar.bz2
Document the reference count rules for I/O handles
Change-Id: Ia7cd27ad84bbd7bf2657011057f89386f938a807
Diffstat (limited to 'include/media/AudioSystem.h')
-rw-r--r--include/media/AudioSystem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index ca9aaf7..3f4d01d 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -200,12 +200,16 @@ public:
static status_t setPhoneState(audio_mode_t state);
static status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config);
static audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage);
+
+ // Client must successfully hand off the handle reference to AudioFlinger via createTrack(),
+ // or release it with releaseOutput().
static audio_io_handle_t getOutput(audio_stream_type_t stream,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
audio_channel_mask_t channelMask = AUDIO_CHANNEL_OUT_STEREO,
audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE,
const audio_offload_info_t *offloadInfo = NULL);
+
static status_t startOutput(audio_io_handle_t output,
audio_stream_type_t stream,
int session);
@@ -213,11 +217,15 @@ public:
audio_stream_type_t stream,
int session);
static void releaseOutput(audio_io_handle_t output);
+
+ // Client must successfully hand off the handle reference to AudioFlinger via openRecord(),
+ // or release it with releaseInput().
static audio_io_handle_t getInput(audio_source_t inputSource,
uint32_t samplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
int sessionId);
+
static status_t startInput(audio_io_handle_t input);
static status_t stopInput(audio_io_handle_t input);
static void releaseInput(audio_io_handle_t input);