Showing the changes to src/core/chuck_vm.cpp (1 of 8 files). Show all
Unified · Split
| @@ -1538,6 +1538,30 @@ Chuck_Event * * Chuck_VM::get_ptr_to_external_event( std::string name ) · 1537 unmodified lines | |||
| 1538 | 1538 | ||
| 1539 | 1539 | ||
| 1540 | 1540 | ||
| 1541 | //----------------------------------------------------------------------------- | ||
| 1542 | // name: init_external_ugen() | ||
| 1543 | // desc: tell the vm that an external ugen is now available | ||
| 1544 | //----------------------------------------------------------------------------- | ||
| 1545 | t_CKBOOL Chuck_VM::get_external_ugen_samples( std::string name, | ||
| 1546 | SAMPLE * buffer, int numFrames ) | ||
| 1547 | { | ||
| 1548 | // if hasn't been init, or it has been init and hasn't been constructed, | ||
| 1549 | if( m_external_ugens.count( name ) == 0 || | ||
| 1550 | should_call_external_ctor( name, te_externalUGen ) ) | ||
| 1551 | { | ||
| 1552 | // fail without doing anything | ||
| 1553 | return FALSE; | ||
| 1554 | } | ||
| 1555 | |||
| 1556 | // else, fill (if the ugen isn't buffered, then it will fill with zeroes) | ||
| 1557 | m_external_ugens[name]->val->get_buffer( buffer, numFrames ); | ||
| 1558 | |||
| 1559 | return TRUE; | ||
| 1560 | } | ||
| 1561 | |||
| 1562 | |||
| 1563 | |||
| 1564 | |||
| 1541 | //----------------------------------------------------------------------------- | 1565 | //----------------------------------------------------------------------------- |
| 1542 | // name: init_external_ugen() | 1566 | // name: init_external_ugen() |
| 1543 | // desc: tell the vm that an external ugen is now available | 1567 | // desc: tell the vm that an external ugen is now available |