MCPcopy Create free account
hub / github.com/audacity/audacity / Read

Method Read

libraries/lib-project-file-io/ProjectFileIO.cpp:254–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 }
253
254 int Read(void* ptr, int& size) noexcept
255 {
256 if (!IsOpen() || ptr == nullptr)
257 return SQLITE_MISUSE;
258
259 const int availableBytes = mBlobSize - mOffset;
260
261 if (availableBytes == 0)
262 {
263 size = 0;
264 return SQLITE_OK;
265 }
266 else if (availableBytes < size)
267 {
268 size = availableBytes;
269 }
270
271 const int rc = sqlite3_blob_read(mBlob, ptr, size, mOffset);
272
273 if (rc == SQLITE_OK)
274 mOffset += size;
275
276 return rc;
277 }
278
279 bool IsEof() const noexcept
280 {

Callers 5

ProjectRateMethod · 0.45
ReadDataMethod · 0.45
DecodeMethod · 0.45
GetAllMethod · 0.45
FindMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected