赞
踩
- BnAudioPolicyService::onTransact(
- case GET_INPUT:
- audio_io_handle_t input = getInput(inputSource,
- samplingRate,
- format,
- channels,
- acoustics); // 调用的是AudioPolicyService::getInput函数
->
- AudioHardwareALSA::openInputStream
- err = mALSADevice->open(&(*it), devices, mode(), 0);
-
- in = new AudioStreamInALSA(this, &(*it), acoustics);
- err = in->set(format, channels, sampleRate);
->
- ALSAStreamOps::set
- if (rate && *rate > 0) {
- if (mHandle->sampleRate != *rate) {
- LOGE("%s L%d mHandle->sampleRate = %d, return BAD_VALUE %d ", __FUNCTION__, __LINE__, mHandle->sampleRate, BAD_VALUE);
- return BAD_VALUE;
- }
- }
E/AudioHardwareALSA( 1181): set L123 mHandle->sampleRate = 8000, return BAD_VALUE -22 // 如果采样率不是8000,则返回BAD_VALUE
- // start recording
- synchronized(mRecordingStateLock) { // 一直处于同步状态,同一时间只能有一个录音
- if (native_start() == SUCCESS) { // 调用native方法
- mRecordingState = RECORDSTATE_RECORDING;
- }
- }
->
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。