Browse Source

Use FX variant as base for wasm builds, add input and midi options

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.07
falkTX 2 years ago
parent
commit
e3a7a5ccb8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 32 additions and 4 deletions
  1. +1
    -1
      dpf
  2. +1
    -1
      src/Makefile
  3. +30
    -2
      src/override/MenuBar.cpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit f022c766bd315b5bb22800b9ab78a4e1ec991edc
Subproject commit e2e2b5507f683a6b62adbd984b62cdde0ed05c3d

+ 1
- 1
src/Makefile View File

@@ -203,7 +203,7 @@ ifeq ($(MOD_BUILD),true)
$(MAKE) -C Cardinal lv2
$(MAKE) -C CardinalFX lv2
else ifeq ($(WASM),true)
$(MAKE) -C CardinalSynth jack
$(MAKE) -C CardinalFX jack
else
$(MAKE) -C Cardinal
$(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS)


+ 30
- 2
src/override/MenuBar.cpp View File

@@ -50,11 +50,15 @@
#include <patch.hpp>
#include <library.hpp>

#include "../CardinalCommon.hpp"

#ifdef HAVE_LIBLO
# include <lo/lo.h>
#endif

#include "../CardinalCommon.hpp"
#ifdef DISTRHO_OS_WASM
# include "DistrhoStandaloneUtils.hpp"
#endif

namespace rack {
namespace asset {
@@ -604,6 +608,30 @@ struct EngineButton : MenuButton {
menu->addChild(createMenuItem("Performance meters", cpuMeterText, [=]() {
settings::cpuMeter ^= true;
}));

#ifdef DISTRHO_OS_WASM
if (supportsAudioInput()) {
const bool enabled = isAudioInputEnabled();
std::string text = "Enable Audio Input";
if (enabled)
text += " " CHECKMARK_STRING;
menu->addChild(createMenuItem(text, "", [enabled]() {
if (!enabled)
requestAudioInput();
}));
}

if (supportsMIDI()) {
const bool enabled = isMIDIEnabled();
std::string text = "Enable MIDI";
if (enabled)
text += " " CHECKMARK_STRING;
menu->addChild(createMenuItem(text, "", [enabled]() {
if (!enabled)
requestMIDI();
}));
}
#endif
}
};

@@ -682,7 +710,7 @@ struct MenuBar : widget::OpaqueWidget {

MenuBar(const bool isStandalone)
: widget::OpaqueWidget()
{
{
const float margin = 5;
box.size.y = BND_WIDGET_HEIGHT + 2 * margin;



Loading…
Cancel
Save