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

Method openWav

Tasks/ExportSamplesTask.cpp:243–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243bool
244ExportSamplesTask::openWav(void)
245{
246 SF_INFO sfinfo;
247
248 sfinfo.channels = 2;
249 sfinfo.samplerate = static_cast<int>(fs);
250 sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT;
251
252 if ((this->sfp = sf_open(
253 path.toStdString().c_str(),
254 SFM_WRITE,
255 &sfinfo)) == nullptr) {
256 this->lastError =
257 "Cannot open "
258 + this->path
259 + ": "
260 + QString(strerror(errno));
261 return false;
262 }
263
264 return true;
265}
266
267bool
268ExportSamplesTask::openRaw(void)

Callers 1

attemptOpenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected