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

Class CsPerfThreadMsg_InputMessage

interfaces/csPerfThread.cpp:359–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 */
358
359class CsPerfThreadMsg_InputMessage : public CsoundPerformanceThreadMessage {
360 private:
361 int len;
362 char *sp;
363 char s[128];
364 public:
365 CsPerfThreadMsg_InputMessage(CsoundPerformanceThread *pt, const char *s)
366 : CsoundPerformanceThreadMessage(pt)
367 {
368 len = (int) strlen(s);
369 if (len < 128)
370 this->sp = &(this->s[0]);
371 else
372 this->sp = new char[(unsigned int) (len + 1)];
373 strcpy(this->sp, s);
374 }
375 int run()
376 {
377 csoundInputMessage(pt_->GetCsound(), sp);
378 return 0;
379 }
380 ~CsPerfThreadMsg_InputMessage()
381 {
382 if (len >= 128)
383 delete[] sp;
384 }
385};
386
387/**
388 * Seek to the specified score time

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected