/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() 273 long fileSize, int bufferSize) throws Exception { in doRandomReadTest() argument 277 final byte[] data = FileUtil.generateRandomData(bufferSize); in doRandomReadTest() 279 final int totalReadCount = (int)(fileSize / bufferSize); in doRandomReadTest() 283 readOffsets[i] = (int)(random.nextFloat() * (fileSize - bufferSize)) & in doRandomReadTest() 284 ~(bufferSize - 1); in doRandomReadTest() 327 long fileSize, int bufferSize) throws Exception { in doRandomWriteTest() argument [all …]
|
/cts/suite/audio_quality/lib/src/audio/ |
D | AudioSignalFactory.cpp | 27 int bufferSize = samples * (stereo? 2 : 1) * BPS; in generateSineWave() local 28 android::sp<Buffer> buffer(new Buffer(bufferSize)); in generateSineWave() 48 int bufferSize = samples * (stereo? 2 : 1) * BPS; in generateWhiteNoise() local 49 android::sp<Buffer> buffer(new Buffer(bufferSize, bufferSize)); in generateWhiteNoise() 73 int bufferSize = samples * (stereo? 2 : 1) * BPS; in generateZeroSound() local 74 android::sp<Buffer> buffer(new Buffer(bufferSize, bufferSize)); in generateZeroSound()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | AudioRecord_BufferSizeTest.java | 70 int bufferSize = AudioRecord.getMinBufferSize(sampleRateInHz, CHANNEL_CONFIG, AUDIO_FORMAT); in record() local 71 assertTrue(bufferSize > 0); in record() 73 createAudioRecord(sampleRateInHz, bufferSize); in record() 83 byte[] buffer = new byte[bufferSize]; in record() 84 assertTrue(mAudioRecord.read(buffer, 0, bufferSize) > 0); in record() 93 private void createAudioRecord(final int sampleRateInHz, final int bufferSize) { in createAudioRecord() argument 95 CHANNEL_CONFIG, AUDIO_FORMAT, bufferSize); in createAudioRecord()
|
D | RoutingTest.java | 102 int bufferSize = in allocAudioTrack() local 113 bufferSize, in allocAudioTrack() 301 int bufferSize = in allocAudioRecord() local 311 bufferSize); in allocAudioRecord() 431 public AudioTrackFiller(AudioTrack audioTrack, int bufferSize) { in AudioTrackFiller() argument 433 mBufferSize = bufferSize; in AudioTrackFiller() 460 int bufferSize = in test_audioTrack_getRoutedDevice() local 471 bufferSize, in test_audioTrack_getRoutedDevice() 474 AudioTrackFiller filler = new AudioTrackFiller(audioTrack, bufferSize); in test_audioTrack_getRoutedDevice() 501 public AudioRecordPuller(AudioRecord audioRecord, int bufferSize) { in AudioRecordPuller() argument [all …]
|
D | AudioTrackLatencyTest.java | 146 int bufferSize = (minBufferSize * 3) / 2; in createTrack() local 148 bufferSize, mode); in createTrack() 151 int smallBufferSize = bufferSize / 2; // arbitrary, smaller might underflow in createTrack() 600 public static AudioTrack createAudioTrack(int bufferSize) { in createAudioTrack() argument 602 bufferSize, TEST_MODE); in createAudioTrack() 605 public static void checkBadSize(int bufferSize) { in checkBadSize() argument 608 track = TrackBufferSizeChecker.createAudioTrack(bufferSize); in checkBadSize() 609 assertTrue(TEST_NAME + ": should not have survived size " + bufferSize, false); in checkBadSize() 619 public static void checkSmallSize(int bufferSize) { in checkSmallSize() argument 622 track = TrackBufferSizeChecker.createAudioTrack(bufferSize); in checkSmallSize() [all …]
|
D | NonBlockingAudioTrack.java | 71 int bufferSize = 2 * minBufferSize; in NonBlockingAudioTrack() local 79 bufferSize, in NonBlockingAudioTrack() 93 mAudioTrack = new AudioTrack(audioAttributes, audioFormat, bufferSize, in NonBlockingAudioTrack()
|
D | MediaMuxerTest.java | 506 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaUsingMuxer() local 510 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaUsingMuxer() 695 int bufferSize = MAX_SAMPLE_SIZE; in verifySamplesMatch() local 696 ByteBuffer byteBufSrc = ByteBuffer.allocate(bufferSize); in verifySamplesMatch() 697 ByteBuffer byteBufTest = ByteBuffer.allocate(bufferSize); in verifySamplesMatch() 753 int bufferSize = MAX_SAMPLE_SIZE; in simulateVideoFramesDropIssuesAndMux() local 763 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in simulateVideoFramesDropIssuesAndMux() 940 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaWithSamplesDropAndStartOffsets() local 945 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaWithSamplesDropAndStartOffsets()
|
D | AudioTrackTest.java | 1523 int bufferSize = AudioTrack.getMinBufferSize(TEST_SR, TEST_CONF, TEST_FORMAT); in testReloadStaticData() local 1525 bufferSize, TEST_SR, 1024 /* frequency */, 0 /* sweep */); in testReloadStaticData() 1527 bufferSize, TEST_MODE); in testReloadStaticData() 1529 track.write(data, OFFSET_DEFAULT, bufferSize); in testReloadStaticData() 1620 final int bufferSize = bufferSamples in playOnceStaticData() local 1625 testConf, testFormat, bufferSize, testMode); in playOnceStaticData() 1878 int bufferSize = 12 * minBufferSize; in testPlayStreamByteBuffer() local 1879 int bufferSamples = bufferSize in testPlayStreamByteBuffer() 1895 ? ByteBuffer.allocateDirect(bufferSize) in testPlayStreamByteBuffer() 1896 : ByteBuffer.allocate(bufferSize); in testPlayStreamByteBuffer() [all …]
|
D | AudioHelper.java | 406 int format, int bufferSize, boolean isChannelIndex) { in AudioRecordAudit() argument 407 this(audioSource, sampleRate, channelMask, format, bufferSize, isChannelIndex, in AudioRecordAudit() 412 int format, int bufferSize, in AudioRecordAudit() argument 425 bufferSize, in AudioRecordAudit()
|
D | AudioPlaybackCaptureTest.java | 184 private static ByteBuffer readToBuffer(AudioRecord audioRecord, int bufferSize) in readToBuffer() argument 188 ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); in readToBuffer() 192 assertNotSame(buffer.remaining() + "/" + bufferSize + "remaining", 0, retry--); in readToBuffer()
|
D | AudioTrackSurroundTest.java | 205 int bufferSize = minBufferSize * 3; // plenty big in createAudioTrack() local 208 encoding, bufferSize, in createAudioTrack()
|
D | AudioRecordTest.java | 164 int bufferSize = AudioRecord.getMinBufferSize(SAMPLING_RATE_HZ, in testAudioRecordProperties() local 166 assertTrue(bufferSize > 0); in testAudioRecordProperties()
|
/cts/tests/tests/permission2/src/android/permission2/cts/ |
D | NoCaptureAudioOutputPermissionTest.java | 41 int bufferSize = AudioRecord.getMinBufferSize(44100, in testCreateAudioRecord() local 44 if (bufferSize <= 0) in testCreateAudioRecord() 51 bufferSize = 44100; in testCreateAudioRecord() 60 AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT, bufferSize); in testCreateAudioRecord()
|
/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/suite/audio_quality/client/src/com/android/cts/audiotest/ |
D | AudioProtocol.java | 262 int bufferSize = AudioTrack.getMinBufferSize(samplingRate, in handleStartPlayback() 265 bufferSize = bufferSize * 4; in handleStartPlayback() 266 if (bufferSize < 256 * 1024) { in handleStartPlayback() 267 bufferSize = 256 * 1024; in handleStartPlayback() 269 if (bufferSize > data.capacity()) { in handleStartPlayback() 270 bufferSize = data.capacity(); in handleStartPlayback() 274 AudioFormat.ENCODING_PCM_16BIT, bufferSize, in handleStartPlayback() 283 int dataToWrite = (bufferSize < data.capacity())? bufferSize : data.capacity(); in handleStartPlayback() 296 dataToWrite = (bufferSize < dataLeft)? bufferSize : dataLeft; in handleStartPlayback()
|
/cts/suite/audio_quality/lib/src/task/ |
D | TaskInput.cpp | 62 size_t bufferSize = mRecordingTimeInMs * AudioHardware::ESampleRate_44100 / 1000 * in start() local 64 android::sp<Buffer> buffer(new Buffer(bufferSize, bufferSize, localDevice)); in start()
|
/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/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/tests/security/src/android/security/cts/ |
D | AudioSecurityTest.java | 372 final int bufferSize = bufferSamples * 2; // bytes per sample for 16 bits in testVisualizerCapture_CVE_2017_0396() local 387 AudioFormat.CHANNEL_OUT_STEREO, format, bufferSize, in testVisualizerCapture_CVE_2017_0396()
|
/cts/tests/media/src/android/mediav2/cts/ |
D | MuxerTest.java | 109 int bufferSize = (int) file.length(); in splitMediaToMuxerParameters() local 110 bufferSize = ((bufferSize + 127) >> 7) << 7; in splitMediaToMuxerParameters() 115 bufferSize <<= 1; in splitMediaToMuxerParameters() 116 mBuff = ByteBuffer.allocate(bufferSize); in splitMediaToMuxerParameters()
|
/cts/tests/media/jni/ |
D | NativeMuxerTest.cpp | 146 int bufferSize = ((fileSize + 127) >> 7) << 7; in splitMediaToMuxerParameters() local 151 bufferSize <<= 1; in splitMediaToMuxerParameters() 152 mBuffer = new uint8_t[bufferSize]; in splitMediaToMuxerParameters() 169 AMediaExtractor_readSampleData(extractor, mBuffer + offset, (bufferSize - offset)); in splitMediaToMuxerParameters()
|
/cts/tests/tests/net/src/android/net/cts/ |
D | LocalSocketTest.java | 242 final int bufferSize = clientSocket.getSendBufferSize(); in testSetSoTimeout_writeTimeout() local 247 byte[] toWrite = new byte[bufferSize * 2]; in testSetSoTimeout_writeTimeout()
|