MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / setSampleRate

Method setSampleRate

Misc/GenericDataSaver.cpp:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void
203GenericDataSaver::setSampleRate(unsigned int rate)
204{
205 if (this->rateHint != rate) {
206 QMutexLocker locker(&this->dataMutex);
207
208 this->rateHint = rate;
209 this->allocation = 3 * rate; // Up to 3 sec of data
210
211 // No data is being written, we can reallocate here
212 if (!this->dataWritten) {
213 this->buffers[0].resize(this->allocation);
214 this->buffers[1].resize(this->allocation);
215 }
216 }
217}
218
219void
220GenericDataSaver::setBufferSize(unsigned int size)

Callers 1

GenericDataSaverMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected