History

add buffer to ugens and accessor for external ugens

Jack Atherton committed 9 years ago

Commit 98ba93b1 parent 11748e48 files · +122 −204Browse files

Showing the changes to src/core/chuck_vm.cpp (1 of 8 files). Show all

Unified · Split

src/core/chuck_vm.cpp+24−0
@@ -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//-----------------------------------------------------------------------------
1545t_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 available1567// desc: tell the vm that an external ugen is now available

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t