Browse Source

Corrections for last commit

tags/1.9.4
falkTX 11 years ago
parent
commit
053bcf6692
4 changed files with 27 additions and 16 deletions
  1. +3
    -2
      source/backend/engine/CarlaEngineJack.cpp
  2. +2
    -2
      source/backend/plugin/CarlaPlugin.cpp
  3. +10
    -5
      source/backend/plugin/LinuxSamplerPlugin.cpp
  4. +12
    -7
      source/carla_widgets.py

+ 3
- 2
source/backend/engine/CarlaEngineJack.cpp View File

@@ -569,6 +569,7 @@ public:
port->invalidate();
}

fActive = false;
fJackClient = nullptr;
}

@@ -1619,8 +1620,8 @@ protected:
engineClient->invalidate();
plugin->unlock();

if (pData->nextAction.pluginId == plugin->getId())
pData->nextAction.clearAndReset();
//if (pData->nextAction.pluginId == plugin->getId())
// pData->nextAction.clearAndReset();

callback(ENGINE_CALLBACK_PLUGIN_UNAVAILABLE, plugin->getId(), 0, 0, 0.0f, "Killed by JACK");
}


+ 2
- 2
source/backend/plugin/CarlaPlugin.cpp View File

@@ -519,7 +519,7 @@ const StateSave& CarlaPlugin::getStateSave()
// ---------------------------------------------------------------
// Current Program

if (pData->prog.current >= 0 && pluginType != PLUGIN_LV2)
if (pData->prog.current >= 0 && pluginType != PLUGIN_LV2 && pluginType != PLUGIN_GIG)
{
pData->stateSave.currentProgramIndex = pData->prog.current;
pData->stateSave.currentProgramName = carla_strdup(pData->prog.names[pData->prog.current]);
@@ -528,7 +528,7 @@ const StateSave& CarlaPlugin::getStateSave()
// ---------------------------------------------------------------
// Current MIDI Program

if (pData->midiprog.current >= 0 && pluginType != PLUGIN_LV2 && pluginType != PLUGIN_GIG && pluginType != PLUGIN_SF2)
if (pData->midiprog.current >= 0 && pluginType != PLUGIN_LV2 && pluginType != PLUGIN_SF2)
{
const MidiProgramData& mpData(pData->midiprog.getCurrent());



+ 10
- 5
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -647,11 +647,15 @@ public:
pData->prog.createNew(count);

// Update data
LinuxSampler::InstrumentManager::instrument_info_t info;

for (uint32_t i=0; i < pData->prog.count; ++i)
{
try {
pData->prog.names[i] = carla_strdup(fInstrument->GetInstrumentName(fInstrumentIds[i]).c_str());
info = fInstrument->GetInstrumentInfo(fInstrumentIds[i]);
} CARLA_SAFE_EXCEPTION_CONTINUE("GetInstrumentInfo");

pData->prog.names[i] = carla_strdup_safe(info.InstrumentName.c_str());
}

#ifndef BUILD_BRIDGE
@@ -669,10 +673,11 @@ public:
{
for (uint i=0; i<kMaxChannels; ++i)
{
CARLA_SAFE_ASSERT_CONTINUE(fEngineChannels[i] != nullptr);
LinuxSampler::EngineChannel* const engineChannel(fEngineChannels[i]);
CARLA_SAFE_ASSERT_CONTINUE(engineChannel != nullptr);

try {
fInstrument->LoadInstrumentInBackground(fInstrumentIds[0], fEngineChannels[i]);
fInstrument->LoadInstrumentInBackground(fInstrumentIds[0], engineChannel);
} CARLA_SAFE_EXCEPTION("LoadInstrumentInBackground");

fCurProgs[i] = 0;
@@ -1163,9 +1168,9 @@ public:
fEngineChannels[i] = fSamplerChannels[i]->GetEngineChannel();
CARLA_SAFE_ASSERT_CONTINUE(fEngineChannels[i] != nullptr);

fEngineChannels[i]->Connect(fAudioOutputDevice); // FIXME
fEngineChannels[i]->Pan(0.0f);
fEngineChannels[i]->Volume(LinuxSampler::kVolumeMax);
fEngineChannels[i]->Volume(kIsGIG ? LinuxSampler::kVolumeMax/10.0f : LinuxSampler::kVolumeMax); // FIXME
fEngineChannels[i]->Connect(fAudioOutputDevice);

if (kUses16Outs)
{


+ 12
- 7
source/carla_widgets.py View File

@@ -658,7 +658,7 @@ class PluginEdit(QDialog):
self.ui.ch_send_all_sound_off.setEnabled(self.fPluginInfo['optionsAvailable'] & PLUGIN_OPTION_SEND_ALL_SOUND_OFF)
self.ui.ch_send_all_sound_off.setChecked(self.fPluginInfo['optionsEnabled'] & PLUGIN_OPTION_SEND_ALL_SOUND_OFF)

self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] == PLUGIN_VST else 1)
self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] in (PLUGIN_VST, PLUGIN_GIG, PLUGIN_SFZ) else 1)

# Show/hide keyboard
showKeyboard = (self.fPluginInfo['category'] == PLUGIN_CATEGORY_SYNTH or midiCountInfo['ins'] > 0 < midiCountInfo['outs'])
@@ -1049,7 +1049,7 @@ class PluginEdit(QDialog):
self.ui.sb_ctrl_channel.setValue(self.fControlChannel+1)
self.ui.sb_ctrl_channel.blockSignals(False)
self.ui.keyboard.allNotesOff()
self._updateCtrlMidiProgram()
self._updateCtrlPrograms()

elif index >= 0:
for paramType, paramId, paramWidget in self.fParameterList:
@@ -1214,7 +1214,7 @@ class PluginEdit(QDialog):
gCarla.host.set_ctrl_channel(self.fPluginId, self.fControlChannel)

self.ui.keyboard.allNotesOff()
self._updateCtrlMidiProgram()
self._updateCtrlPrograms()

#------------------------------------------------------------------

@@ -1415,18 +1415,23 @@ class PluginEdit(QDialog):

self.fTabIconTimers.append(ICON_STATE_NULL)

def _updateCtrlMidiProgram(self):
if self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_SF2):
return
elif self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH:
def _updateCtrlPrograms(self):
if self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH or self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_SF2, PLUGIN_GIG):
return

if self.fControlChannel < 0:
self.ui.cb_programs.setEnabled(False)
self.ui.cb_midi_programs.setEnabled(False)
return

self.ui.cb_programs.setEnabled(True)
self.ui.cb_midi_programs.setEnabled(True)

pIndex = gCarla.host.get_current_program_index(self.fPluginId)

if self.ui.cb_programs.currentIndex() != pIndex:
self.setProgram(pIndex)

mpIndex = gCarla.host.get_current_midi_program_index(self.fPluginId)

if self.ui.cb_midi_programs.currentIndex() != mpIndex:


Loading…
Cancel
Save