summaryrefslogtreecommitdiffstats
path: root/src/sound/LADSPAPluginFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound/LADSPAPluginFactory.cpp')
-rw-r--r--src/sound/LADSPAPluginFactory.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/sound/LADSPAPluginFactory.cpp b/src/sound/LADSPAPluginFactory.cpp
index 2a4a4ea..5ec25ef 100644
--- a/src/sound/LADSPAPluginFactory.cpp
+++ b/src/sound/LADSPAPluginFactory.cpp
@@ -26,7 +26,7 @@
#ifdef HAVE_LADSPA
#include <dlfcn.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <cmath>
#include "AudioPluginInstance.h"
@@ -58,7 +58,7 @@ LADSPAPluginFactory::~LADSPAPluginFactory()
unloadUnusedLibraries();
}
-const std::vector<QString> &
+const std::vector<TQString> &
LADSPAPluginFactory::getPluginIdentifiers() const
{
return m_identifiers;
@@ -67,7 +67,7 @@ LADSPAPluginFactory::getPluginIdentifiers() const
void
LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
{
- for (std::vector<QString>::iterator i = m_identifiers.begin();
+ for (std::vector<TQString>::iterator i = m_identifiers.begin();
i != m_identifiers.end(); ++i) {
const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i);
@@ -81,7 +81,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
list.push_back(*i);
list.push_back(descriptor->Name);
- list.push_back(QString("%1").arg(descriptor->UniqueID));
+ list.push_back(TQString("%1").arg(descriptor->UniqueID));
list.push_back(descriptor->Label);
list.push_back(descriptor->Maker);
list.push_back(descriptor->Copyright);
@@ -104,7 +104,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
}
- list.push_back(QString("%1").arg(descriptor->PortCount));
+ list.push_back(TQString("%1").arg(descriptor->PortCount));
for (unsigned long p = 0; p < descriptor->PortCount; ++p) {
@@ -120,13 +120,13 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
type |= PluginPort::Output;
}
- list.push_back(QString("%1").arg(p));
+ list.push_back(TQString("%1").arg(p));
list.push_back(descriptor->PortNames[p]);
- list.push_back(QString("%1").arg(type));
- list.push_back(QString("%1").arg(getPortDisplayHint(descriptor, p)));
- list.push_back(QString("%1").arg(getPortMinimum(descriptor, p)));
- list.push_back(QString("%1").arg(getPortMaximum(descriptor, p)));
- list.push_back(QString("%1").arg(getPortDefault(descriptor, p)));
+ list.push_back(TQString("%1").arg(type));
+ list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p)));
+ list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p)));
+ list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p)));
+ list.push_back(TQString("%1").arg(getPortDefault(descriptor, p)));
}
}
@@ -135,7 +135,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
void
-LADSPAPluginFactory::populatePluginSlot(QString identifier, MappedPluginSlot &slot)
+LADSPAPluginFactory::populatePluginSlot(TQString identifier, MappedPluginSlot &slot)
{
const LADSPA_Descriptor *descriptor = getLADSPADescriptor(identifier);
@@ -407,7 +407,7 @@ LADSPAPluginFactory::getPortDisplayHint(const LADSPA_Descriptor *descriptor, int
RunnablePluginInstance *
-LADSPAPluginFactory::instantiatePlugin(QString identifier,
+LADSPAPluginFactory::instantiatePlugin(TQString identifier,
int instrument,
int position,
unsigned int sampleRate,
@@ -433,7 +433,7 @@ LADSPAPluginFactory::instantiatePlugin(QString identifier,
void
LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance,
- QString identifier)
+ TQString identifier)
{
if (m_instances.find(instance) == m_instances.end()) {
std::cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!"
@@ -441,7 +441,7 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance,
return ;
}
- QString type, soname, label;
+ TQString type, soname, label;
PluginIdentifier::parseIdentifier(identifier, type, soname, label);
m_instances.erase(m_instances.find(instance));
@@ -451,7 +451,7 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance,
for (std::set
<RunnablePluginInstance *>::iterator ii = m_instances.begin();
ii != m_instances.end(); ++ii) {
- QString itype, isoname, ilabel;
+ TQString itype, isoname, ilabel;
PluginIdentifier::parseIdentifier((*ii)->getIdentifier(), itype, isoname, ilabel);
if (isoname == soname) {
// std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname << " is still in use for plugin " << ilabel << std::endl;
@@ -467,9 +467,9 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance,
}
const LADSPA_Descriptor *
-LADSPAPluginFactory::getLADSPADescriptor(QString identifier)
+LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
{
- QString type, soname, label;
+ TQString type, soname, label;
PluginIdentifier::parseIdentifier(identifier, type, soname, label);
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
@@ -505,7 +505,7 @@ LADSPAPluginFactory::getLADSPADescriptor(QString identifier)
}
void
-LADSPAPluginFactory::loadLibrary(QString soName)
+LADSPAPluginFactory::loadLibrary(TQString soName)
{
void *libraryHandle = dlopen(soName.data(), RTLD_NOW);
if (libraryHandle)
@@ -513,7 +513,7 @@ LADSPAPluginFactory::loadLibrary(QString soName)
}
void
-LADSPAPluginFactory::unloadLibrary(QString soName)
+LADSPAPluginFactory::unloadLibrary(TQString soName)
{
LibraryHandleMap::iterator li = m_libraryHandles.find(soName);
if (li != m_libraryHandles.end()) {
@@ -526,7 +526,7 @@ LADSPAPluginFactory::unloadLibrary(QString soName)
void
LADSPAPluginFactory::unloadUnusedLibraries()
{
- std::vector<QString> toUnload;
+ std::vector<TQString> toUnload;
for (LibraryHandleMap::iterator i = m_libraryHandles.begin();
i != m_libraryHandles.end(); ++i) {
@@ -537,7 +537,7 @@ LADSPAPluginFactory::unloadUnusedLibraries()
<RunnablePluginInstance *>::iterator ii = m_instances.begin();
ii != m_instances.end(); ++ii) {
- QString itype, isoname, ilabel;
+ TQString itype, isoname, ilabel;
PluginIdentifier::parseIdentifier((*ii)->getIdentifier(), itype, isoname, ilabel);
if (isoname == i->first) {
stillInUse = true;
@@ -549,7 +549,7 @@ LADSPAPluginFactory::unloadUnusedLibraries()
toUnload.push_back(i->first);
}
- for (std::vector<QString>::iterator i = toUnload.begin();
+ for (std::vector<TQString>::iterator i = toUnload.begin();
i != toUnload.end(); ++i) {
unloadLibrary(*i);
}
@@ -564,10 +564,10 @@ LADSPAPluginFactory::unloadUnusedLibraries()
// I hope someday to forget all this.
-std::vector<QString>
+std::vector<TQString>
LADSPAPluginFactory::getPluginPath()
{
- std::vector<QString> pathList;
+ std::vector<TQString> pathList;
std::string path;
char *cpath = getenv("LADSPA_PATH");
@@ -595,16 +595,16 @@ LADSPAPluginFactory::getPluginPath()
#ifdef HAVE_LIBLRDF
-std::vector<QString>
-LADSPAPluginFactory::getLRDFPath(QString &baseUri)
+std::vector<TQString>
+LADSPAPluginFactory::getLRDFPath(TQString &baseUri)
{
- std::vector<QString> pathList = getPluginPath();
- std::vector<QString> lrdfPaths;
+ std::vector<TQString> pathList = getPluginPath();
+ std::vector<TQString> lrdfPaths;
lrdfPaths.push_back("/usr/local/share/ladspa/rdf");
lrdfPaths.push_back("/usr/share/ladspa/rdf");
- for (std::vector<QString>::iterator i = pathList.begin();
+ for (std::vector<TQString>::iterator i = pathList.begin();
i != pathList.end(); ++i) {
lrdfPaths.push_back(*i + "/rdf");
}
@@ -617,11 +617,11 @@ LADSPAPluginFactory::getLRDFPath(QString &baseUri)
void
LADSPAPluginFactory::discoverPlugins()
{
- std::vector<QString> pathList = getPluginPath();
+ std::vector<TQString> pathList = getPluginPath();
std::cerr << "LADSPAPluginFactory::discoverPlugins - "
<< "discovering plugins; path is ";
- for (std::vector<QString>::iterator i = pathList.begin();
+ for (std::vector<TQString>::iterator i = pathList.begin();
i != pathList.end(); ++i) {
std::cerr << "[" << *i << "] ";
}
@@ -636,15 +636,15 @@ LADSPAPluginFactory::discoverPlugins()
//
lrdf_init();
- QString baseUri;
- std::vector<QString> lrdfPaths = getLRDFPath(baseUri);
+ TQString baseUri;
+ std::vector<TQString> lrdfPaths = getLRDFPath(baseUri);
bool haveSomething = false;
for (size_t i = 0; i < lrdfPaths.size(); ++i) {
- QDir dir(lrdfPaths[i], "*.rdf;*.rdfs");
+ TQDir dir(lrdfPaths[i], "*.rdf;*.rdfs");
for (unsigned int j = 0; j < dir.count(); ++j) {
- if (!lrdf_read_file(QString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) {
+ if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) {
// std::cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << std::endl;
haveSomething = true;
}
@@ -658,13 +658,13 @@ LADSPAPluginFactory::discoverPlugins()
generateFallbackCategories();
- for (std::vector<QString>::iterator i = pathList.begin();
+ for (std::vector<TQString>::iterator i = pathList.begin();
i != pathList.end(); ++i) {
- QDir pluginDir(*i, "*.so");
+ TQDir pluginDir(*i, "*.so");
for (unsigned int j = 0; j < pluginDir.count(); ++j) {
- discoverPlugins(QString("%1/%2").arg(*i).arg(pluginDir[j]));
+ discoverPlugins(TQString("%1/%2").arg(*i).arg(pluginDir[j]));
}
}
@@ -678,7 +678,7 @@ LADSPAPluginFactory::discoverPlugins()
}
void
-LADSPAPluginFactory::discoverPlugins(QString soName)
+LADSPAPluginFactory::discoverPlugins(TQString soName)
{
void *libraryHandle = dlopen(soName.data(), RTLD_LAZY);
@@ -705,7 +705,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName)
char * def_uri = 0;
lrdf_defaults *defs = 0;
- QString category = m_taxonomy[descriptor->UniqueID];
+ TQString category = m_taxonomy[descriptor->UniqueID];
if (category == "" && descriptor->Name != 0) {
std::string name = descriptor->Name;
@@ -717,7 +717,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName)
}
// std::cerr << "Plugin id is " << descriptor->UniqueID
-// << ", category is \"" << (category ? category : QString("(none)"))
+// << ", category is \"" << (category ? category : TQString("(none)"))
// << "\", name is " << descriptor->Name
// << ", label is " << descriptor->Label
// << std::endl;
@@ -749,7 +749,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName)
}
#endif // HAVE_LIBLRDF
- QString identifier = PluginIdentifier::createIdentifier
+ TQString identifier = PluginIdentifier::createIdentifier
("ladspa", soName, descriptor->Label);
// std::cerr << "Added plugin identifier " << identifier << std::endl;
m_identifiers.push_back(identifier);
@@ -766,12 +766,12 @@ LADSPAPluginFactory::discoverPlugins(QString soName)
void
LADSPAPluginFactory::generateFallbackCategories()
{
- std::vector<QString> pluginPath = getPluginPath();
- std::vector<QString> path;
+ std::vector<TQString> pluginPath = getPluginPath();
+ std::vector<TQString> path;
for (size_t i = 0; i < pluginPath.size(); ++i) {
if (pluginPath[i].contains("/lib/")) {
- QString p(pluginPath[i]);
+ TQString p(pluginPath[i]);
p.replace("/lib/", "/share/");
path.push_back(p);
// std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl;
@@ -782,25 +782,25 @@ LADSPAPluginFactory::generateFallbackCategories()
for (size_t i = 0; i < path.size(); ++i) {
- QDir dir(path[i], "*.cat");
+ TQDir dir(path[i], "*.cat");
// std::cerr << "LADSPAPluginFactory::generateFallbackCategories: directory " << path[i] << " has " << dir.count() << " .cat files" << std::endl;
for (unsigned int j = 0; j < dir.count(); ++j) {
- QFile file(path[i] + "/" + dir[j]);
+ TQFile file(path[i] + "/" + dir[j]);
// std::cerr << "LADSPAPluginFactory::generateFallbackCategories: about to open " << (path[i] + "/" + dir[j]) << std::endl;
if (file.open(IO_ReadOnly)) {
// std::cerr << "...opened" << std::endl;
- QTextStream stream(&file);
- QString line;
+ TQTextStream stream(&file);
+ TQString line;
while (!stream.eof()) {
line = stream.readLine();
// std::cerr << "line is: \"" << line << "\"" << std::endl;
- QString id = line.section("::", 0, 0);
- QString cat = line.section("::", 1, 1);
+ TQString id = line.section("::", 0, 0);
+ TQString cat = line.section("::", 1, 1);
m_fallbackCategories[id] = cat;
// std::cerr << "set id \"" << id << "\" to cat \"" << cat << "\"" << std::endl;
}
@@ -810,7 +810,7 @@ LADSPAPluginFactory::generateFallbackCategories()
}
void
-LADSPAPluginFactory::generateTaxonomy(QString uri, QString base)
+LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base)
{
#ifdef HAVE_LIBLRDF
lrdf_uris *uris = lrdf_get_instances(uri.data());