MCPcopy Create free account
hub / github.com/csound/csound / CsPerfThreadMsg_StopRecord

Class CsPerfThreadMsg_StopRecord

interfaces/csPerfThread.cpp:242–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240};
241
242class CsPerfThreadMsg_StopRecord: public CsoundPerformanceThreadMessage {
243public:
244 CsPerfThreadMsg_StopRecord(CsoundPerformanceThread *pt)
245 : CsoundPerformanceThreadMessage(pt) {}
246 int run()
247 {
248
249 CsoundPerformanceThreadMessage::lockRecord();
250 recordData_t *recordData = CsoundPerformanceThreadMessage::getRecordData();
251 if (recordData->running) {
252 recordData->running = false;
253 csoundJoinThread(recordData->thread);
254 /* VL: This appears to break the recording process
255 needs to be investigated. I'm reverting the old code for now.
256 */
257 sf_close((SNDFILE *) recordData->sfile);
258 /*
259 if (recordData->sfile) {
260 sf_close((SNDFILE *) recordData->sfile);
261 recordData->sfile = NULL;
262 }
263 */
264 }
265
266 CsoundPerformanceThreadMessage::unlockRecord();
267
268 return 0;
269 }
270 ~CsPerfThreadMsg_StopRecord(){}
271private:
272 // bool start;
273};
274
275
276/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected