Skip to content

Commit

Permalink
Use const float* for process's in buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
messmerd committed Sep 14, 2024
1 parent 32557d4 commit 1716186
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/RemotePluginClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class RemotePluginClient : public RemotePluginBase

bool processMessage( const message & _m ) override;

virtual void process(float* _in, float* _out) = 0;
virtual void process(const float* _in, float* _out) = 0;

virtual void processMidiEvent( const MidiEvent&, const f_cnt_t /* _offset */ )
{
Expand Down
6 changes: 3 additions & 3 deletions plugins/VstBase/RemoteVstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class RemoteVstPlugin : public RemotePluginClient
void hideEditor();
void destroyEditor();

void process(float* _in, float* _out) override;
void process(const float* _in, float* _out) override;


virtual void processMidiEvent( const MidiEvent& event, const f_cnt_t offset );
Expand Down Expand Up @@ -1022,7 +1022,7 @@ bool RemoteVstPlugin::load( const std::string & _plugin_file )



void RemoteVstPlugin::process(float* _in, float* _out)
void RemoteVstPlugin::process(const float* _in, float* _out)
{
// first we gonna post all MIDI-events we enqueued so far
if( m_midiEvents.size() )
Expand Down Expand Up @@ -1074,7 +1074,7 @@ void RemoteVstPlugin::process(float* _in, float* _out)
// NOTE: VST in/out channels are always provided split: in[0..frames] (left), in[frames..2*frames] (right)
for( int i = 0; i < inputCount(); ++i )
{
m_inputs[i] = &_in[i * bufferSize()];
m_inputs[i] = const_cast<float*>(&_in[i * bufferSize()]);
}

for( int i = 0; i < outputCount(); ++i )
Expand Down
2 changes: 1 addition & 1 deletion plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class RemoteZynAddSubFx : public RemotePluginClient, public LocalZynAddSubFx
}


void process(float* _in, float* _out) override
void process(const float* _in, float* _out) override
{
LocalZynAddSubFx::processAudio(reinterpret_cast<SampleFrame*>(_out));
}
Expand Down

0 comments on commit 1716186

Please sign in to comment.