Browse Source

Carla: More VST fixes, rework jackbridge

tags/v0.9.0
falkTX 12 years ago
parent
commit
ca09b6908c
6 changed files with 17 additions and 17 deletions
  1. +0
    -1
      c++/carla-backend/Makefile
  2. +0
    -1
      c++/carla-backend/Makefile.dbg
  3. +2
    -2
      c++/carla-backend/lv2.cpp
  4. +12
    -6
      c++/carla-backend/vst.cpp
  5. +0
    -5
      c++/carla-jackbridge/carla_jackbridge.cpp
  6. +3
    -2
      c++/carla-jackbridge/carla_jackbridge.h

+ 0
- 1
c++/carla-backend/Makefile View File

@@ -71,7 +71,6 @@ OBJS = \
carla_shared.o \
carla_threads.o \
ladspa.o dssi.o lv2.o vst.o fluidsynth.o linuxsampler.o \
../carla-jackbridge/carla_jackbridge.o \
../carla-lilv/carla_lilv.a \
../carla-rtmempool/carla_rtmempool.a



+ 0
- 1
c++/carla-backend/Makefile.dbg View File

@@ -71,7 +71,6 @@ OBJS = \
carla_shared.o \
carla_threads.o \
ladspa.o dssi.o lv2.o vst.o fluidsynth.o linuxsampler.o \
../carla-jackbridge/carla_jackbridge.o \
../carla-lilv/carla_lilv.a \
../carla-rtmempool/carla_rtmempool.a



+ 2
- 2
c++/carla-backend/lv2.cpp View File

@@ -2374,10 +2374,10 @@ public:
break;
case LV2_PORT_DESIGNATION_TIME_BAR_BEAT:
if (timeInfo->valid & CarlaEngineTimeBBT)
setParameterValue(k, timeInfo->bbt.beat - 1 + (timeInfo->bbt.tick / timeInfo->bbt.ticks_per_beat), false, false, false);
setParameterValue(k, float(timeInfo->bbt.beat - 1) + (float(timeInfo->bbt.tick) / timeInfo->bbt.ticks_per_beat), false, false, false);
break;
case LV2_PORT_DESIGNATION_TIME_BEAT:
if (timeInfo->valid & CarlaEngineTimeBBT) // FIXME: -1 ?
if (timeInfo->valid & CarlaEngineTimeBBT)
setParameterValue(k, timeInfo->bbt.beat - 1, false, false, false);
break;
case LV2_PORT_DESIGNATION_TIME_BEAT_UNIT:


+ 12
- 6
c++/carla-backend/vst.cpp View File

@@ -66,6 +66,8 @@ public:
isProcessing = false;
needIdle = false;

vstTimeOffset = 0;

memset(midiEvents, 0, sizeof(VstMidiEvent)*MAX_MIDI_EVENTS*2);

for (unsigned short i=0; i < MAX_MIDI_EVENTS*2; i++)
@@ -842,6 +844,8 @@ public:
uint32_t i, k;
uint32_t midiEventCount = 0;

vstTimeOffset = framesOffset;

double aInsPeak[2] = { 0.0 };
double aOutsPeak[2] = { 0.0 };

@@ -1420,7 +1424,7 @@ public:
void handleAudioMasterAutomate(const uint32_t index, const double value)
{
//CARLA_ASSERT(m_enabled);
CARLA_ASSERT(index < param.count);
//CARLA_ASSERT(index < param.count);

if (index >= param.count /*|| ! m_enabled*/)
return;
@@ -1464,7 +1468,7 @@ public:
if (timeInfo->playing)
vstTimeInfo.flags |= kVstTransportPlaying;

//vstTimeInfo.samplePos = timeInfo->frame; // FIXME - currentSamplePosition ?
vstTimeInfo.samplePos = timeInfo->frame + vstTimeOffset;
vstTimeInfo.sampleRate = x_engine->getSampleRate();

vstTimeInfo.nanoSeconds = timeInfo->time;
@@ -1472,12 +1476,12 @@ public:

if (timeInfo->valid & CarlaEngineTimeBBT)
{
double ppqBar = double(timeInfo->bbt.bar) * timeInfo->bbt.beats_per_bar - timeInfo->bbt.beats_per_bar;
double ppqBeat = double(timeInfo->bbt.beat) - 1.0;
double ppqBar = double(timeInfo->bbt.bar - 1) * timeInfo->bbt.beats_per_bar;
double ppqBeat = double(timeInfo->bbt.beat - 1);
double ppqTick = double(timeInfo->bbt.tick) / timeInfo->bbt.ticks_per_beat;

// Bars
vstTimeInfo.barStartPos = ppqBar + ppqBeat;
vstTimeInfo.barStartPos = ppqBar;
vstTimeInfo.flags |= kVstBarsValid;

// PPQ Pos
@@ -2265,7 +2269,9 @@ private:
intptr_t reserved;
VstEvent* data[MAX_MIDI_EVENTS*2];
} events;
VstMidiEvent midiEvents[MAX_MIDI_EVENTS*2];
VstMidiEvent midiEvents[MAX_MIDI_EVENTS*2];

uint32_t vstTimeOffset;
VstTimeInfo_R vstTimeInfo;

struct {


+ 0
- 5
c++/carla-jackbridge/carla_jackbridge.cpp View File

@@ -15,11 +15,6 @@
* For a full copy of the GNU General Public License see the COPYING file
*/

#ifndef JACKBRIDGE_DUMMY
# include <jack/jack.h>
# include <jack/midiport.h>
#endif

#include "carla_jackbridge.h"

jack_client_t* jackbridge_client_open(const char* client_name, jack_options_t options, jack_status_t* status)


+ 3
- 2
c++/carla-jackbridge/carla_jackbridge.h View File

@@ -20,8 +20,9 @@

#include "carla_includes.h"

#include <jack/types.h>
#include <jack/transport.h> // needed for JACK1
#include <jack/jack.h>
#include <jack/midiport.h>
#include <jack/transport.h>

#ifdef BUILD_BRIDGE



Loading…
Cancel
Save