TODO: * - complete audioMasterGetTime-handling (bars etc.) * - implement audioMasterProcessEvents * - audioMasterGetVendorVersion: return LMMS-version (config.h!) * - audioMasterGetDirectory: return either VST-plugin-dir or LMMS-workingdir * - audioMasterOpenFileSelector: show QFileDialog? */
| 1536 | * - audioMasterOpenFileSelector: show QFileDialog? |
| 1537 | */ |
| 1538 | intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode, |
| 1539 | int32_t _index, intptr_t _value, |
| 1540 | void * _ptr, float _opt ) |
| 1541 | { |
| 1542 | static VstTimeInfo _timeInfo; |
| 1543 | #ifdef DEBUG_CALLBACKS |
| 1544 | char buf[64]; |
| 1545 | sprintf( buf, "host-callback, opcode = %d\n", (int) _opcode ); |
| 1546 | SHOW_CALLBACK( buf ); |
| 1547 | #endif |
| 1548 | |
| 1549 | // workaround for early callbacks by some plugins |
| 1550 | if( __plugin && __plugin->m_plugin == NULL ) |
| 1551 | { |
| 1552 | __plugin->m_plugin = _effect; |
| 1553 | } |
| 1554 | |
| 1555 | switch( _opcode ) |
| 1556 | { |
| 1557 | case audioMasterAutomate: |
| 1558 | SHOW_CALLBACK( "amc: audioMasterAutomate\n" ); |
| 1559 | // index, value, returns 0 |
| 1560 | return 0; |
| 1561 | |
| 1562 | case audioMasterVersion: |
| 1563 | SHOW_CALLBACK( "amc: audioMasterVersion\n" ); |
| 1564 | return 2300; |
| 1565 | |
| 1566 | case audioMasterCurrentId: |
| 1567 | SHOW_CALLBACK( "amc: audioMasterCurrentId\n" ); |
| 1568 | // returns the unique id of a plug that's currently |
| 1569 | // loading |
| 1570 | return 0; |
| 1571 | |
| 1572 | case audioMasterIdle: |
| 1573 | SHOW_CALLBACK ("amc: audioMasterIdle\n" ); |
| 1574 | // call application idle routine (this will |
| 1575 | // call effEditIdle for all open editors too) |
| 1576 | PostMessage( __MessageHwnd, WM_USER, GiveIdle, 0 ); |
| 1577 | return 0; |
| 1578 | |
| 1579 | case audioMasterPinConnected: |
| 1580 | SHOW_CALLBACK( "amc: audioMasterPinConnected\n" ); |
| 1581 | // inquire if an input or output is beeing connected; |
| 1582 | // index enumerates input or output counting from zero: |
| 1583 | // value is 0 for input and != 0 otherwise. note: the |
| 1584 | // return value is 0 for <true> such that older versions |
| 1585 | // will always return true. |
| 1586 | return 0; |
| 1587 | |
| 1588 | case audioMasterGetTime: |
| 1589 | SHOW_CALLBACK( "amc: audioMasterGetTime\n" ); |
| 1590 | // returns const VstTimeInfo* (or 0 if not supported) |
| 1591 | // <value> should contain a mask indicating which |
| 1592 | // fields are required (see valid masks above), as some |
| 1593 | // items may require extensive conversions |
| 1594 | |
| 1595 | // Shared memory was initialised? - see song.cpp |
nothing calls this directly
no test coverage detected