summaryrefslogtreecommitdiffstats
path: root/include/media/IAudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-03-06 11:22:44 -0800
committerGlenn Kasten <gkasten@google.com>2012-03-19 09:04:23 -0700
commita075db4ff9b086ac2885df77bb6da0869293df92 (patch)
tree2496dbf3d7fbb569b843780535bcea450157eb25 /include/media/IAudioFlinger.h
parent1746929ddc7592ab397c402724a61352e45df093 (diff)
downloadframeworks_av-a075db4ff9b086ac2885df77bb6da0869293df92.zip
frameworks_av-a075db4ff9b086ac2885df77bb6da0869293df92.tar.gz
frameworks_av-a075db4ff9b086ac2885df77bb6da0869293df92.tar.bz2
IAudioFlinger::createTrack and openRecord flags
createTrack and openRecord don't need the "old" flags parameter, which was either audio_policy_output_t or audio_in_acoustics_t shifted left by 16 bits. But they do need "new" flags, which are defined by the application use case. Initially, the only application use case flag is timed output, but others are planned. For output, the audio_policy_output_t flags are passed to AudioSystem::getOutput, which returns an audio_io_handle_t, and that handle is then passed to createTrack. So createTrack doesn't need the old flags parameter. For input, the audio_in_acoustics_t flags are passed to AudioSystem::getInput, which returns an audio_io_handle_t, and that handle is then passed to openRecord. So openRecord doesn't need the old flags parameter. Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
Diffstat (limited to 'include/media/IAudioFlinger.h')
-rw-r--r--include/media/IAudioFlinger.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 0f39cf3..2bae08e 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -43,6 +43,13 @@ class IAudioFlinger : public IInterface
public:
DECLARE_META_INTERFACE(AudioFlinger);
+ // or-able bits shared by createTrack and openRecord, but not all combinations make sense
+ enum {
+ TRACK_DEFAULT = 0,
+ TRACK_TIMED = 1,
+ };
+ typedef uint32_t track_flags_t;
+
/* create an audio track and registers it with AudioFlinger.
* return null if the track cannot be created.
*/
@@ -53,10 +60,9 @@ public:
audio_format_t format,
uint32_t channelMask,
int frameCount,
- uint32_t flags,
+ track_flags_t flags,
const sp<IMemory>& sharedBuffer,
audio_io_handle_t output,
- bool isTimed,
int *sessionId,
status_t *status) = 0;
@@ -67,7 +73,7 @@ public:
audio_format_t format,
uint32_t channelMask,
int frameCount,
- uint32_t flags,
+ track_flags_t flags,
int *sessionId,
status_t *status) = 0;