Home
last modified time | relevance | path

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

/cts/tests/tests/media/src/android/media/cts/
DAudioTrackNative.java45 public boolean open(int numChannels, int sampleRate, boolean useFloat, int numBuffers) { in open() argument
46 return open(numChannels, 0, sampleRate, useFloat, numBuffers); in open()
49 public boolean open(int numChannels, int channelMask, int sampleRate, in open() argument
52 sampleRate, useFloat, numBuffers) == STATUS_OK) { in open()
117 public static boolean test(int numChannels, int sampleRate, boolean useFloat, in test() argument
119 return test(numChannels, 0, sampleRate, useFloat, msecPerBuffer, numBuffers); in test()
122 public static boolean test(int numChannels, int channelMask, int sampleRate, boolean useFloat, in test() argument
124 return nativeTest(numChannels, channelMask, sampleRate, useFloat, msecPerBuffer, numBuffers) in test()
153 int sampleRate, boolean useFloat, int numBuffers); in nativeOpen() argument
170 int numChannels, int channelMask, int sampleRate, in nativeTest() argument
DAudioRecordNative.java42 public boolean open(int numChannels, int sampleRate, boolean useFloat, int numBuffers) { in open() argument
43 return open(numChannels, 0, sampleRate, useFloat,numBuffers); in open()
46 public boolean open(int numChannels, int channelMask, int sampleRate, in open() argument
49 sampleRate, useFloat, numBuffers) == STATUS_OK) { in open()
110 public static boolean test(int numChannels, int sampleRate, boolean useFloat, in test() argument
112 return test(numChannels, 0, sampleRate, useFloat, msecPerBuffer, numBuffers); in test()
115 public static boolean test(int numChannels, int channelMask, int sampleRate, boolean useFloat, in test() argument
117 return nativeTest(numChannels, channelMask, sampleRate, useFloat, msecPerBuffer, numBuffers) in test()
146 int sampleRate, boolean useFloat, int numBuffers); in nativeOpen() argument
163 int numChannels, int channelMask, int sampleRate, in nativeTest() argument
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()
231 public AudioRecordAudit(int audioSource, int sampleRate, int channelMask, in AudioRecordAudit() argument
[all …]
DNonBlockingAudioTrack.java48 public NonBlockingAudioTrack(int sampleRate, int channelCount, boolean hwAvSync, in NonBlockingAudioTrack() argument
67 sampleRate, in NonBlockingAudioTrack()
76 sampleRate, in NonBlockingAudioTrack()
91 .setSampleRate(sampleRate) in NonBlockingAudioTrack()
97 mSampleRate = sampleRate; in NonBlockingAudioTrack()
DAudioTrackSurroundTest.java197 private static AudioTrack createAudioTrack(int sampleRate, int encoding, int channelConfig) { in createAudioTrack() argument
200 sampleRate, channelConfig, in createAudioTrack()
205 sampleRate, channelConfig, in createAudioTrack()
292 SamplePlayerBase(int sampleRate, int encoding, int channelConfig) { in SamplePlayerBase() argument
293 mSampleRate = sampleRate; in SamplePlayerBase()
416 SamplePlayerShorts(int sampleRate, int encoding, int channelConfig) { in SamplePlayerShorts() argument
417 super(sampleRate, encoding, channelConfig); in SamplePlayerShorts()
427 SamplePlayerShorts(int sampleRate, int encoding, int channelConfig, @RawRes int resourceId) in SamplePlayerShorts() argument
429 super(sampleRate, encoding, channelConfig); in SamplePlayerShorts()
456 SamplePlayerBytes(int sampleRate, int encoding, int channelConfig) { in SamplePlayerBytes() argument
[all …]
DCodecState.java282 int sampleRate = in onOutputFormatChanged() local
289 " sampleRate:" + sampleRate + " channels:" + channelCount); in onOutputFormatChanged()
295 sampleRate < 8000 || sampleRate > 128000) { in onOutputFormatChanged()
298 mAudioTrack = new NonBlockingAudioTrack(sampleRate, channelCount, in onOutputFormatChanged()
DAudioNativeTest.java263 int numChannels, int sampleRate, boolean useFloat, in doRecordTest() argument
268 assertTrue(TEST_NAME, record.open(numChannels, sampleRate, useFloat, in doRecordTest()
273 (int)((long)sampleRate * segmentDurationMs * numChannels / 1000); in doRecordTest()
DEncoderTest.java274 int sampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE); in testEncoder() local
276 int inBitrate = sampleRate * channelCount * 16; // bit/sec in testEncoder()
284 "-" + sampleRate + "Hz-" + channelCount + "ch-" + outBitrate + in testEncoder()
334 (long)numBytesSubmitted * 1000000 / (2 * channelCount * sampleRate); in testEncoder()
DAudioTrackLatencyTest.java121 public int sampleRate = 48000; field in AudioTrackLatencyTest.TestSetup
138 int minBufferSize = AudioTrack.getMinBufferSize(sampleRate, config, format); in createTrack()
143 mTrack = new AudioTrack(streamType, sampleRate, config, format, in createTrack()
182 int millis = (framesRemaining * 1000) / sampleRate; in writeSeconds()
219 Thread.sleep(several * framesWrittenTotal * MILLIS_PER_SECOND / setup.sampleRate); in testPlaySmallBuffer()
DAudioTrackTest.java1937 private void doTestTimestamp(int sampleRate, int channelMask, int encoding, int transferMode, in doTestTimestamp() argument
1946 final int TEST_JITTER_FRAMES_ALLOWED = sampleRate * 30 / 1000; in doTestTimestamp()
1956 final boolean fast = (sampleRate == nativeOutputSampleRate); in doTestTimestamp()
1966 .setSampleRate(sampleRate) in doTestTimestamp()
1978 Math.max(track.getBufferCapacityInFrames(), sampleRate * TEST_BUFFER_MS / 1000); in doTestTimestamp()
2025 final long expectedFrames = deltaTime * sampleRate / NANOSECONDS_PER_SECOND; in doTestTimestamp()
2056 final long closeTimeNs = frameCount * 2 * NANOS_PER_SECOND / sampleRate; in doTestTimestamp()
2085 final float averageJitterInMs = averageJitterInFrames * 1000 / sampleRate; in doTestTimestamp()
2086 final float maxJitterInMs = maxJitter * 1000 / sampleRate; in doTestTimestamp()
2127 int sampleRate = sampleRates[i]; in testVariableRatePlayback() local
[all …]
DMediaCodecListTest.java79 AudioCodec(String mime, boolean isEncoder, int sampleRate) { in AudioCodec() argument
81 mime, sampleRate, 1 /* channelCount */)); in AudioCodec()
DAudioRecordTest.java1184 public synchronized void start(int sampleRate) { in start() argument
1186 mSampleRate = sampleRate; in start()
1238 AudioTimestamp startTs, AudioTimestamp stopTs, int sampleRate) in verifyContinuousTimestamps() argument
1243 final long timeByFrames = frameDiff * NANOS_PER_SECOND / sampleRate; in verifyContinuousTimestamps()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
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()
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()
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-record-native.cpp80 uint32_t sampleRate, in open() argument
123 pcm.sampleRate = sampleRate * 1000; in open()
171 mBufferSize = (BUFFER_SIZE_MSEC * sampleRate / 1000) in open()
441 jint numChannels, jint channelMask, jint sampleRate, in Java_android_media_cts_AudioRecordNative_nativeTest() argument
445 const size_t framesPerBuffer = msecPerBuffer * sampleRate / 1000; in Java_android_media_cts_AudioRecordNative_nativeTest()
450 res = record.open(numChannels, channelMask, sampleRate, useFloat, numBuffers); in Java_android_media_cts_AudioRecordNative_nativeTest()
488 jint numChannels, jint channelMask, jint sampleRate, jboolean useFloat, jint numBuffers) in Java_android_media_cts_AudioRecordNative_nativeOpen() argument
494 return (jint) record->open(numChannels, channelMask, sampleRate, useFloat == JNI_TRUE, in Java_android_media_cts_AudioRecordNative_nativeOpen()
Daudio-track-native.cpp74 jint sampleRate, jboolean useFloat, jint numBuffers) { in open() argument
110 pcm.sampleRate = sampleRate * 1000; in open()
379 jint numChannels, jint channelMask, jint sampleRate, jboolean useFloat, in Java_android_media_cts_AudioTrackNative_nativeTest() argument
384 const size_t framesPerBuffer = msecPerBuffer * sampleRate / 1000; in Java_android_media_cts_AudioTrackNative_nativeTest()
389 res = track.open(numChannels, channelMask, sampleRate, useFloat, numBuffers); in Java_android_media_cts_AudioTrackNative_nativeTest()
428 jint numChannels, jint channelMask, jint sampleRate, in Java_android_media_cts_AudioTrackNative_nativeOpen() argument
437 sampleRate, in Java_android_media_cts_AudioTrackNative_nativeOpen()
/cts/apps/CtsVerifier/jni/audio_loopback/
Dsles.h39 SLuint32 sampleRate; // -s# member
Dsles.cpp265 pSles->sampleRate = samplingRate;//48000; // -s# in slesCreateServer()
376 pcm.samplesPerSec = pSles->sampleRate * 1000; in slesCreateServer()
/cts/tests/tests/media/libndkaudio/
DAudioRecorder.cpp137 pcm.sampleRate = sampleRate_ * 1000; // milliHz in Open()