1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4     Sonic Visualiser
5     An audio file viewer and annotation editor.
6     Centre for Digital Music, Queen Mary, University of London.
7 
validate(&self) -> Result<()>8     This program is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License as
10     published by the Free Software Foundation; either version 2 of the
11     License, or (at your option) any later version.  See the file
12     COPYING included with this distribution for more information.
13 */
14 
15 /*
16    This is a modified version of a source file from the
17    Rosegarden MIDI and audio sequencer and notation editor.
18    This file copyright 2000-2006 Chris Cannam.
19 */
20 
21 #ifndef SV_DSSI_PLUGIN_FACTORY_H
22 #define SV_DSSI_PLUGIN_FACTORY_H
23 
24 #define DSSI_API_LEVEL 2
25 
26 #include "LADSPAPluginFactory.h"
27 #include "api/dssi.h"
28 
29 #include <QMutex>
30 
31 class DSSIPluginInstance;
32 
33 class DSSIPluginFactory : public LADSPAPluginFactory
34 {
35 public:
36     virtual ~DSSIPluginFactory();
37 
38     void enumeratePlugins(std::vector<QString> &list) override;
39 
40     RealTimePluginInstance *instantiatePlugin(QString identifier,
41                                                       int clientId,
validate(&self) -> Result<()>42                                                       int position,
43                                                       sv_samplerate_t sampleRate,
44                                                       int blockSize,
45                                                       int channels) override;
46 
47     static std::vector<QString> getPluginPath();
48 
49 protected:
50     DSSIPluginFactory();
51     friend class RealTimePluginFactory;
52 
53     PluginScan::PluginType getPluginType() const override {
54         return PluginScan::DSSIPlugin;
55     }
56 
57     std::vector<QString> getLRDFPath(QString &baseUri) override;
58 
59     void discoverPluginsFrom(QString soName) override;
60 
61     const LADSPA_Descriptor *getLADSPADescriptor(QString identifier) override;
62     virtual const DSSI_Descriptor *getDSSIDescriptor(QString identifier);
63 
64     DSSI_Host_Descriptor m_hostDescriptor;
65 };
66 
67 #endif
68 
69