Browse Source

Fix Windows build; Misc changes

tags/1.9.6
falkTX 10 years ago
parent
commit
5bce798867
6 changed files with 14 additions and 9 deletions
  1. +1
    -1
      source/backend/CarlaPlugin.hpp
  2. +8
    -1
      source/backend/plugin/CarlaPlugin.cpp
  3. +0
    -2
      source/backend/plugin/CarlaPluginDSSI.cpp
  4. +2
    -2
      source/backend/plugin/CarlaPluginLV2.cpp
  5. +1
    -1
      source/utils/CarlaBinaryUtils.hpp
  6. +2
    -2
      source/utils/CarlaPluginUI.cpp

+ 1
- 1
source/backend/CarlaPlugin.hpp View File

@@ -724,7 +724,6 @@ public:
*/
virtual void handleOscMessage(const char* const method, const int argc, const void* const argv, const char* const types, const lo_message msg);

#ifndef BUILD_BRIDGE
// -------------------------------------------------------------------
// MIDI events

@@ -735,6 +734,7 @@ public:
*/
void sendMidiSingleNote(const uint8_t channel, const uint8_t note, const uint8_t velo, const bool sendGui, const bool sendOsc, const bool sendCallback);

#ifndef BUILD_BRIDGE
/*!
* Send all midi notes off to the host callback.
* This doesn't send the actual MIDI All-Notes-Off event, but 128 note-offs instead (IFF ctrlChannel is valid).


+ 8
- 1
source/backend/plugin/CarlaPlugin.cpp View File

@@ -1537,7 +1537,6 @@ void CarlaPlugin::handleOscMessage(const char* const, const int, const void* con
// -------------------------------------------------------------------
// MIDI events

#ifndef BUILD_BRIDGE
void CarlaPlugin::sendMidiSingleNote(const uint8_t channel, const uint8_t note, const uint8_t velo, const bool sendGui, const bool sendOsc, const bool sendCallback)
{
CARLA_SAFE_ASSERT_RETURN(channel < MAX_MIDI_CHANNELS,);
@@ -1562,6 +1561,7 @@ void CarlaPlugin::sendMidiSingleNote(const uint8_t channel, const uint8_t note,
uiNoteOff(channel, note);
}

#ifndef BUILD_BRIDGE
if (sendOsc && pData->engine->isOscControlRegistered())
{
if (velo > 0)
@@ -1569,11 +1569,18 @@ void CarlaPlugin::sendMidiSingleNote(const uint8_t channel, const uint8_t note,
else
pData->engine->oscSend_control_note_off(pData->id, channel, note);
}
#endif

if (sendCallback)
pData->engine->callback((velo > 0) ? ENGINE_CALLBACK_NOTE_ON : ENGINE_CALLBACK_NOTE_OFF, pData->id, channel, note, velo, nullptr);

#ifdef BUILD_BRIDGE
// unused
return; (void)sendOsc;
#endif
}

#ifndef BUILD_BRIDGE
void CarlaPlugin::sendMidiAllNotesOffToCallback()
{
if (pData->ctrlChannel < 0 || pData->ctrlChannel >= MAX_MIDI_CHANNELS)


+ 0
- 2
source/backend/plugin/CarlaPluginDSSI.cpp View File

@@ -2210,7 +2210,6 @@ public:
return;
}

#ifndef BUILD_BRIDGE
const uint8_t* const data = argv[0]->m;
uint8_t status = data[1];
uint8_t channel = status & 0x0F;
@@ -2237,7 +2236,6 @@ public:

sendMidiSingleNote(channel, note, velo, false, true, true);
}
#endif
}

void handleOscMessageUpdate(const int argc, const lo_arg* const* const argv, const char* const types, const lo_address source)


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

@@ -1298,7 +1298,7 @@ public:

case LV2_UI_COCOA:
# ifdef CARLA_OS_MAC
fUI.window = CarlaPluginUI::newCocoa(this, frontendWinId);
fUI.window = CarlaPluginUI::newCocoa(this, frontendWinId, isUiResizable());
# else
msg = "UI is for MacOS only";
# endif
@@ -1306,7 +1306,7 @@ public:

case LV2_UI_WINDOWS:
# ifdef CARLA_OS_WIN
fUI.window = CarlaPluginUI::newWindows(this, frontendWinId);
fUI.window = CarlaPluginUI::newWindows(this, frontendWinId, isUiResizable());
# else
msg = "UI is for Windows only";
# endif


+ 1
- 1
source/utils/CarlaBinaryUtils.hpp View File

@@ -69,10 +69,10 @@ BinaryType getBinaryTypeFromFile(const char* const filename)
{
carla_debug("getBinaryTypeFromFile(\"%s\")", filename);

#if defined(CARLA_OS_UNIX) && ! defined(BUILD_BRIDGE)
if (filename == nullptr || filename[0] == '\0')
return BINARY_NATIVE;

#if defined(CARLA_OS_UNIX) && ! defined(BUILD_BRIDGE)
static const CarlaMagic magic;

const char* const output(magic.getFileDescription(filename));


+ 2
- 2
source/utils/CarlaPluginUI.cpp View File

@@ -754,14 +754,14 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons
// -----------------------------------------------------

#ifdef CARLA_OS_MAC
CarlaPluginUI* CarlaPluginUI::newCocoa(CloseCallback* cb, uintptr_t parentId)
CarlaPluginUI* CarlaPluginUI::newCocoa(CloseCallback* cb, uintptr_t parentId, bool /*isResizable*/)
{
return new JucePluginUI(cb, parentId);
}
#endif

#ifdef CARLA_OS_WIN
CarlaPluginUI* CarlaPluginUI::newWindows(CloseCallback* cb, uintptr_t parentId)
CarlaPluginUI* CarlaPluginUI::newWindows(CloseCallback* cb, uintptr_t parentId, bool /*isResizable*/)
{
return new JucePluginUI(cb, parentId);
}


Loading…
Cancel
Save