MCPcopy Create free account
hub / github.com/audeering/opensmile / checkWrite

Method checkWrite

src/iocore/externalAudioSource.cpp:118–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118bool cExternalAudioSource::checkWrite(int nBytes) const
119{
120 if (!smileMutexLock(writeDataMtx_))
121 return false;
122 if (isAbort() || isPaused() || isEOI() || externalEOI_) {
123 smileMutexUnlock(writeDataMtx_);
124 return false;
125 }
126 int nSamples = smilePcm_numberBytesToNumberSamples(nBytes, &pcmParam_);
127 bool canWrite = writer_->checkWrite(nSamples) != 0;
128 smileMutexUnlock(writeDataMtx_);
129 return canWrite;
130}
131
132bool cExternalAudioSource::writeData(const void *data, int nBytes)
133{

Callers 1

writeDataMethod · 0.45

Calls 3

smileMutexLockFunction · 0.85
smileMutexUnlockFunction · 0.85

Tested by

no test coverage detected