Home
last modified time | relevance | path

Searched refs:mSampleRate (Results 1 – 25 of 126) sorted by relevance

123456

/frameworks/av/media/libaudioprocessing/
DAudioResamplerDyn.cpp192 mConstants.set(128, 8, mSampleRate, mSampleRate); // TODO: set better in AudioResamplerDyn()
359 !isClose(inSampleRate, oldSampleRate, mFilterSampleRate, mSampleRate)) { in setSampleRate()
377 if (mPropertyEnableAtSampleRate >= 0 && mSampleRate >= mPropertyEnableAtSampleRate) { in setSampleRate()
390 fcr = mInSampleRate <= mSampleRate in setSampleRate()
391 ? 0.5 : 0.5 * mSampleRate / mInSampleRate; in setSampleRate()
407 if (inSampleRate >= mSampleRate * 4) { in setSampleRate()
409 } else if (inSampleRate >= mSampleRate * 2) { in setSampleRate()
415 if (mSampleRate <= kVoiceDeviceSampleRate) { in setSampleRate()
416 if (inSampleRate >= mSampleRate * 2) { in setSampleRate()
428 if (inSampleRate >= mSampleRate * 4) { in setSampleRate()
[all …]
/frameworks/av/services/audioflinger/fastpath/
DFastCapture.cpp96 mSampleRate = 0; in onStateChange()
99 mSampleRate = Format_sampleRate(mFormat); in onStateChange()
105 dumpState->mSampleRate = mSampleRate; in onStateChange()
125 if (frameCount > 0 && mSampleRate > 0) { in onStateChange()
132 mPeriodNs = (frameCount * 1000000000LL) / mSampleRate; // 1.00 in onStateChange()
133 mUnderrunNs = (frameCount * 1750000000LL) / mSampleRate; // 1.75 in onStateChange()
134 mOverrunNs = (frameCount * 500000000LL) / mSampleRate; // 0.50 in onStateChange()
135 mForceNs = (frameCount * 950000000LL) / mSampleRate; // 0.95 in onStateChange()
136 mWarmupNsMin = (frameCount * 750000000LL) / mSampleRate; // 0.75 in onStateChange()
137 mWarmupNsMax = (frameCount * 1250000000LL) / mSampleRate; // 1.25 in onStateChange()
DFastMixer.cpp217 mSampleRate = 0; in onStateChange()
223 mSampleRate = Format_sampleRate(mFormat); in onStateChange()
233 dumpState->mSampleRate = mSampleRate; in onStateChange()
244 if (frameCount > 0 && mSampleRate > 0) { in onStateChange()
248 mMixer = new AudioMixer(frameCount, mSampleRate); in onStateChange()
252 params.sampleRate = mSampleRate; in onStateChange()
264 mPeriodNs = (frameCount * 1000000000LL) / mSampleRate; // 1.00 in onStateChange()
265 mUnderrunNs = (frameCount * 1750000000LL) / mSampleRate; // 1.75 in onStateChange()
266 mOverrunNs = (frameCount * 500000000LL) / mSampleRate; // 0.50 in onStateChange()
267 mForceNs = (frameCount * 950000000LL) / mSampleRate; // 0.95 in onStateChange()
[all …]
DFastCaptureDumpState.cpp35 const double periodSec = (double) mFrameCount / mSampleRate; in dump()
41 mReadErrors, mSampleRate, mFrameCount, measuredWarmupMs, mWarmupCycles, in dump()
/frameworks/av/media/libeffects/lvm/tests/
DEffectBundleTest.cpp55 mSampleRate(EffectTestHelper::kSampleRates[std::get<1>(GetParam())]), in SingleEffectTest()
64 const size_t mSampleRate; member in SingleEffectTest
75 << "chMask: " << mChMask << " sampleRate: " << mSampleRate in TEST_P()
78 EffectTestHelper effect(&mUuid, mChMask, mChMask, mSampleRate, mFrameCount, mLoopCount); in TEST_P()
108 : mSampleRate(EffectTestHelper::kSampleRates[std::get<0>(GetParam())]), in SingleEffectComparisonTest()
115 const size_t mSampleRate; member in SingleEffectComparisonTest
125 SCOPED_TRACE(testing::Message() << " sampleRate: " << mSampleRate << " frameCount: " in TEST_P()
131 std::minstd_rand gen(mSampleRate); in TEST_P()
144 mSampleRate, mFrameCount, mLoopCount); in TEST_P()
159 EffectTestHelper testEffect(&mUuid, chMask, chMask, mSampleRate, mFrameCount, mLoopCount); in TEST_P()
[all …]
DEffectReverbTest.cpp74 : mSampleRate(kSampleRates[std::get<1>(GetParam())]), in SingleEffectTest()
86 const size_t mSampleRate; member in SingleEffectTest
100 SCOPED_TRACE(testing::Message() << "outChMask: " << mOutChMask << " sampleRate: " << mSampleRate in TEST_P()
104 EffectTestHelper effect(mUuid, mInChMask, mOutChMask, mSampleRate, mFrameCount, mLoopCount); in TEST_P()
136 : mSampleRate(kSampleRates[std::get<0>(GetParam())]), in SingleEffectComparisonTest()
143 const size_t mSampleRate; member in SingleEffectComparisonTest
154 << " sampleRate: " << mSampleRate << " frameCount: " << mFrameCount in TEST_P()
160 std::minstd_rand gen(mSampleRate); in TEST_P()
174 AUDIO_CHANNEL_OUT_STEREO, mSampleRate, mFrameCount, mLoopCount); in TEST_P()
201 EffectTestHelper testEffect(mUuid, inChMask, outChMask, mSampleRate, mFrameCount, in TEST_P()
/frameworks/av/media/libeffects/hapticgenerator/aidl/
DHapticGeneratorContext.cpp126 mParams.mVibratorInfo.resonantFrequencyHz, DEFAULT_BPF_Q, mSampleRate)); in setHgVibratorInformation()
131 mParams.mVibratorInfo.qFactor / 2.0f, mSampleRate)); in setHgVibratorInformation()
193 mSampleRate = common.input.base.sampleRate; in init_params()
243 mSampleRate, channelCount); in buildProcessingChain()
247 mSampleRate, channelCount); in buildProcessingChain()
263 mSampleRate, channelCount); in buildProcessingChain()
266 lpf = ::android::audio_effect::haptic_generator::createLPF2(lowPassCornerFrequency, mSampleRate, in buildProcessingChain()
271 lpf = ::android::audio_effect::haptic_generator::createLPF2(lowPassCornerFrequency, mSampleRate, in buildProcessingChain()
275 lpf = ::android::audio_effect::haptic_generator::createLPF2(lowPassCornerFrequency, mSampleRate, in buildProcessingChain()
280 mParams.mVibratorInfo.resonantFrequencyHz, DEFAULT_BPF_Q, mSampleRate, channelCount); in buildProcessingChain()
[all …]
/frameworks/av/media/libaaudio/src/core/
DAAudioStreamParameters.cpp35 mSampleRate = other.mSampleRate; in copyFrom()
108 if (mSampleRate != AAUDIO_UNSPECIFIED in validate()
109 && (mSampleRate < SAMPLE_RATE_HZ_MIN || mSampleRate > SAMPLE_RATE_HZ_MAX)) { in validate()
110 ALOGD("sampleRate out of range = %d", mSampleRate); in validate()
302 ALOGD("mSampleRate = %6d", mSampleRate); in dump()
/frameworks/av/media/libeffects/preprocessing/tests/
DEffectPreprocessingTest.cpp159 : mSampleRate(EffectTestHelper::kSampleRates[std::get<1>(GetParam())]), in SingleEffectTest()
160 mFrameCount(mSampleRate * EffectTestHelper::kTenMilliSecVal), in SingleEffectTest()
168 const size_t mSampleRate; member in SingleEffectTest
180 SCOPED_TRACE(testing::Message() << " chMask: " << mChMask << " sampleRate: " << mSampleRate in TEST_P()
183 EffectTestHelper effect(mUuid, mChMask, mSampleRate, mLoopCount); in TEST_P()
222 : mSampleRate(EffectTestHelper::kSampleRates[std::get<0>(GetParam())]), in SingleEffectComparisonTest()
223 mFrameCount(mSampleRate * EffectTestHelper::kTenMilliSecVal), in SingleEffectComparisonTest()
229 const size_t mSampleRate; member in SingleEffectComparisonTest
239 SCOPED_TRACE(testing::Message() << " sampleRate: " << mSampleRate in TEST_P()
246 std::minstd_rand gen(mSampleRate); in TEST_P()
[all …]
DEffectTestHelper.h59 mSampleRate(sampleRate), in EffectTestHelper()
60 mFrameCount(mSampleRate * kTenMilliSecVal), in EffectTestHelper()
106 const size_t mSampleRate; variable
/frameworks/av/media/libeffects/spatializer/tests/
DSpatializerTest.cpp80 mSampleRate(kSpatializerSampleRates[std::get<1>(GetParam())]), in SingleEffectTest()
93 const size_t mSampleRate; member in SingleEffectTest
104 << "chMask: " << mInputChMask << " sampleRate: " << mSampleRate); in TEST_P()
106 EffectTestHelper effect(mUuid, mInputChMask, mOutputChMask, mSampleRate, mFrameCount, in TEST_P()
141 mSampleRate(kSpatializerSampleRates[std::get<1>(GetParam())]), in SingleEffectComparisonTest()
148 const size_t mSampleRate; member in SingleEffectComparisonTest
162 << "chMask: " << mInputChMask << " sampleRate: " << mSampleRate); in TEST_P()
164 int testFrameCount = (mSampleRate * testDurationMs) / 1000; in TEST_P()
179 EffectTestHelper refEffect(mUuid, mInputChMask, mOutputChMask, mSampleRate, totalFrameCount, 1); in TEST_P()
185 EffectTestHelper testEffect(mUuid, mInputChMask, mOutputChMask, mSampleRate, in TEST_P()
/frameworks/av/media/codec2/sfplugin/
DFrameReassembler.cpp32 mSampleRate(0u),
48 mSampleRate = sampleRate; in init()
60 mSampleRate = sampleRate; in updateSampleRate()
78 mSampleRate = 0u; in reset()
101 endTimestampUs += bytesToSamples(mWriteView->size()) * 1000000 / mSampleRate; in process()
140 timeUs += bytesToSamples(copySize) * 1000000 / mSampleRate; in process()
193 return (us * mChannelCount * mSampleRate / 1000000); in usToSamples()
221 mCurrentOrdinal.timestamp += mFrameSize.value() * 1000000 / mSampleRate; in finishCurrentBlock()
/frameworks/av/cmds/stagefright/
DSineSource.cpp15 mSampleRate(sampleRate), in SineSource()
55 meta->setInt32(kKeySampleRate, mSampleRate); in getFormat()
81 const double k = kFrequency / mSampleRate * (2.0 * M_PI); in read()
96 kKeyTime, ((int64_t)mPhase * 1000000) / mSampleRate); in read()
DAudioPlayer.cpp44 mSampleRate(0), in AudioPlayer()
134 success = format->findInt32(kKeySampleRate, &mSampleRate); in start()
193 offloadInfo.sample_rate = mSampleRate; in start()
203 mSampleRate, numChannels, channelMask, audioFormat, in start()
251 AUDIO_STREAM_MUSIC, mSampleRate, AUDIO_FORMAT_PCM_16_BIT, audioMask, in start()
569 / mSampleRate; in fillBuffer()
629 mSampleRate = sampleRate; in getOutputPlayPositionUs_l()
633 if (mSampleRate != 0) { in getOutputPlayPositionUs_l()
634 playedUs = (static_cast<int64_t>(playedSamples) * 1000000 ) / mSampleRate; in getOutputPlayPositionUs_l()
/frameworks/base/media/java/android/media/
DAudioFormat.java1019 mSampleRate = (propertySetMask & AUDIO_FORMAT_HAS_PROPERTY_SAMPLE_RATE) != 0 in AudioFormat()
1065 private final int mSampleRate; field in AudioFormat
1092 return mSampleRate; in getSampleRate()
1155 mChannelCount, mSampleRate, toLogFriendlyEncoding(mEncoding)); in toLogFriendlyString()
1175 private int mSampleRate = SAMPLE_RATE_UNSPECIFIED; field in AudioFormat.Builder
1192 mSampleRate = af.mSampleRate; in Builder()
1207 mSampleRate, in build()
1376 mSampleRate = sampleRate; in setSampleRate()
1395 && (mSampleRate != that.mSampleRate)) in equals()
1404 return Objects.hash(mPropertySetMask, mSampleRate, mEncoding, mChannelMask, in hashCode()
[all …]
/frameworks/av/media/libnbaio/
DNBAIO.cpp37 return format.mSampleRate; in Format_sampleRate()
55 ret.mSampleRate = sampleRate; in Format_from_SR_C()
159 return format.mSampleRate != 0 && format.mChannelCount != 0 && in Format_isValid()
165 return format1.mSampleRate == format2.mSampleRate && in Format_isEqual()
/frameworks/opt/net/voip/src/jni/rtp/
DAudioGroup.cpp129 int mSampleRate; member in __anon3727f2a40111::AudioStream
182 mSampleRate = sampleRate / 1000; in set()
184 mInterval = mSampleCount / mSampleRate; in set()
187 for (mBufferMask = 8; mBufferMask < mSampleRate; mBufferMask <<= 1); in set()
226 (codec ? codec->name : "RAW"), mSampleRate, mInterval, mMode); in set()
254 head *= mSampleRate; in mix()
255 tail *= mSampleRate; in mix()
257 if (sampleRate == mSampleRate) { in mix()
288 if (duration >= 0 && duration < mSampleRate * DTMF_PERIOD) { in encode()
296 if (duration >= mSampleRate * DTMF_PERIOD) { in encode()
[all …]
/frameworks/av/services/audioflinger/timing/
DSynchronizedRecordState.h30 : mSampleRate(sampleRate) in SynchronizedRecordState()
48 ((AudioSystem::kSyncRecordStartTimeOutMs * mSampleRate) / 1000); in startRecording()
89 const uint32_t mSampleRate;
/frameworks/av/media/module/extractors/wav/
DWAVExtractor.cpp98 uint32_t mSampleRate; member
234 mSampleRate = U32_LE_AT(&formatSpec[4]); in init()
236 if (mSampleRate == 0) { in init()
333 AMediaFormat_setInt32(mTrackMeta, AMEDIAFORMAT_KEY_SAMPLE_RATE, mSampleRate); in init()
348 if (!mSampleRate) in init()
352 1000000LL * num_samples / mSampleRate; in init()
382 CHECK(AMediaFormat_getInt32(mMeta, AMEDIAFORMAT_KEY_SAMPLE_RATE, (int32_t*) &mSampleRate)); in WAVSource()
445 bool overflowed = __builtin_mul_overflow(seekTimeUs, mSampleRate, &sampleNumber); in read()
568 timeStampUs = 1000000LL * (mCurrentPos - mOffset) * 320 / 65 / mSampleRate; in read()
572 / (mNumChannels * bytesPerSample) / mSampleRate; in read()
/frameworks/av/media/libaudioclient/tests/
Dtrackplayerbase_tests.cpp44 mSampleRate(std::get<3>(GetParam())){}; in TrackPlayerBaseTest()
47 mFrameCount = mDuration * mSampleRate; in SetUp()
49 sp<AudioTrack> track = new AudioTrack(mStreamType, mSampleRate, mFormat, channelMask, in SetUp()
65 int32_t nPulseSamples = mSampleRate / mPulseFreq; in SetUp()
87 const uint32_t mSampleRate; member in TrackPlayerBaseTest
/frameworks/av/media/libaudioprocessing/include/media/
DAudioResampler.h103 const int32_t mSampleRate; variable
144 + (mSampleRate - 1))/mSampleRate; in getInFrameCountRequired()
/frameworks/av/media/libaudioprocessing/tests/
Dtest_utils.h245 : mSampleRate(0),
260 createChirp<T>(mAddr, mNumFrames, mChannels, mSampleRate, minfreq, maxfreq);
268 createSine<T>(mAddr, mNumFrames, mChannels, mSampleRate, freq);
298 mSampleRate = sampleRate;
302 return mSampleRate;
310 uint32_t mSampleRate;
/frameworks/av/media/module/codecs/mp3dec/test/
Dmp3reader.h37 uint32_t getSampleRate() { return mSampleRate;} in getSampleRate()
45 uint32_t mSampleRate; variable
/frameworks/av/media/codec2/components/opus/
DC2SoftOpusEnc.cpp64 DefineParam(mSampleRate, C2_PARAMKEY_SAMPLE_RATE) in IntfImpl()
66 .withFields({C2F(mSampleRate, value).oneOf({ in IntfImpl()
68 .withSetter((Setter<decltype(*mSampleRate)>::StrictValueWithNoDeps)) in IntfImpl()
111 uint32_t getSampleRate() const { return mSampleRate->value; } in getSampleRate()
118 std::shared_ptr<C2StreamSampleRateInfo::input> mSampleRate; member in android::C2SoftOpusEnc::IntfImpl
148 mSampleRate = mIntf->getSampleRate(); in configureEncoder()
153 mNumSamplesPerFrame = mSampleRate / (1000 / mFrameDurationMs); in configureEncoder()
172 mEncoder = opus_multistream_encoder_create(mSampleRate, mChannelCount, in configureEncoder()
439 mCodecDelay = lookahead * 1000000000ll / mSampleRate; in process()
449 int headerLen = WriteOpusHeaders(opusHeader, mSampleRate, header, in process()
[all …]
/frameworks/av/media/libstagefright/
DAudioSource.cpp80 mSampleRate = sampleRate; in set()
227 meta->setInt32(kKeySampleRate, mSampleRate); in getFormat()
299 … ((int64_t)kAutoRampDurationUs * mSampleRate + 500000LL) / 1000000LL; //Need type casting in read()
302 … ((int64_t)kAutoRampStartUs * mSampleRate + 500000LL) / 1000000LL; //Need type casting in read()
315 if (mSampleRate != mOutSampleRate) { in read()
316 timeUs *= (int64_t)mSampleRate / (int64_t)mOutSampleRate; in read()
361 mNumFramesReceived + mNumFramesLost) * usPerSec / mSampleRate; in onMoreData()
462 (mSampleRate >> 1)) / mSampleRate; in queueInputBuffer_l()

123456