Home
last modified time | relevance | path

Searched refs:bufferSize (Results 1 – 21 of 21) 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.java69 int bufferSize = AudioRecord.getMinBufferSize(sampleRateInHz, CHANNEL_CONFIG, AUDIO_FORMAT); in record() local
70 assertTrue(bufferSize > 0); in record()
72 createAudioRecord(sampleRateInHz, bufferSize); in record()
82 byte[] buffer = new byte[bufferSize]; in record()
83 assertTrue(mAudioRecord.read(buffer, 0, bufferSize) > 0); in record()
92 private void createAudioRecord(final int sampleRateInHz, final int bufferSize) { in createAudioRecord() argument
94 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.java145 int bufferSize = (minBufferSize * 3) / 2; in createTrack() local
147 bufferSize, mode); in createTrack()
150 int smallBufferSize = bufferSize / 2; // arbitrary, smaller might underflow in createTrack()
599 public static AudioTrack createAudioTrack(int bufferSize) { in createAudioTrack() argument
601 bufferSize, TEST_MODE); in createAudioTrack()
604 public static void checkBadSize(int bufferSize) { in checkBadSize() argument
607 track = TrackBufferSizeChecker.createAudioTrack(bufferSize); in checkBadSize()
608 assertTrue(TEST_NAME + ": should not have survived size " + bufferSize, false); in checkBadSize()
618 public static void checkSmallSize(int bufferSize) { in checkSmallSize() argument
621 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()
693 int bufferSize = MAX_SAMPLE_SIZE; in verifySamplesMatch() local
694 ByteBuffer byteBufSrc = ByteBuffer.allocate(bufferSize); in verifySamplesMatch()
695 ByteBuffer byteBufTest = ByteBuffer.allocate(bufferSize); in verifySamplesMatch()
751 int bufferSize = MAX_SAMPLE_SIZE; in simulateVideoFramesDropIssuesAndMux() local
761 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in simulateVideoFramesDropIssuesAndMux()
938 int bufferSize = MAX_SAMPLE_SIZE; in cloneMediaWithSamplesDropAndStartOffsets() local
943 ByteBuffer dstBuf = ByteBuffer.allocate(bufferSize); in cloneMediaWithSamplesDropAndStartOffsets()
DAudioTrackTest.java1522 int bufferSize = AudioTrack.getMinBufferSize(TEST_SR, TEST_CONF, TEST_FORMAT); in testReloadStaticData() local
1524 bufferSize, TEST_SR, 1024 /* frequency */, 0 /* sweep */); in testReloadStaticData()
1526 bufferSize, TEST_MODE); in testReloadStaticData()
1528 track.write(data, OFFSET_DEFAULT, bufferSize); in testReloadStaticData()
1619 final int bufferSize = bufferSamples in playOnceStaticData() local
1624 testConf, testFormat, bufferSize, testMode); in playOnceStaticData()
1877 int bufferSize = 12 * minBufferSize; in testPlayStreamByteBuffer() local
1878 int bufferSamples = bufferSize in testPlayStreamByteBuffer()
1894 ? ByteBuffer.allocateDirect(bufferSize) in testPlayStreamByteBuffer()
1895 : 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.java183 private static ByteBuffer readToBuffer(AudioRecord audioRecord, int bufferSize) in readToBuffer() argument
187 ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); in readToBuffer()
191 assertNotSame(buffer.remaining() + "/" + bufferSize + "remaining", 0, retry--); in readToBuffer()
DAudioTrackSurroundTest.java202 int bufferSize = minBufferSize * 3; // plenty big in createAudioTrack() local
205 encoding, bufferSize, in createAudioTrack()
DAudioRecordTest.java163 int bufferSize = AudioRecord.getMinBufferSize(SAMPLING_RATE_HZ, in testAudioRecordProperties() local
165 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()
/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/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/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/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()