| 240 | }; |
| 241 | |
| 242 | class CsPerfThreadMsg_StopRecord: public CsoundPerformanceThreadMessage { |
| 243 | public: |
| 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(){} |
| 271 | private: |
| 272 | // bool start; |
| 273 | }; |
| 274 | |
| 275 | |
| 276 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected