From 84569cc4e106ff4d6c6855b46e546572c5dda6b2 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 6 Mar 2012 11:22:44 -0800 Subject: 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 --- services/audioflinger/AudioFlinger.cpp | 8 +++----- services/audioflinger/AudioFlinger.h | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'services') 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 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& sharedBuffer, audio_io_handle_t output, - bool isTimed, int *sessionId, status_t *status) { @@ -504,6 +502,7 @@ sp 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 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& 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); -- cgit v1.1