Implement the input passthrough parameter

This commit is contained in:
xenakios 2017-12-23 07:23:38 +02:00
parent 820259b001
commit 9ee8aa6ade
3 changed files with 4 additions and 7 deletions

View File

@ -279,7 +279,7 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu()
PopupMenu menu; PopupMenu menu;
menu.addItem(1, "Play when host transport running", true, processor.m_play_when_host_plays); menu.addItem(1, "Play when host transport running", true, processor.m_play_when_host_plays);
menu.addItem(2, "Capture when host transport running", true, processor.m_capture_when_host_plays); menu.addItem(2, "Capture when host transport running", true, processor.m_capture_when_host_plays);
menu.addItem(3, "Always pass audio input through", true, processor.m_pass_input_through);
//menu.addItem(3, "Prebuffering", true, processor.m_use_backgroundbuffering); //menu.addItem(3, "Prebuffering", true, processor.m_use_backgroundbuffering);
PopupMenu bufferingmenu; PopupMenu bufferingmenu;
int curbufamount = processor.getPreBufferAmount(); int curbufamount = processor.getPreBufferAmount();
@ -299,10 +299,7 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu()
{ {
processor.m_capture_when_host_plays = !processor.m_capture_when_host_plays; processor.m_capture_when_host_plays = !processor.m_capture_when_host_plays;
} }
if (r == 3)
{
processor.m_pass_input_through = !processor.m_pass_input_through;
}
if (r >= 100 && r < 200) if (r >= 100 && r < 200)
{ {
if (r == 100) if (r == 100)

View File

@ -473,7 +473,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
{ {
m_buffering_source->getNextAudioBlock(aif); m_buffering_source->getNextAudioBlock(aif);
} }
if (m_pass_input_through == true) if (getParameter(cpi_passthrough) > 0.5f)
{ {
for (int i = 0; i < totalNumInputChannels; ++i) for (int i = 0; i < totalNumInputChannels; ++i)
{ {

View File

@ -140,7 +140,7 @@ public:
bool m_play_when_host_plays = false; bool m_play_when_host_plays = false;
bool m_capture_when_host_plays = false; bool m_capture_when_host_plays = false;
bool m_use_backgroundbuffering = true; bool m_use_backgroundbuffering = true;
bool m_pass_input_through = false;
void setPreBufferAmount(int x); void setPreBufferAmount(int x);
int getPreBufferAmount(); int getPreBufferAmount();
private: private: