Skip to content

Commit

Permalink
Asserts on bus reconfig and general tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Feb 26, 2024
1 parent 7581e80 commit 8b808d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "reaper_vst3_interfaces.h"
#include "reaper_integration.hpp"

#include <cassert>

#define DEFAULT_OSC_PORT 8000

namespace ear {
Expand Down Expand Up @@ -508,6 +510,7 @@ void EarBinauralMonitoringAudioProcessor::setIHostApplication(
true, 0, AudioChannelSet::discreteChannels(numDawChannels_));
auto retO = setChannelLayoutOfBus(
false, 0, AudioChannelSet::discreteChannels(numDawChannels_));
assert(retI && retO);
backend_ = std::make_unique<ear::plugin::BinauralMonitoringBackend>(
nullptr, numDawChannels_);
connector_->setListenerOrientationInstance(backend_->listenerOrientation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "reaper_vst3_interfaces.h"
#include "reaper_integration.hpp"

#include <cassert>

namespace ear {
namespace plugin {
template <>
Expand Down Expand Up @@ -63,6 +65,7 @@ void EarMonitoringAudioProcessor::setIHostApplication(
true, 0, AudioChannelSet::discreteChannels(numDawChannels_));
auto retO = setChannelLayoutOfBus(
false, 0, AudioChannelSet::discreteChannels(numDawChannels_));
assert(retI && retO);
backend_ = std::make_unique<ear::plugin::MonitoringBackend>(
nullptr, layout(), numDawChannels_);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "scene_plugin_editor.hpp"
#include <adm/write.hpp>
#include "programme_store_adm_serializer.hpp"
#include <future>
#include <programme_store.pb.h>
#include "scene_backend.hpp"
#include "metadata_event_dispatcher.hpp"
Expand All @@ -11,6 +10,9 @@
#include "reaper_vst3_interfaces.h"
#include "reaper_integration.hpp"

#include <future>
#include <cassert>

SceneAudioProcessor::SceneAudioProcessor()
: AudioProcessor(
// MAX_DAW_CHANNELS of input supports the largest track width in REAPER.
Expand Down Expand Up @@ -302,6 +304,7 @@ void SceneAudioProcessor::setIHostApplication(Steinberg::FUnknown* unknown) {
numDawChannels_ = DetermineChannelCount(reaperHost);
auto ret = setChannelLayoutOfBus(
true, 0, AudioChannelSet::discreteChannels(numDawChannels_));
assert(ret);
levelMeter_->setup(numDawChannels_, samplerate_);
}
}
Expand Down
4 changes: 1 addition & 3 deletions reaper-adm-export-source-plugin/src/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ void AdmStemPluginAudioProcessor::processBlock (AudioBuffer<float>& buffer, Midi
bool AdmStemPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
auto i = layouts.getMainInputChannels();
if (i != numDawChannels_) return false;

return true;
return i == numDawChannels_;
}
#endif

Expand Down

0 comments on commit 8b808d0

Please sign in to comment.