Skip to content

Commit

Permalink
use isBusesLayoutSupported for configuring buses
Browse files Browse the repository at this point in the history
  • Loading branch information
hollance committed Apr 15, 2024
1 parent 9f8c515 commit 50b7384
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 59 deletions.
30 changes: 0 additions & 30 deletions Builds/MacOSX/KissOfShame.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1148,9 +1145,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1261,9 +1255,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1376,9 +1367,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1495,9 +1483,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1619,9 +1604,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1780,9 +1762,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -1902,9 +1881,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -2079,9 +2055,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down Expand Up @@ -2199,9 +2172,6 @@
"JucePlugin_ARAFactoryID=\\\"com.InfernalLove.KissOfShame.factory\\\"",
"JucePlugin_ARADocumentArchiveID=\\\"com.InfernalLove.KissOfShame.aradocumentarchive.1.0.0\\\"",
"JucePlugin_ARACompatibleArchiveIDs=\\\"\\\"",
"JucePlugin_MaxNumInputChannels=2",
"JucePlugin_MaxNumOutputChannels=2",
"JucePlugin_PreferredChannelConfigurations={1,\\ 1},\\ {2,\\ 2}",
"JUCE_STANDALONE_APPLICATION=JucePlugin_Build_Standalone",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions Builds/VisualStudio2022/KissOfShame_SharedCode.vcxproj

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Builds/VisualStudio2022/KissOfShame_StandalonePlugin.vcxproj

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Builds/VisualStudio2022/KissOfShame_VST3.vcxproj

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions JuceLibraryCode/JucePluginDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,3 @@
#ifndef JucePlugin_ARACompatibleArchiveIDs
#define JucePlugin_ARACompatibleArchiveIDs ""
#endif
#ifndef JucePlugin_MaxNumInputChannels
#define JucePlugin_MaxNumInputChannels 2
#endif
#ifndef JucePlugin_MaxNumOutputChannels
#define JucePlugin_MaxNumOutputChannels 2
#endif
#ifndef JucePlugin_PreferredChannelConfigurations
#define JucePlugin_PreferredChannelConfigurations {1, 1}, {2, 2}
#endif
6 changes: 3 additions & 3 deletions KissOfShame.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" bundleIdentifier="com.InfernalLove.KissOfShame"
pluginName="The Kiss Of Shame" pluginManufacturer="Infernal Love"
pluginManufacturerCode="ILov" pluginCode="Tkos" pluginAAXCategory="2"
cppLanguageStandard="20" pluginChannelConfigs="{1, 1}, {2, 2}"
companyWebsite="https://github.com/hollance/TheKissOfShame" aaxIdentifier="com.InfernalLove.KissOfShame"
companyName="Infernal Love" pluginDesc="Tape Desecration Processor">
cppLanguageStandard="20" companyWebsite="https://github.com/hollance/TheKissOfShame"
aaxIdentifier="com.InfernalLove.KissOfShame" companyName="Infernal Love"
pluginDesc="Tape Desecration Processor">
<MAINGROUP id="OWaNcN" name="KissOfShame">
<GROUP id="{D05B6388-C834-5CDD-F546-69BC8457519E}" name="Audio_Resources">
<FILE id="XPhc7y" name="Hiss.wav" compile="0" resource="1" file="Audio_Resources/Hiss.wav"/>
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ The following changes were made in this repo:

## TO-DO list

Bugs I found:
Bugs I found (or introduced hehe):

- Sometimes there is an extremely loud glitch. Not sure yet what causes this, most likely some uninitialized memory.
- When the Hurricane Sandy environment is active, moving the Age knob to the minimum position can cause the low-pass filter to give a massive gain boost.
- The hacky way I've implemented the Link Input/Output mode may be problematic. Sometimes this gives an assertion on `beginGesture` being called twice. Not a massive problem but not great either.

Other things that can / should be improved in the code (volunteers welcome!):

Expand Down
13 changes: 13 additions & 0 deletions Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ void KissOfShameAudioProcessor::changeProgramName(int, const juce::String&)
{
}

bool KissOfShameAudioProcessor::isBusesLayoutSupported(const BusesLayout& layouts) const
{
const auto mono = juce::AudioChannelSet::mono();
const auto stereo = juce::AudioChannelSet::stereo();
const auto mainIn = layouts.getMainInputChannelSet();
const auto mainOut = layouts.getMainOutputChannelSet();

if (mainIn == mono && mainOut == mono) { return true; }
if (mainIn == stereo && mainOut == stereo) { return true; }

return false;
}

void KissOfShameAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock)
{
params.prepareToPlay(sampleRate);
Expand Down
2 changes: 2 additions & 0 deletions Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class KissOfShameAudioProcessor : public juce::AudioProcessor
KissOfShameAudioProcessor();
~KissOfShameAudioProcessor() override;

bool isBusesLayoutSupported(const BusesLayout& layouts) const override;

void prepareToPlay(double sampleRate, int samplesPerBlock) override;
void releaseResources() override;
void processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
Expand Down

0 comments on commit 50b7384

Please sign in to comment.