Home
last modified time | relevance | path

Searched refs:sampleRate (Results 1 – 20 of 20) sorted by relevance

/cts/tests/tests/media/src/android/media/cts/
DAudioHelper.java35 public static byte[] createSoundDataInByteArray(int bufferSamples, final int sampleRate, in createSoundDataInByteArray() argument
37 final double rad = 2 * Math.PI * frequency / sampleRate; in createSoundDataInByteArray()
39 sweep = Math.PI * sweep / ((double)sampleRate * vai.length); in createSoundDataInByteArray()
48 public static short[] createSoundDataInShortArray(int bufferSamples, final int sampleRate, in createSoundDataInShortArray() argument
50 final double rad = 2 * Math.PI * frequency / sampleRate; in createSoundDataInShortArray()
52 sweep = Math.PI * sweep / ((double)sampleRate * vai.length); in createSoundDataInShortArray()
59 public static float[] createSoundDataInFloatArray(int bufferSamples, final int sampleRate, in createSoundDataInFloatArray() argument
61 final double rad = 2 * Math.PI * frequency / sampleRate; in createSoundDataInFloatArray()
63 sweep = Math.PI * sweep / ((double)sampleRate * vaf.length); in createSoundDataInFloatArray()
214 public AudioRecordAudit(int audioSource, int sampleRate, int channelMask, in AudioRecordAudit() argument
[all …]
DAudioTrackNative.java45 public boolean open(int numChannels, int sampleRate, boolean useFloat, int numBuffers) { in open() argument
46 if (nativeOpen(mNativeTrackInJavaObj, numChannels, sampleRate, useFloat, numBuffers) in open()
112 public static boolean test(int numChannels, int sampleRate, boolean useFloat, in test() argument
114 return nativeTest(numChannels, sampleRate, useFloat, msecPerBuffer, numBuffers) in test()
142 long track, int numChannels, int sampleRate, boolean useFloat, int numBuffers); in nativeOpen() argument
159 int numChannels, int sampleRate, boolean useFloat, int msecPerBuffer, int numBuffers); in nativeTest() argument
DAudioRecordNative.java42 public boolean open(int numChannels, int sampleRate, boolean useFloat, int numBuffers) { in open() argument
43 if (nativeOpen(mNativeRecordInJavaObj, numChannels, sampleRate, useFloat, numBuffers) in open()
105 public static boolean test(int numChannels, int sampleRate, boolean useFloat, in test() argument
107 return nativeTest(numChannels, sampleRate, useFloat, msecPerBuffer, numBuffers) in test()
135 long record, int numChannels, int sampleRate, boolean useFloat, int numBuffers); in nativeOpen() argument
152 int numChannels, int sampleRate, boolean useFloat, int msecPerBuffer, int numBuffers); in nativeTest() argument
DNonBlockingAudioTrack.java47 public NonBlockingAudioTrack(int sampleRate, int channelCount, boolean hwAvSync, in NonBlockingAudioTrack() argument
66 sampleRate, in NonBlockingAudioTrack()
75 sampleRate, in NonBlockingAudioTrack()
90 .setSampleRate(sampleRate) in NonBlockingAudioTrack()
96 mSampleRate = sampleRate; in NonBlockingAudioTrack()
DAudioNativeTest.java199 int numChannels, int sampleRate, boolean useFloat, in doRecordTest() argument
204 assertTrue(TEST_NAME, record.open(numChannels, sampleRate, useFloat, in doRecordTest()
209 (int)((long)sampleRate * segmentDurationMs * numChannels / 1000); in doRecordTest()
DCodecState.java275 int sampleRate = in onOutputFormatChanged() local
282 " sampleRate:" + sampleRate + " channels:" + channelCount); in onOutputFormatChanged()
288 sampleRate < 8000 || sampleRate > 128000) { in onOutputFormatChanged()
291 mAudioTrack = new NonBlockingAudioTrack(sampleRate, channelCount, in onOutputFormatChanged()
DEncoderTest.java264 int sampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE); in testEncoder() local
266 int inBitrate = sampleRate * channelCount * 16; // bit/sec in testEncoder()
DMediaCodecListTest.java79 AudioCodec(String mime, boolean isEncoder, int sampleRate) { in AudioCodec() argument
81 mime, sampleRate, 1 /* channelCount */)); in AudioCodec()
DAudioTrackTest.java2059 int sampleRate = sampleRates[i]; in testVariableRatePlayback() local
2064 assertEquals(TEST_NAME, AudioTrack.SUCCESS, track.setPlaybackRate(sampleRate)); in testVariableRatePlayback()
2069 sampleRate += deltaFreq; in testVariableRatePlayback()
2070 sampleRate = Math.min(TEST_FINAL_SR, Math.max(TEST_SR, sampleRate)); in testVariableRatePlayback()
2071 assertEquals(TEST_NAME, AudioTrack.SUCCESS, track.setPlaybackRate(sampleRate)); in testVariableRatePlayback()
2073 / sampleRate / bytesPerFrame); in testVariableRatePlayback()
2081 final int tolerance60MsInFrames = sampleRate * 60 / 1000; in testVariableRatePlayback()
2082 final int expected = lastCheckMs * sampleRate / 1000; in testVariableRatePlayback()
DAudioRecordTest.java1018 public synchronized void start(int sampleRate) { in start() argument
1020 mSampleRate = sampleRate; in start()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DAudioRecordHelper.java28 private final int sampleRate; field in AudioRecordHelper
56 sampleRate = tmpSampleRate; in AudioRecordHelper()
58 Log.d(TAG, "Sample rate = " + sampleRate + "Hz, Source = " in AudioRecordHelper()
76 audioRecord = new AudioRecord(source, sampleRate, CHANNEL, ENCODING, bufferSize); in start()
121 return sampleRate; in getSampleRate()
DWavAnalyzer.java13 private final int sampleRate; // Recording sampling rate. field in WavAnalyzer
25 public WavAnalyzer(byte[] byteData, int sampleRate, Listener listener) { in WavAnalyzer() argument
27 this.sampleRate = sampleRate; in WavAnalyzer()
135 + Util.toLength(Common.PREFIX_LENGTH_S + Common.PAUSE_AFTER_PREFIX_DURATION_S, sampleRate); in measurePipStrength()
137 listener.sendMessage("Prefix starts at " + (double) dataStartI / sampleRate + " s \n"); in measurePipStrength()
138 if (dataStartI > Math.round(sampleRate * (Common.PREFIX_LENGTH_S in measurePipStrength()
161 -2.0 * Math.PI * freq / sampleRate).exp(); in measurePipStrength()
189 + Util.toLength(i * (Common.PIP_DURATION_S + Common.PAUSE_DURATION_S), sampleRate); in measurePipStrength()
198 -2.0 * Math.PI * Common.FREQUENCIES[i] / sampleRate).exp(); in measurePipStrength()
224 int fftSize = Util.nextPowerOfTwo((int) Math.round(sampleRate * (Common.PREFIX_LENGTH_S in alignData()
DUtil.java17 public static int toLength(double duration, int sampleRate) { in toLength() argument
18 return (int) Math.round(duration * sampleRate); in toLength()
DHifiUltrasoundTestActivity.java298 private void play(byte[] data, int sampleRate) { in play() argument
304 sampleRate, AudioFormat.CHANNEL_OUT_MONO, in play()
306 sampleRate, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT)), in play()
DHifiUltrasoundSpeakerTestActivity.java337 private void play(byte[] data, int sampleRate) { in play() argument
343 sampleRate, AudioFormat.CHANNEL_OUT_MONO, in play()
345 sampleRate, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT)), in play()
/cts/tests/tests/media/libaudiojni/
Daudio-track-native.cpp73 status_t open(uint32_t numChannels, uint32_t sampleRate, bool useFloat, in open() argument
110 pcm.sampleRate = sampleRate * 1000; in open()
380 jint numChannels, jint sampleRate, jboolean useFloat, in Java_android_media_cts_AudioTrackNative_nativeTest() argument
385 const size_t framesPerBuffer = msecPerBuffer * sampleRate / 1000; in Java_android_media_cts_AudioTrackNative_nativeTest()
390 res = track.open(numChannels, sampleRate, useFloat, numBuffers); in Java_android_media_cts_AudioTrackNative_nativeTest()
429 jint numChannels, jint sampleRate, jboolean useFloat, jint numBuffers) in Java_android_media_cts_AudioTrackNative_nativeOpen() argument
435 return (jint)track->open(numChannels, sampleRate, useFloat == JNI_TRUE, in Java_android_media_cts_AudioTrackNative_nativeOpen()
Daudio-record-native.cpp78 status_t open(uint32_t numChannels, uint32_t sampleRate, bool useFloat, uint32_t numBuffers) { in open() argument
119 pcm.sampleRate = sampleRate * 1000; in open()
167 mBufferSize = (BUFFER_SIZE_MSEC * sampleRate / 1000) in open()
438 jint numChannels, jint sampleRate, jboolean useFloat, in Java_android_media_cts_AudioRecordNative_nativeTest() argument
443 const size_t framesPerBuffer = msecPerBuffer * sampleRate / 1000; in Java_android_media_cts_AudioRecordNative_nativeTest()
448 res = record.open(numChannels, sampleRate, useFloat, numBuffers); in Java_android_media_cts_AudioRecordNative_nativeTest()
486 jint numChannels, jint sampleRate, jboolean useFloat, jint numBuffers) in Java_android_media_cts_AudioRecordNative_nativeOpen() argument
492 return (jint)record->open(numChannels, sampleRate, useFloat == JNI_TRUE, in Java_android_media_cts_AudioRecordNative_nativeOpen()
/cts/apps/CtsVerifier/jni/audio_loopback/
Dsles.h39 SLuint32 sampleRate; // -s# member
Dsles.cpp251 pSles->sampleRate = samplingRate;//48000; // -s# in slesCreateServer()
358 pcm.samplesPerSec = pSles->sampleRate * 1000; in slesCreateServer()
/cts/suite/cts/deviceTests/browserbench/assets/octane/
Dgbemu.js114 this.sampleRate = 48000;
116 this.createBuffer = function (channels, len, sampleRate) { argument
121 sampleRate : 48000}
484 function XAudioServer(channels, sampleRate, minBufferSize, maxBufferSize, underRunCallback, volume)… argument
487 XAudioJSSampleRate = (sampleRate > 0 && sampleRate <= 0xFFFFFF) ? sampleRate : 44100;
937 XAudioJSSampleRate = webAudioActualSampleRate = audioContextHandle.sampleRate;