OSDN Git Service

AudioRecord::openRecord_l now take flags
authorGlenn Kasten <gkasten@google.com>
Wed, 31 Jul 2013 23:10:53 +0000 (16:10 -0700)
committerGlenn Kasten <gkasten@google.com>
Fri, 2 Aug 2013 23:22:42 +0000 (16:22 -0700)
The new parameter 'flags' of type audio_input_flags_t will be used for
requesting a fast track, but is currently ignored.

Change-Id: If68dfda8b2d4eaaca42927d721b4630c47f71f3b

include/media/AudioRecord.h
media/libmedia/AudioRecord.cpp

index bcf2039..7c240b4 100644 (file)
@@ -423,6 +423,7 @@ private:
             status_t openRecord_l(uint32_t sampleRate,
                                 audio_format_t format,
                                 size_t frameCount,
+                                audio_input_flags_t flags,
                                 audio_io_handle_t input,
                                 size_t epoch);
 
index b5060b1..dfaac4c 100644 (file)
@@ -253,7 +253,7 @@ status_t AudioRecord::set(
     }
 
     // create the IAudioRecord
-    status = openRecord_l(sampleRate, format, frameCount, input, 0 /*epoch*/);
+    status = openRecord_l(sampleRate, format, frameCount, mFlags, input, 0 /*epoch*/);
     if (status != NO_ERROR) {
         return status;
     }
@@ -438,6 +438,7 @@ status_t AudioRecord::openRecord_l(
         uint32_t sampleRate,
         audio_format_t format,
         size_t frameCount,
+        audio_input_flags_t flags,
         audio_io_handle_t input,
         size_t epoch)
 {
@@ -911,7 +912,7 @@ status_t AudioRecord::restoreRecord_l(const char *from)
     // It will also delete the strong references on previous IAudioRecord and IMemory
     size_t position = mProxy->getPosition();
     mNewPosition = position + mUpdatePeriod;
-    result = openRecord_l(mSampleRate, mFormat, mFrameCount, getInput_l(), position);
+    result = openRecord_l(mSampleRate, mFormat, mFrameCount, mFlags, getInput_l(), position);
     if (result == NO_ERROR) {
         if (mActive) {
             // callback thread or sync event hasn't changed