| 116 | } |
| 117 | |
| 118 | bool 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 | |
| 132 | bool cExternalAudioSource::writeData(const void *data, int nBytes) |
| 133 | { |
no test coverage detected