diff options
| author | Glenn Kasten <gkasten@google.com> | 2013-08-06 20:29:52 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-06 20:29:52 +0000 |
| commit | f0c3b4edf597c40aae4ea311575f39c8bcf203df (patch) | |
| tree | 01fff43e1c87da5cad9a5d5665e5915b79de6a59 /src | |
| parent | 8191551b15a58cf988ee3b21ebbb5a27c94e9653 (diff) | |
| parent | 5e3bcbffacc309fb2d9e002b7bc1ed131fddc6fc (diff) | |
| download | android_frameworks_wilhelm-f0c3b4edf597c40aae4ea311575f39c8bcf203df.tar.gz android_frameworks_wilhelm-f0c3b4edf597c40aae4ea311575f39c8bcf203df.tar.bz2 android_frameworks_wilhelm-f0c3b4edf597c40aae4ea311575f39c8bcf203df.zip | |
Merge "Always request fast track for recording"
Diffstat (limited to 'src')
| -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); |
