| 357 | */ |
| 358 | |
| 359 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected