comparison transform/TransformFactory.cpp @ 936:0c1d6de8f44b

Merge from branch warnfix_no_size_t
author Chris Cannam
date Wed, 18 Jun 2014 13:51:16 +0100
parents 06579b8ffb7b
children 45e95de8b11d
comparison
equal deleted inserted replaced
917:49618f39ff09 936:0c1d6de8f44b
403 { 403 {
404 std::vector<QString> plugs = 404 std::vector<QString> plugs =
405 FeatureExtractionPluginFactory::getAllPluginIdentifiers(); 405 FeatureExtractionPluginFactory::getAllPluginIdentifiers();
406 if (m_exiting) return; 406 if (m_exiting) return;
407 407
408 for (size_t i = 0; i < plugs.size(); ++i) { 408 for (int i = 0; i < (int)plugs.size(); ++i) {
409 409
410 QString pluginId = plugs[i]; 410 QString pluginId = plugs[i];
411 411
412 FeatureExtractionPluginFactory *factory = 412 FeatureExtractionPluginFactory *factory =
413 FeatureExtractionPluginFactory::instanceFor(pluginId); 413 FeatureExtractionPluginFactory::instanceFor(pluginId);
429 QString category = factory->getPluginCategory(pluginId); 429 QString category = factory->getPluginCategory(pluginId);
430 430
431 Vamp::Plugin::OutputList outputs = 431 Vamp::Plugin::OutputList outputs =
432 plugin->getOutputDescriptors(); 432 plugin->getOutputDescriptors();
433 433
434 for (size_t j = 0; j < outputs.size(); ++j) { 434 for (int j = 0; j < (int)outputs.size(); ++j) {
435 435
436 QString transformId = QString("%1:%2") 436 QString transformId = QString("%1:%2")
437 .arg(pluginId).arg(outputs[j].identifier.c_str()); 437 .arg(pluginId).arg(outputs[j].identifier.c_str());
438 438
439 QString userName; 439 QString userName;
504 RealTimePluginFactory::getAllPluginIdentifiers(); 504 RealTimePluginFactory::getAllPluginIdentifiers();
505 if (m_exiting) return; 505 if (m_exiting) return;
506 506
507 static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$"); 507 static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$");
508 508
509 for (size_t i = 0; i < plugs.size(); ++i) { 509 for (int i = 0; i < (int)plugs.size(); ++i) {
510 510
511 QString pluginId = plugs[i]; 511 QString pluginId = plugs[i];
512 512
513 RealTimePluginFactory *factory = 513 RealTimePluginFactory *factory =
514 RealTimePluginFactory::instanceFor(pluginId); 514 RealTimePluginFactory::instanceFor(pluginId);
537 QString maker = descriptor->maker.c_str(); 537 QString maker = descriptor->maker.c_str();
538 if (maker == "") maker = tr("<unknown maker>"); 538 if (maker == "") maker = tr("<unknown maker>");
539 539
540 if (descriptor->audioInputPortCount > 0) { 540 if (descriptor->audioInputPortCount > 0) {
541 541
542 for (size_t j = 0; j < descriptor->controlOutputPortCount; ++j) { 542 for (int j = 0; j < (int)descriptor->controlOutputPortCount; ++j) {
543 543
544 QString transformId = QString("%1:%2").arg(pluginId).arg(j); 544 QString transformId = QString("%1:%2").arg(pluginId).arg(j);
545 QString userName; 545 QString userName;
546 QString units; 546 QString units;
547 QString portName; 547 QString portName;
548 548
549 if (j < descriptor->controlOutputPortNames.size() && 549 if (j < (int)descriptor->controlOutputPortNames.size() &&
550 descriptor->controlOutputPortNames[j] != "") { 550 descriptor->controlOutputPortNames[j] != "") {
551 551
552 portName = descriptor->controlOutputPortNames[j].c_str(); 552 portName = descriptor->controlOutputPortNames[j].c_str();
553 553
554 userName = tr("%1: %2") 554 userName = tr("%1: %2")
747 cerr << "populateUninstalledTransforms exiting" << endl; 747 cerr << "populateUninstalledTransforms exiting" << endl;
748 #endif 748 #endif
749 } 749 }
750 750
751 Transform 751 Transform
752 TransformFactory::getDefaultTransformFor(TransformId id, size_t rate) 752 TransformFactory::getDefaultTransformFor(TransformId id, int rate)
753 { 753 {
754 Transform t; 754 Transform t;
755 t.setIdentifier(id); 755 t.setIdentifier(id);
756 if (rate != 0) t.setSampleRate(rate); 756 if (rate != 0) t.setSampleRate(rate);
757 757
779 779
780 return plugin; 780 return plugin;
781 } 781 }
782 782
783 Vamp::PluginBase * 783 Vamp::PluginBase *
784 TransformFactory::instantiateDefaultPluginFor(TransformId identifier, size_t rate) 784 TransformFactory::instantiateDefaultPluginFor(TransformId identifier, int rate)
785 { 785 {
786 Transform t; 786 Transform t;
787 t.setIdentifier(identifier); 787 t.setIdentifier(identifier);
788 if (rate == 0) rate = 44100; 788 if (rate == 0) rate = 44100;
789 QString pluginId = t.getPluginIdentifier(); 789 QString pluginId = t.getPluginIdentifier();