13
0

add virtual method is_instrument() to PluginInfo (already existed for AUPluginInfo) and use to determine if plugin is an instrument for the purposes of AddRouteDialog, since the rules are plugin-type specific

git-svn-id: svn://localhost/ardour2/branches/3.0@11426 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-02-02 18:51:32 +00:00
parent 2cc255ac08
commit 02ec346c2b
4 changed files with 9 additions and 8 deletions

View File

@ -516,13 +516,7 @@ AddRouteDialog::build_instrument_list ()
if (manager.get_status (*i) == PluginManager::Hidden) continue;
string category = (*i)->category;
/* XXX more finesse is possible here. VST plugins have a
a specific "instrument" flag, for example.
*/
if ((*i)->n_inputs.n_midi() != 0 && (*i)->n_outputs.n_audio() > 0) {
if ((*i)->is_instrument()) {
row = *(instrument_list->append());
row[instrument_list_columns.name] = (*i)->name;
row[instrument_list_columns.info_ptr] = *i;

View File

@ -65,6 +65,7 @@ class PluginInfo {
std::string unique_id;
virtual PluginPtr load (Session& session) = 0;
virtual bool is_instrument() const;
protected:
friend class PluginManager;

View File

@ -316,13 +316,13 @@ AudioEngine::_xrun_callback (void *arg)
void
AudioEngine::_session_callback (jack_session_event_t *event, void *arg)
{
printf( "helo.... " );
AudioEngine* ae = static_cast<AudioEngine*> (arg);
if (ae->connected()) {
ae->JackSessionEvent ( event ); /* EMIT SIGNAL */
}
}
#endif
int
AudioEngine::_graph_order_callback (void *arg)
{

View File

@ -62,6 +62,12 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
bool
PluginInfo::is_instrument () const
{
return (n_inputs.n_midi() != 0) && (n_outputs.n_audio() > 0);
}
Plugin::Plugin (AudioEngine& e, Session& s)
: _engine (e)
, _session (s)