Browse Source

Misc

tags/v0.9.0
falkTX 13 years ago
parent
commit
ef30778378
1 changed files with 21 additions and 3 deletions
  1. +21
    -3
      src/carla-discovery/carla-discovery.cpp

+ 21
- 3
src/carla-discovery/carla-discovery.cpp View File

@@ -1,4 +1,19 @@
/* Carla Plugin discovery code */
/*
* Carla Plugin discovery code
* Copyright (C) 2012 Filipe Coelho <falktx@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/


#ifndef nullptr #ifndef nullptr
const class { const class {
@@ -63,7 +78,6 @@ private:
#define kPlugCategGenerator 11 #define kPlugCategGenerator 11
#endif #endif


// we don't need to support SoundFonts in 32bit or Wine builds
#ifdef WANT_FLUIDSYNTH #ifdef WANT_FLUIDSYNTH
#include <fluidsynth.h> #include <fluidsynth.h>
#endif #endif
@@ -165,7 +179,9 @@ bool VstPluginCanDo(AEffect* effect, const char* feature)


intptr_t VstHostCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_t value, void* ptr, float opt) intptr_t VstHostCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_t value, void* ptr, float opt)
{ {
#if DEBUG
std::cout << "VstHostCallback(" << effect << ", " << opcode << ", " << index << ", " << value << ", " << ptr << ", " << opt << ")" << std::endl; std::cout << "VstHostCallback(" << effect << ", " << opcode << ", " << index << ", " << value << ", " << ptr << ", " << opt << ")" << std::endl;
#endif


switch (opcode) switch (opcode)
{ {
@@ -206,7 +222,9 @@ intptr_t VstHostCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_
return 0x05; // 0.5 return 0x05; // 0.5


case audioMasterCanDo: case audioMasterCanDo:
#if DEBUG
std::cout << "VstHostCallback:audioMasterCanDo - " << (char*)ptr << std::endl; std::cout << "VstHostCallback:audioMasterCanDo - " << (char*)ptr << std::endl;
#endif


if (strcmp((char*)ptr, "sendVstEvents") == 0) if (strcmp((char*)ptr, "sendVstEvents") == 0)
return 1; return 1;
@@ -766,7 +784,7 @@ void do_sf2_check(const char* filename)


f_sfont = fluid_synth_get_sfont_by_id(f_synth, f_id); f_sfont = fluid_synth_get_sfont_by_id(f_synth, f_id);


// initial check to know how much midi-programs we get
// initial check to know how many midi-programs we get
f_sfont->iteration_start(f_sfont); f_sfont->iteration_start(f_sfont);
while (f_sfont->iteration_next(f_sfont, &f_preset)) while (f_sfont->iteration_next(f_sfont, &f_preset))
programs += 1; programs += 1;


Loading…
Cancel
Save