/cts/tests/tests/media/audio/src/android/media/audio/cts/ |
D | AudioRecord_BufferSizeTest.java | 73 int bufferSize = AudioRecord.getMinBufferSize(sampleRateInHz, CHANNEL_CONFIG, AUDIO_FORMAT); in record() local 74 assertTrue(bufferSize > 0); in record() 76 createAudioRecord(sampleRateInHz, bufferSize); in record() 86 byte[] buffer = new byte[bufferSize]; in record() 87 assertTrue(mAudioRecord.read(buffer, 0, bufferSize) > 0); in record() 96 private void createAudioRecord(final int sampleRateInHz, final int bufferSize) { in createAudioRecord() argument 98 CHANNEL_CONFIG, AUDIO_FORMAT, bufferSize); in createAudioRecord()
|
D | RoutingTest.java | 91 int bufferSize = in allocAudioTrack() local 102 bufferSize, in allocAudioTrack() 294 int bufferSize = in allocAudioRecord() local 304 bufferSize); in allocAudioRecord() 424 public AudioTrackFiller(AudioTrack audioTrack, int bufferSize) { in AudioTrackFiller() argument 426 mBufferSize = bufferSize; in AudioTrackFiller() 453 int bufferSize = in test_audioTrack_getRoutedDevice() local 464 bufferSize, in test_audioTrack_getRoutedDevice() 467 AudioTrackFiller filler = new AudioTrackFiller(audioTrack, bufferSize); in test_audioTrack_getRoutedDevice() 507 public AudioRecordPuller(AudioRecord audioRecord, int bufferSize) { in AudioRecordPuller() argument [all …]
|
D | AudioTrackLatencyTest.java | 195 int bufferSize = (minBufferSize * 3) / 2; in createTrack() local 197 bufferSize, mode); in createTrack() 200 int smallBufferSize = bufferSize / 2; // arbitrary, smaller might underflow in createTrack() 649 public static AudioTrack createAudioTrack(int bufferSize) { in createAudioTrack() argument 651 bufferSize, TEST_MODE); in createAudioTrack() 654 public static void checkBadSize(int bufferSize) { in checkBadSize() argument 657 track = TrackBufferSizeChecker.createAudioTrack(bufferSize); in checkBadSize() 658 assertTrue(TEST_NAME + ": should not have survived size " + bufferSize, false); in checkBadSize() 668 public static void checkSmallSize(int bufferSize) { in checkSmallSize() argument 671 track = TrackBufferSizeChecker.createAudioTrack(bufferSize); in checkSmallSize() [all …]
|
D | RemoteSubmixTest.java | 159 private static ByteBuffer readToBuffer(AudioRecord audioRecord, int bufferSize) in readToBuffer() argument 163 ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); in readToBuffer() 167 assertNotSame(buffer.remaining() + "/" + bufferSize + " remaining", 0, retry--); in readToBuffer()
|
D | AudioPlaybackCaptureTest.java | 193 private static ByteBuffer readToBuffer(AudioRecord audioRecord, int bufferSize) in readToBuffer() argument 197 ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); in readToBuffer() 201 assertNotSame(buffer.remaining() + "/" + bufferSize + "remaining", 0, retry--); in readToBuffer()
|
D | AudioTrackTest.java | 1556 int bufferSize = AudioTrack.getMinBufferSize(TEST_SR, TEST_CONF, TEST_FORMAT); in testReloadStaticData() local 1558 bufferSize, TEST_SR, 1024 /* frequency */, 0 /* sweep */); in testReloadStaticData() 1560 bufferSize, TEST_MODE); in testReloadStaticData() 1562 track.write(data, OFFSET_DEFAULT, bufferSize); in testReloadStaticData() 1668 final int bufferSize = bufferSamples in playOnceStaticData() local 1673 testConf, testFormat, bufferSize, testMode); in playOnceStaticData() 1930 final int bufferSize = frameCount * frameSize; in playOnceStreamByteBuffer() local 1936 .setBufferSizeInBytes(bufferSize) in playOnceStreamByteBuffer() 1947 ? ByteBuffer.allocateDirect(bufferSize) in playOnceStreamByteBuffer() 1948 : ByteBuffer.allocate(bufferSize); in playOnceStreamByteBuffer() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2021-0484/ |
D | poc.cpp | 24 constexpr size_t bufferSize = 16; in main() local 48 const uint8_t arr[bufferSize] = {}; in main() 49 data.write(arr, bufferSize); in main() 50 data.writeUint32(bufferSize); in main() 51 data.writeUnpadded(arr, bufferSize - 1); in main()
|
/cts/tests/filesystem/src/android/filesystem/cts/ |
D | FileUtil.java | 244 public static long getFileSizeExceedingMemory(Context context, int bufferSize) { in getFileSizeExceedingMemory() argument 247 long diskSizeTarget = (2 * memSize / bufferSize) * bufferSize; in getFileSizeExceedingMemory() 248 final long minimumDiskSize = (512L * 1024L * 1024L / bufferSize) * bufferSize; in getFileSizeExceedingMemory() 249 final long reservedDiskSize = (50L * 1024L * 1024L / bufferSize) * bufferSize; in getFileSizeExceedingMemory() 274 long fileSize, int bufferSize) throws Exception { in doRandomReadTest() argument 278 final byte[] data = FileUtil.generateRandomData(bufferSize); in doRandomReadTest() 280 final int totalReadCount = (int)(fileSize / bufferSize); in doRandomReadTest() 284 readOffsets[i] = (int)(random.nextFloat() * (fileSize - bufferSize)) & in doRandomReadTest() 285 ~(bufferSize - 1); in doRandomReadTest() 331 long fileSize, int bufferSize) throws Exception { in doRandomWriteTest() argument [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | AudioRecordHelper.java | 27 private final int bufferSize; field in AudioRecordHelper 55 bufferSize = tmpBufferSize; in AudioRecordHelper() 76 audioRecord = new AudioRecord(source, sampleRate, CHANNEL, ENCODING, bufferSize); in start() 103 byte data[] = new byte[bufferSize]; in startPullingData() 105 int read = audioRecord.read(data, 0, bufferSize); in startPullingData()
|
D | SoundPlayerObject.java | 47 private int bufferSize = 65536; field in SoundPlayerObject 48 private PipeShort mDecoderPipe = new PipeShort(bufferSize);
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | AssetFileDescriptor_AutoCloseInputStreamTest.java | 278 int bufferSize = 4; in testOffsetCorrectFileChannelReadBuffer() local 279 ByteBuffer buffer = ByteBuffer.allocate(bufferSize); in testOffsetCorrectFileChannelReadBuffer() 281 assertEquals(bufferSize, bytesRead); in testOffsetCorrectFileChannelReadBuffer() 284 for (int i = startPosition; i < startPosition + bufferSize; i++) { in testOffsetCorrectFileChannelReadBuffer() 288 assertEquals(startPosition + bufferSize, fc.position()); in testOffsetCorrectFileChannelReadBuffer() 297 int bufferSize = 4; in testOffsetCorrectFileChannelReadBuffers() local 299 buffers[0] = ByteBuffer.allocate(bufferSize); in testOffsetCorrectFileChannelReadBuffers() 302 for (int i = startPosition; i < startPosition + bufferSize; i++) { in testOffsetCorrectFileChannelReadBuffers() 306 assertEquals(startPosition + bufferSize, fc.position()); in testOffsetCorrectFileChannelReadBuffers() 315 int bufferSize = 4; in testOffsetCorrectFileChannelReadBufferFromPosition() local [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0458/ |
D | poc.cpp | 66 size_t bufferSize = encoder.getBurstBufferSizeBytes(); in main() local 74 return (bufferSize < pendingBytes) ? EXIT_VULNERABLE : EXIT_SUCCESS; in main()
|
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/ |
D | BluetoothHidDeviceCallbackTest.java | 31 public void onGetReport(BluetoothDevice device, byte type, byte id, int bufferSize) { 32 super.onGetReport(device, type, id, bufferSize);
|
/cts/tests/tests/proto/src/android/util/proto/cts/ |
D | EncodedBufferTest.java | 102 public void testWriteRawBuffer(int chunkSize, int bufferSize) throws Exception { in testWriteRawBuffer() argument 105 final byte[] data = bufferSize > 0 ? new byte[bufferSize] : null; in testWriteRawBuffer() 106 final byte[] expected = bufferSize > 0 ? new byte[bufferSize] : null; in testWriteRawBuffer() 107 for (int i=0; i<bufferSize; i++) { in testWriteRawBuffer()
|
/cts/tests/tests/graphics/jni/ |
D | MediaTestHelpers.cpp | 139 size_t bufferSize = 0; in processOneInputBuffer() local 141 AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufferSize); in processOneInputBuffer() 145 AMediaExtractor_readSampleData(mExtractor, buffer, bufferSize); in processOneInputBuffer()
|
/cts/tests/media/jni/ |
D | NativeExtractorTest.cpp | 547 int bufferSize = 0; in nativeReadAllData() local 563 flattenField<int32_t>(buffer, &bufferSize, 0); in nativeReadAllData() 566 flattenField<int32_t>(buffer, &bufferSize, refSampleRate); in nativeReadAllData() 570 flattenField<int32_t>(buffer, &bufferSize, refNumChannels); in nativeReadAllData() 573 flattenField<int32_t>(buffer, &bufferSize, 1); in nativeReadAllData() 576 flattenField<int32_t>(buffer, &bufferSize, refWidth); in nativeReadAllData() 579 flattenField<int32_t>(buffer, &bufferSize, refHeight); in nativeReadAllData() 581 flattenField<int32_t>(buffer, &bufferSize, 2); in nativeReadAllData() 586 flattenField<int64_t>(buffer, &bufferSize, keyDuration); in nativeReadAllData() 604 crc32value = crc32(crc32value, buffer, bufferSize); in nativeReadAllData() [all …]
|
/cts/tests/mediapc/src/android/mediapc/cts/ |
D | AudioPlaybackLoad.java | 82 final int bufferSize = 2 * minBufferSize; in createAudioTrack() local 84 .setBufferSizeInBytes(bufferSize) in createAudioTrack()
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/ |
D | XmpDepthDecode.java | 408 int bufferSize = 0; in parseExtendedXMPSections() local 413 bufferSize += Math.max(0, section.data.length - startOffset); in parseExtendedXMPSections() 419 if (bufferSize == 0) { in parseExtendedXMPSections() 424 byte buffer[] = new byte[bufferSize]; in parseExtendedXMPSections()
|
/cts/tests/videocodec/src/android/videocodec/cts/ |
D | VideoDecodeEditEncodeTest.java | 283 int bufferSize = (int) file.length(); in splitMediaToMuxerParameters() local 284 bufferSize = ((bufferSize + 127) >> 7) << 7; in splitMediaToMuxerParameters() 289 bufferSize <<= 1; in splitMediaToMuxerParameters() 290 mMemory = new byte[bufferSize]; in splitMediaToMuxerParameters() 291 ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize); in splitMediaToMuxerParameters()
|
/cts/tests/tests/media/muxer/src/android/media/muxer/cts/ |
D | MediaMuxerTest.java | 755 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaUsingMuxer() local 759 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaUsingMuxer() 967 int bufferSize = MAX_SAMPLE_SIZE; in verifySamplesMatch() local 968 ByteBuffer byteBufSrc = ByteBuffer.allocate(bufferSize); in verifySamplesMatch() 969 ByteBuffer byteBufTest = ByteBuffer.allocate(bufferSize); in verifySamplesMatch() 1025 int bufferSize = MAX_SAMPLE_SIZE; in simulateVideoFramesDropIssuesAndMux() local 1035 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in simulateVideoFramesDropIssuesAndMux() 1213 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaWithSamplesDropAndStartOffsets() local 1218 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaWithSamplesDropAndStartOffsets()
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | AudioHelper.java | 533 int format, int bufferSize, boolean isChannelIndex) { in AudioRecordAudit() argument 534 this(audioSource, sampleRate, channelMask, format, bufferSize, isChannelIndex, in AudioRecordAudit() 539 int format, int bufferSize, in AudioRecordAudit() argument 552 bufferSize, in AudioRecordAudit()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | AudioSecurityTest.java | 385 final int bufferSize = bufferSamples * 2; // bytes per sample for 16 bits in testVisualizerCapture_CVE_2017_0396() local 402 AudioFormat.CHANNEL_OUT_STEREO, format, bufferSize, in testVisualizerCapture_CVE_2017_0396()
|
/cts/tests/video/src/android/video/cts/ |
D | CodecPerformanceTestBase.java | 227 int bufferSize = (int) file.length(); in setUpDecoderInput() local 228 mBuff = ByteBuffer.allocate(bufferSize); in setUpDecoderInput()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/display/ |
D | DisplayHashManagerTest.java | 476 Size bufferSize = displayHashParams.getBufferSize(); in testDisplayHashParams() local 477 assertEquals(width, bufferSize.getWidth()); in testDisplayHashParams() 478 assertEquals(height, bufferSize.getHeight()); in testDisplayHashParams()
|
/cts/tests/media/src/android/mediav2/cts/ |
D | CodecDecoderTest.java | 279 int bufferSize = bb.limit(); in verify() local 281 bufferSize % bytesPerSample); in verify() 283 int refObjectLen = bufferSize / bytesPerSample; in verify() 296 for (int i = 0, j = 0; i < bufferSize; i += 3, j++) { in verify()
|