Loading media/libmedia/AudioRecord.cpp +21 −9 Original line number Diff line number Diff line Loading @@ -423,18 +423,30 @@ status_t AudioRecord::openRecord_l(size_t epoch) return NO_INIT; } IAudioFlinger::track_flags_t trackFlags = IAudioFlinger::TRACK_DEFAULT; pid_t tid = -1; // Fast tracks must be at the primary _output_ [sic] sampling rate, // because there is currently no concept of a primary input sampling rate uint32_t afSampleRate = AudioSystem::getPrimaryOutputSamplingRate(); if (afSampleRate == 0) { ALOGW("getPrimaryOutputSamplingRate failed"); } // Client can only express a preference for FAST. Server will perform additional tests. // The only supported use case for FAST is callback transfer mode. if (mFlags & AUDIO_INPUT_FLAG_FAST) { if ((mTransfer != TRANSFER_CALLBACK) || (mAudioRecordThread == 0)) { if ((mFlags & AUDIO_INPUT_FLAG_FAST) && !( // use case: callback transfer mode (mTransfer == TRANSFER_CALLBACK) && // matching sample rate (mSampleRate == afSampleRate))) { ALOGW("AUDIO_INPUT_FLAG_FAST denied by client"); // once denied, do not request again if IAudioRecord is re-created mFlags = (audio_input_flags_t) (mFlags & ~AUDIO_INPUT_FLAG_FAST); } else { } IAudioFlinger::track_flags_t trackFlags = IAudioFlinger::TRACK_DEFAULT; pid_t tid = -1; if (mFlags & AUDIO_INPUT_FLAG_FAST) { trackFlags |= IAudioFlinger::TRACK_FAST; if (mAudioRecordThread != 0) { tid = mAudioRecordThread->getTid(); } } Loading media/libmedia/AudioTrack.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -885,8 +885,8 @@ status_t AudioTrack::createTrack_l(size_t epoch) // either of these use cases: // use case 1: shared buffer (mSharedBuffer != 0) || // use case 2: callback handler (mCbf != NULL)) && // use case 2: callback transfer mode (mTransfer == TRANSFER_CALLBACK)) && // matching sample rate (mSampleRate == afSampleRate))) { ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by client"); Loading Loading
media/libmedia/AudioRecord.cpp +21 −9 Original line number Diff line number Diff line Loading @@ -423,18 +423,30 @@ status_t AudioRecord::openRecord_l(size_t epoch) return NO_INIT; } IAudioFlinger::track_flags_t trackFlags = IAudioFlinger::TRACK_DEFAULT; pid_t tid = -1; // Fast tracks must be at the primary _output_ [sic] sampling rate, // because there is currently no concept of a primary input sampling rate uint32_t afSampleRate = AudioSystem::getPrimaryOutputSamplingRate(); if (afSampleRate == 0) { ALOGW("getPrimaryOutputSamplingRate failed"); } // Client can only express a preference for FAST. Server will perform additional tests. // The only supported use case for FAST is callback transfer mode. if (mFlags & AUDIO_INPUT_FLAG_FAST) { if ((mTransfer != TRANSFER_CALLBACK) || (mAudioRecordThread == 0)) { if ((mFlags & AUDIO_INPUT_FLAG_FAST) && !( // use case: callback transfer mode (mTransfer == TRANSFER_CALLBACK) && // matching sample rate (mSampleRate == afSampleRate))) { ALOGW("AUDIO_INPUT_FLAG_FAST denied by client"); // once denied, do not request again if IAudioRecord is re-created mFlags = (audio_input_flags_t) (mFlags & ~AUDIO_INPUT_FLAG_FAST); } else { } IAudioFlinger::track_flags_t trackFlags = IAudioFlinger::TRACK_DEFAULT; pid_t tid = -1; if (mFlags & AUDIO_INPUT_FLAG_FAST) { trackFlags |= IAudioFlinger::TRACK_FAST; if (mAudioRecordThread != 0) { tid = mAudioRecordThread->getTid(); } } Loading
media/libmedia/AudioTrack.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -885,8 +885,8 @@ status_t AudioTrack::createTrack_l(size_t epoch) // either of these use cases: // use case 1: shared buffer (mSharedBuffer != 0) || // use case 2: callback handler (mCbf != NULL)) && // use case 2: callback transfer mode (mTransfer == TRANSFER_CALLBACK)) && // matching sample rate (mSampleRate == afSampleRate))) { ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by client"); Loading