Home
last modified time | relevance | path

Searched refs:bufferSize (Results 1 – 24 of 24) sorted by relevance

/cts/tests/filesystem/src/android/filesystem/cts/
DFileUtil.java244 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/
DAudioSignalFactory.cpp27 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/
DAudioRecord_BufferSizeTest.java70 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()
DRoutingTest.java102 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 …]
DAudioTrackLatencyTest.java146 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 …]
DNonBlockingAudioTrack.java71 int bufferSize = 2 * minBufferSize; in NonBlockingAudioTrack() local
79 bufferSize, in NonBlockingAudioTrack()
93 mAudioTrack = new AudioTrack(audioAttributes, audioFormat, bufferSize, in NonBlockingAudioTrack()
DMediaMuxerTest.java506 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()
DAudioTrackTest.java1523 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 …]
DAudioHelper.java406 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()
DAudioPlaybackCaptureTest.java184 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()
DAudioTrackSurroundTest.java205 int bufferSize = minBufferSize * 3; // plenty big in createAudioTrack() local
208 encoding, bufferSize, in createAudioTrack()
DAudioRecordTest.java164 int bufferSize = AudioRecord.getMinBufferSize(SAMPLING_RATE_HZ, in testAudioRecordProperties() local
166 assertTrue(bufferSize > 0); in testAudioRecordProperties()
/cts/tests/tests/permission2/src/android/permission2/cts/
DNoCaptureAudioOutputPermissionTest.java41 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/
DAudioRecordHelper.java27 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()
DSoundPlayerObject.java47 private int bufferSize = 65536; field in SoundPlayerObject
48 private PipeShort mDecoderPipe = new PipeShort(bufferSize);
/cts/suite/audio_quality/client/src/com/android/cts/audiotest/
DAudioProtocol.java262 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/
DTaskInput.cpp62 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/
DEncodedBufferTest.java102 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/
DMediaTestHelpers.cpp139 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/
DXmpDepthDecode.java408 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/
DAudioSecurityTest.java372 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/
DMuxerTest.java109 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/
DNativeMuxerTest.cpp146 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/
DLocalSocketTest.java242 final int bufferSize = clientSocket.getSendBufferSize(); in testSetSoTimeout_writeTimeout() local
247 byte[] toWrite = new byte[bufferSize * 2]; in testSetSoTimeout_writeTimeout()