Home
last modified time | relevance | path

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

/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/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/tests/tests/media/src/android/media/cts/
DAudioRecord_BufferSizeTest.java73 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()
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.java708 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaUsingMuxer() local
712 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaUsingMuxer()
898 int bufferSize = MAX_SAMPLE_SIZE; in verifySamplesMatch() local
899 ByteBuffer byteBufSrc = ByteBuffer.allocate(bufferSize); in verifySamplesMatch()
900 ByteBuffer byteBufTest = ByteBuffer.allocate(bufferSize); in verifySamplesMatch()
956 int bufferSize = MAX_SAMPLE_SIZE; in simulateVideoFramesDropIssuesAndMux() local
966 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in simulateVideoFramesDropIssuesAndMux()
1144 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaWithSamplesDropAndStartOffsets() local
1149 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaWithSamplesDropAndStartOffsets()
DAudioHelper.java415 int format, int bufferSize, boolean isChannelIndex) { in AudioRecordAudit() argument
416 this(audioSource, sampleRate, channelMask, format, bufferSize, isChannelIndex, in AudioRecordAudit()
421 int format, int bufferSize, in AudioRecordAudit() argument
434 bufferSize, in AudioRecordAudit()
DAudioTrackTest.java1527 int bufferSize = AudioTrack.getMinBufferSize(TEST_SR, TEST_CONF, TEST_FORMAT); in testReloadStaticData() local
1529 bufferSize, TEST_SR, 1024 /* frequency */, 0 /* sweep */); in testReloadStaticData()
1531 bufferSize, TEST_MODE); in testReloadStaticData()
1533 track.write(data, OFFSET_DEFAULT, bufferSize); in testReloadStaticData()
1632 final int bufferSize = bufferSamples in playOnceStaticData() local
1637 testConf, testFormat, bufferSize, testMode); in playOnceStaticData()
1890 int bufferSize = 12 * minBufferSize; in testPlayStreamByteBuffer() local
1891 int bufferSamples = bufferSize in testPlayStreamByteBuffer()
1907 ? ByteBuffer.allocateDirect(bufferSize) in testPlayStreamByteBuffer()
1908 : ByteBuffer.allocate(bufferSize); in testPlayStreamByteBuffer()
[all …]
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.java166 int bufferSize = AudioRecord.getMinBufferSize(SAMPLING_RATE_HZ, in testAudioRecordProperties() local
168 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/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()
/cts/tests/media/src/android/mediav2/cts/
DMuxerTest.java121 int bufferSize = (int) file.length(); in splitMediaToMuxerParameters() local
122 bufferSize = ((bufferSize + 127) >> 7) << 7; in splitMediaToMuxerParameters()
127 bufferSize <<= 1; in splitMediaToMuxerParameters()
128 mBuff = ByteBuffer.allocate(bufferSize); in splitMediaToMuxerParameters()