diff options
author | Glenn Kasten <gkasten@google.com> | 2012-03-06 11:22:44 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-03-19 09:04:23 -0700 |
commit | 84569cc4e106ff4d6c6855b46e546572c5dda6b2 (patch) | |
tree | fe011add47cfa96d538178b429332040f9c49775 /services/audioflinger | |
parent | f6b8f7b34f5fe94cd1d8753ec356b967293f1f9c (diff) | |
download | frameworks_base-84569cc4e106ff4d6c6855b46e546572c5dda6b2.zip frameworks_base-84569cc4e106ff4d6c6855b46e546572c5dda6b2.tar.gz frameworks_base-84569cc4e106ff4d6c6855b46e546572c5dda6b2.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 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 8 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index d83d19a..993192c 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -442,11 +442,9 @@ sp<IAudioTrack> AudioFlinger::createTrack( audio_format_t format, uint32_t channelMask, int frameCount, - // FIXME dead, remove from IAudioFlinger - uint32_t flags, + IAudioFlinger::track_flags_t flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, - bool isTimed, int *sessionId, status_t *status) { @@ -504,6 +502,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( } ALOGV("createTrack() lSessionId: %d", lSessionId); + bool isTimed = (flags & IAudioFlinger::TRACK_TIMED) != 0; track = thread->createTrack_l(client, streamType, sampleRate, format, channelMask, frameCount, sharedBuffer, lSessionId, isTimed, &lStatus); @@ -4677,8 +4676,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( audio_format_t format, uint32_t channelMask, int frameCount, - // FIXME dead, remove from IAudioFlinger - uint32_t flags, + IAudioFlinger::track_flags_t flags, int *sessionId, status_t *status) { diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 0e4b24a..a9afcb3 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -87,10 +87,9 @@ public: audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + IAudioFlinger::track_flags_t flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, - bool isTimed, int *sessionId, status_t *status); @@ -101,7 +100,7 @@ public: audio_format_t format, uint32_t channelMask, int frameCount, - uint32_t flags, + IAudioFlinger::track_flags_t flags, int *sessionId, status_t *status); |