Home
last modified time | relevance | path

Searched refs:mBuffer (Results 1 – 25 of 33) sorted by relevance

12

/cts/tests/signature/lib/common/src/android/signature/cts/
DByteBufferLineSpliterator.java17 private final ByteBuffer mBuffer; field in ByteBufferLineSpliterator
25 mBuffer = buffer; in ByteBufferLineSpliterator()
40 if (mBuffer.remaining() < 10 * mLineLengthEstimate) { in trySplit()
44 int curPos = mBuffer.position(); in trySplit()
45 mBuffer.position(curPos + mBuffer.remaining() / 2); in trySplit()
51 mBuffer.position(mBuffer.position() + nextNewLine + 1); in trySplit()
52 Spliterator<T> retValue = new ByteBufferLineSpliterator<T>(mBuffer.slice(), in trySplit()
56 mBuffer.position(curPos).limit(curPos + mBuffer.remaining() / 2 + nextNewLine); in trySplit()
63 return mBuffer.remaining() / mLineLengthEstimate; in estimateSize()
72 if (!mBuffer.hasRemaining()) { in findNextNewLine()
[all …]
/cts/suite/audio_quality/lib/src/audio/
DAudioProtocol.cpp31 mBuffer[0] = htonl(mCommand); in sendCommand()
32 mBuffer[1] = 0; in sendCommand()
33 return sendData((char*)mBuffer, 8); in sendCommand()
93 mBuffer[0] = htonl(ECmdDownload); in sendCommand()
94 mBuffer[1] = htonl(4 + param.mBuffer->getSize()); in sendCommand()
95 mBuffer[2] = htonl(param.mId); in sendCommand()
96 if(!sendData((char*)mBuffer, 12)) { in sendCommand()
99 return sendData(param.mBuffer->getData(), param.mBuffer->getSize()); in sendCommand()
111 mBuffer[0] = htonl(ECmdStartPlayback); in sendCommand()
112 mBuffer[1] = htonl(20); in sendCommand()
[all …]
DAudioLocal.cpp49 mBuffer = buffer; in startPlaybackOrRecord()
57 int waitTimeInMsec = mBuffer->getSamples() / (mSamplingRate/1000); in waitForCompletion()
115 if (doPlaybackOrRecord(mBuffer)) { in threadLoop()
117 if (mBuffer->bufferHandled()) { in threadLoop()
126 mBuffer->restart(); in threadLoop()
155 mCommandResult = doPlaybackOrRecord(mBuffer); in threadLoop()
DRemoteAudio.cpp171 int runTime = handler->getParam().mBuffer->getSize() / in waitForPlaybackOrRecordingCompletion()
203 handler->getParam().mBuffer = buffer; in downloadData()
255 handler->getParam().mBuffer = it->second; in startPlayback()
291 handler->getParam().mBuffer = buffer; in startRecording()
/cts/suite/audio_quality/test/
DAudioPlayTestCommon.h37 android::sp<Buffer> mBuffer;
52 mBuffer = AudioSignalFactory::generateSineWave(AudioHardware::E2BPS, in SetUp()
55 ASSERT_TRUE(mBuffer.get() != NULL); in SetUp()
66 ASSERT_TRUE(mAudioHw->startPlaybackOrRecord(mBuffer, numberRepetition)); in playAll()
69 LOGV("size %d, handled %d", mBuffer->getSize(), mBuffer->amountHandled()); in playAll()
70 ASSERT_TRUE(mBuffer->amountHandled() == mBuffer->getSize()); in playAll()
76 mBuffer->restart(); in repeatPlayStop()
77 ASSERT_TRUE(mAudioHw->startPlaybackOrRecord(mBuffer, 10)); in repeatPlayStop()
83 ASSERT_FALSE(mAudioHw->startPlaybackOrRecord(mBuffer)); in playWrongUsage()
/cts/tests/sensor/jni/
DSensorTest.cpp107 return mBuffer; in getBuffer()
117 … int64_t atomicCounter = *reinterpret_cast<uint32_t *>(mBuffer + offset + kOffsetAtomicCounter); in parseEvents()
122 int32_t size = *reinterpret_cast<int32_t *>(mBuffer + offset + kOffsetSize); in parseEvents()
129 events.push_back(*reinterpret_cast<ASensorEvent *>(mBuffer + offset)); in parseEvents()
138 : mType(type), mSize(0), mBuffer(nullptr), in TestSharedMemory()
150 mBuffer = reinterpret_cast<char *>(::mmap( in TestSharedMemory()
154 if (mBuffer == MAP_FAILED) { in TestSharedMemory()
155 mBuffer = nullptr; in TestSharedMemory()
175 -1, nullptr, reinterpret_cast<void **>(&mBuffer)) == 0) { in TestSharedMemory()
176 if (mBuffer != nullptr) { in TestSharedMemory()
[all …]
/cts/suite/audio_quality/lib/src/
DFileUtil.cpp81 mBuffer = new char[DEFAULT_BUFFER_SIZE]; in FileUtil()
82 if (mBuffer == NULL) { in FileUtil()
94 delete[] mBuffer; in ~FileUtil()
117 mBuffer[0] = '0' + logLevel; in doVprintf()
118 mBuffer[1] = '>'; in doVprintf()
122 size = vsnprintf(mBuffer + start, mBufferSize - start - 2, fmt, ap); // 2 for \n\0 in doVprintf()
129 delete[] mBuffer; in doVprintf()
130 mBuffer = new char[2 * size]; in doVprintf()
131 if (mBuffer == NULL) { in doVprintf()
140 mBuffer[size] = '\n'; in doVprintf()
[all …]
DSignalProcessingImpl.cpp47 mBuffer(1024) in SignalProcessingImpl()
116 mBuffer.reset(); in run()
117 mBuffer.write <int32_t>((int32_t)EHeader); in run()
118 mBuffer.write<int32_t>(nInputs + 1); in run()
119 mBuffer.write<int32_t>((int32_t)EFunctionName); in run()
120 mBuffer.write<int32_t>((int32_t)functionScript.length()); in run()
121 mBuffer.writeStr(functionScript); in run()
122 if (!send(mBuffer.getBuffer(), mBuffer.getSizeWritten())) { in run()
127 mBuffer.reset(); in run()
130 mBuffer.write<int32_t>((int32_t)((*buffer)->isStereo() ? EAudioStereo : EAudioMono)); in run()
[all …]
DRWBuffer.h32 mBuffer = new char[capacity]; in RWBuffer()
36 delete[] mBuffer; in ~RWBuffer()
53 return mBuffer; in getBuffer()
56 return mBuffer + mWrPoint; in getUnwrittenBuffer()
78 memcpy(mBuffer + mWrPoint, src, sizeof(T)); in write()
84 memcpy(mBuffer + mWrPoint, str.string(), len); in writeStr()
90 memcpy(&v, mBuffer + mRdPoint, sizeof(T)); in read()
98 char* mBuffer; variable
DSignalProcessingImpl.h52 RWBuffer mBuffer; variable
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DReadElf.java127 private final byte[] mBuffer = new byte[512]; field in ReadElf
225 mFile.readFully(mBuffer, 0, EI_NIDENT); in readHeader()
227 if (mBuffer[0] != ELFMAG[0] || mBuffer[1] != ELFMAG[1] || in readHeader()
228 mBuffer[2] != ELFMAG[2] || mBuffer[3] != ELFMAG[3]) { in readHeader()
232 int elfClass = mBuffer[EI_CLASS]; in readHeader()
241 mEndian = mBuffer[EI_DATA]; in readHeader()
436 mFile.readFully(mBuffer, 0, byteCount); in readX()
441 answer = (answer << 8) | (mBuffer[i] & 0xff); in readX()
446 answer = (answer << 8) | (mBuffer[i] & 0xff); in readX()
456 mFile.readFully(mBuffer, 0, (int) Math.min(mBuffer.length, mFile.length() - offset)); in readString()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DReadElf.java127 private final byte[] mBuffer = new byte[512]; field in ReadElf
225 mFile.readFully(mBuffer, 0, EI_NIDENT); in readHeader()
227 if (mBuffer[0] != ELFMAG[0] || mBuffer[1] != ELFMAG[1] || in readHeader()
228 mBuffer[2] != ELFMAG[2] || mBuffer[3] != ELFMAG[3]) { in readHeader()
232 int elfClass = mBuffer[EI_CLASS]; in readHeader()
241 mEndian = mBuffer[EI_DATA]; in readHeader()
436 mFile.readFully(mBuffer, 0, byteCount); in readX()
441 answer = (answer << 8) | (mBuffer[i] & 0xff); in readX()
446 answer = (answer << 8) | (mBuffer[i] & 0xff); in readX()
456 mFile.readFully(mBuffer, 0, (int) Math.min(mBuffer.length, mFile.length() - offset)); in readString()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/
DPipeShort.java25 private short mBuffer[]; field in PipeShort
36 mBuffer = new short[mMaxValues]; in PipeShort()
51 System.arraycopy(buffer, offset, mBuffer, rear, written); in write()
57 System.arraycopy(buffer, offset + written, mBuffer, 0, count); in write()
103 System.arraycopy(mBuffer, front, buffer, offset, red); in read()
110 System.arraycopy(mBuffer, 0, buffer, offset + red, count); in read()
DDspWindow.java20 public DspBufferDouble mBuffer; field in DspWindow
51 mBuffer = new DspBufferDouble(mSize); in init()
52 if (fillWindow(mBuffer, windowType, mOverlap)) { in init()
59 DspBufferMath.mult(mBuffer, mBuffer, scale); in scale()
/cts/suite/audio_quality/lib/src/task/
DTaskInput.cpp79 mBuffer = buffer; in start()
94 if (mBuffer->isStereo()) { in complete()
95 mBuffer->changeToMono(Buffer::EKeepCh0); in complete()
97 if (!getTestCase()->registerBuffer(mId, mBuffer)) { in complete()
98 if (!getTestCase()->updateBuffer(mId, mBuffer)) { in complete()
/cts/apps/CtsVerifier/jni/audio_loopback/audio_utils/
Dfifo.c37 fifo->mBuffer = buffer; in audio_utils_fifo_init()
97 memcpy((char *) fifo->mBuffer + (rear * fifo->mFrameSize), buffer, in audio_utils_fifo_write()
101 memcpy(fifo->mBuffer, (char *) buffer + (part1 * fifo->mFrameSize), in audio_utils_fifo_write()
124 memcpy(buffer, (char *) fifo->mBuffer + (front * fifo->mFrameSize), in audio_utils_fifo_read()
128 memcpy((char *) buffer + (part1 * fifo->mFrameSize), fifo->mBuffer, in audio_utils_fifo_read()
Dfifo.h40 void *mBuffer; // pointer to caller-allocated buffer of size mFrameCount frames member
/cts/suite/audio_quality/lib/include/audio/
DAudioProtocol.h39 android::sp<Buffer> mBuffer; variable
96 int mBuffer[8];
DAudioLocal.h73 android::sp<Buffer> mBuffer; variable
/cts/suite/audio_quality/lib/include/task/
DTaskSound.h33 android::sp<Buffer> mBuffer;
DTaskInput.h36 android::sp<Buffer> mBuffer; variable
/cts/tests/sensor/src/android/hardware/cts/
DSensorDirectReportTest.java152 private byte[] mBuffer; field in SensorDirectReportTest
169 mBuffer = mByteBuffer.array(); in setUp()
681 checkEventRate(TEST_RUN_TIME_PERIOD_MILLISEC / 2, parseEntireBuffer(mBuffer, token1), in runSingleChannelRateIndependencyTest()
683 checkEventRate(TEST_RUN_TIME_PERIOD_MILLISEC / 2, parseEntireBuffer(mBuffer, token2), in runSingleChannelRateIndependencyTest()
730 checkEventRate(TEST_RUN_TIME_PERIOD_MILLISEC, parseEntireBuffer(mBuffer, token1), in runMultiChannelRateIndependencyTest()
734 checkEventRate(TEST_RUN_TIME_PERIOD_MILLISEC, parseEntireBuffer(mBuffer, token2), in runMultiChannelRateIndependencyTest()
784 List<DirectReportSensorEvent> events = parseEntireBuffer(mBuffer, token); in runMultiModeRateIndependencyTest()
1027 if (lastArray[i] != mBuffer[lastOffset + i]) { in checkAtomicCounterUpdate()
1035 System.arraycopy(mBuffer, lastOffset, currentArray, 0, SENSORS_EVENT_SIZE); in checkAtomicCounterUpdate()
1050 System.arraycopy(mBuffer, lastOffset, delayedRead, 0, SENSORS_EVENT_SIZE); in checkAtomicCounterUpdate()
[all …]
/cts/suite/audio_quality/lib/include/
DFileUtil.h60 char* mBuffer; variable
/cts/tests/tests/os/src/android/os/cts/
DMessageQueueTest.java287 private byte[] mBuffer = new byte[4096]; in testFileDescriptorCallbacks()
305 int count = Math.min(mBuffer.length, mRemaining); in testFileDescriptorCallbacks()
307 writer.write(mBuffer, 0, count); in testFileDescriptorCallbacks()
324 private byte[] mBuffer = new byte[4096]; in testFileDescriptorCallbacks()
342 int count = reader.read(mBuffer, 0, mBuffer.length); in testFileDescriptorCallbacks()
/cts/tests/tests/media/src/android/media/cts/
DMediaCodecTest.java2213 ByteBuffer mBuffer; field in MediaCodecTest.ByteBufferInputStream
2217 mBuffer = ByteBuffer.allocate(0); in ByteBufferInputStream()
2222 while (mBuffer != null && !mBuffer.hasRemaining()) { in read()
2224 mBuffer = mInput.read(); in read()
2227 if (mBuffer == null) { in read()
2231 return (0xff & mBuffer.get()); in read()
2238 public ByteBuffer mBuffer; // the audio buffer (furnished duplicated, read only). field in MediaCodecTest.PcmAudioBufferStream
2244 mBuffer = ByteBuffer.allocate(sizeInBytes); in PcmAudioBufferStream()
2245 mBuffer.order(java.nio.ByteOrder.nativeOrder()); in PcmAudioBufferStream()
2247 FloatBuffer fb = mBuffer.asFloatBuffer(); in PcmAudioBufferStream()
[all …]

12