bool FileInputStream::setPosition (int64 pos) { jassert (openedOk()); pos = jlimit ((int64) 0, totalSize, pos); needToSeek |= (currentPosition != pos); currentPosition = pos; return true; }
int FileInputStream::read (void* buffer, int bytesToRead) { jassert (openedOk()); jassert (buffer != nullptr && bytesToRead >= 0); if (needToSeek) { if (juce_fileSetPosition (fileHandle, currentPosition) < 0) return 0; needToSeek = false; } const size_t num = readInternal (buffer, (size_t) bytesToRead); currentPosition += num; return (int) num; }
void start() { jassert (openedOk()); check ((*recorderRecord)->SetRecordState (recorderRecord, SL_RECORDSTATE_RECORDING)); }
void start() { jassert (openedOk()); check ((*playerPlay)->SetPlayState (playerPlay, SL_PLAYSTATE_PLAYING)); }