mirror of
https://github.com/yokemura/Magical8bitPlug2.git
synced 2025-07-14 02:54:15 -04:00
Remove unused codes
This commit is contained in:
@ -293,67 +293,13 @@ bool Magical8bitPlug2AudioProcessor::isBusesLayoutSupported (const BusesLayout&
|
||||
|
||||
void Magical8bitPlug2AudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
|
||||
{
|
||||
|
||||
synth.renderNextBlock (buffer, midiMessages, 0, buffer.getNumSamples()); // [5]
|
||||
|
||||
/*
|
||||
buffer.clear();
|
||||
MidiBuffer processedMidi;
|
||||
int time;
|
||||
MidiMessage m;
|
||||
for (MidiBuffer::Iterator i (midiMessages); i.getNextEvent (m, time);)
|
||||
{
|
||||
if (m.isNoteOn())
|
||||
{
|
||||
uint8 newVel = (uint8)noteOnVel;
|
||||
m = MidiMessage::noteOn(m.getChannel(), m.getNoteNumber(), newVel);
|
||||
}
|
||||
else if (m.isNoteOff())
|
||||
{
|
||||
}
|
||||
else if (m.isAftertouch())
|
||||
{
|
||||
}
|
||||
else if (m.isPitchWheel())
|
||||
{
|
||||
}
|
||||
processedMidi.addEvent (m, time);
|
||||
}
|
||||
midiMessages.swapWith (processedMidi);
|
||||
|
||||
|
||||
ScopedNoDenormals noDenormals;
|
||||
auto totalNumInputChannels = getTotalNumInputChannels();
|
||||
auto totalNumOutputChannels = getTotalNumOutputChannels();
|
||||
|
||||
// In case we have more outputs than inputs, this code clears any output
|
||||
// channels that didn't contain input data, (because these aren't
|
||||
// guaranteed to be empty - they may contain garbage).
|
||||
// This is here to avoid people getting screaming feedback
|
||||
// when they first compile a plugin, but obviously you don't need to keep
|
||||
// this code if your algorithm always overwrites all the output channels.
|
||||
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
|
||||
buffer.clear (i, 0, buffer.getNumSamples());
|
||||
|
||||
// This is the place where you'd normally do the guts of your plugin's
|
||||
// audio processing...
|
||||
// Make sure to reset the state if your inner loop is processing
|
||||
// the samples and the outer loop is handling the channels.
|
||||
// Alternatively, you can process the samples with the channels
|
||||
// interleaved by keeping the same state.
|
||||
for (int channel = 0; channel < totalNumInputChannels; ++channel)
|
||||
{
|
||||
auto* channelData = buffer.getWritePointer (channel);
|
||||
|
||||
// ..do something to the data...
|
||||
}
|
||||
*/
|
||||
synth.renderNextBlock (buffer, midiMessages, 0, buffer.getNumSamples());
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool Magical8bitPlug2AudioProcessor::hasEditor() const
|
||||
{
|
||||
return true; // (change this to false if you choose to not supply an editor)
|
||||
return true;
|
||||
}
|
||||
|
||||
AudioProcessorEditor* Magical8bitPlug2AudioProcessor::createEditor()
|
||||
|
Reference in New Issue
Block a user