diff options
| author | Glenn Kasten <gkasten@google.com> | 2013-08-01 17:13:07 -0700 |
|---|---|---|
| committer | Glenn Kasten <gkasten@google.com> | 2013-08-01 17:23:05 -0700 |
| commit | 5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc (patch) | |
| tree | a17d211446e3acfa74e5284478e9386990037a87 | |
| parent | 03a012a855b7edcda0b799031d70765769057be5 (diff) | |
| download | android_frameworks_wilhelm-5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc.tar.gz android_frameworks_wilhelm-5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc.tar.bz2 android_frameworks_wilhelm-5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc.zip | |
Always request fast track for recording
Change-Id: I76fc395e3b1babe41522023a56a37e4310b248e3
| -rw-r--r-- | src/android/AudioRecorder_to_android.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/android/AudioRecorder_to_android.cpp b/src/android/AudioRecorder_to_android.cpp index 8fcdeb1..ebb9592 100644 --- a/src/android/AudioRecorder_to_android.cpp +++ b/src/android/AudioRecorder_to_android.cpp @@ -393,6 +393,9 @@ SLresult android_audioRecorder_realize(CAudioRecorder* ar, SLboolean async) { SL_LOGV("new AudioRecord %u channels, %u mHz", ar->mNumChannels, ar->mSampleRateMilliHz); + // currently nothing analogous to canUseFastTrack() for recording + audio_input_flags_t policy = AUDIO_INPUT_FLAG_FAST; + // initialize platform-specific CAudioRecorder fields ar->mAudioRecord = new android::AudioRecord(); ar->mAudioRecord->set(ar->mRecordSource, // source @@ -404,8 +407,12 @@ SLresult android_audioRecorder_realize(CAudioRecorder* ar, SLboolean async) { audioRecorder_callback,// callback_t (void*)ar, // user, callback data, here the AudioRecorder 0, // notificationFrames - false); // threadCanCallJava, note: this will prevent direct Java + false, // threadCanCallJava, note: this will prevent direct Java // callbacks, but we don't want them in the recording loop + 0, // session ID + android::AudioRecord::TRANSFER_CALLBACK, + // transfer type + policy); // audio_input_flags_t if (android::NO_ERROR != ar->mAudioRecord->initCheck()) { SL_LOGE("android_audioRecorder_realize(%p) error creating AudioRecord object", ar); |
