Mac AU now works in {0,2}. see PluginProccessor.cpp line 826
This commit is contained in:
parent
2216b7ba0d
commit
755d3d7a27
9 changed files with 1978 additions and 1972 deletions
|
@ -2,20 +2,30 @@
|
|||
|
||||
<JUCERPROJECT id="aEo3EV" name="AdlibBlaster" projectType="audioplug" version="0.11.1"
|
||||
bundleIdentifier="com.plainweave.AdlibBlaster" includeBinaryInAppConfig="1"
|
||||
buildVST="1" buildVST3="1" buildAU="1" buildRTAS="0" buildAAX="0"
|
||||
buildVST="1" buildVST3="0" buildAU="1" buildRTAS="0" buildAAX="0"
|
||||
pluginName="AdlibBlaster" pluginDesc="AdlibBlaster" pluginManufacturer="Plainweave Software"
|
||||
pluginManufacturerCode="Pwve" pluginCode="PwAB" pluginChannelConfigs="{0, 1}"
|
||||
pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
|
||||
pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0"
|
||||
pluginAUExportPrefix="AdlibBlasterAU" pluginRTASCategory="" aaxIdentifier="com.plainweave.AdlibBlaster"
|
||||
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="3.1.1">
|
||||
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="3.1.1"
|
||||
companyName="Plainweave Software">
|
||||
<MAINGROUP id="eVDaOt" name="AdlibBlaster">
|
||||
<GROUP id="{59C113D4-6797-15CE-D83B-3AD69FA8D33F}" name="Source">
|
||||
<FILE id="b9oR9v" name="adlib.h" compile="0" resource="0" file="Source/adlib.h"/>
|
||||
<GROUP id="{2820D583-3420-FFB6-4B20-44C1EA45A3D8}" name="DOSBox">
|
||||
<FILE id="b9oR9v" name="adlib.h" compile="0" resource="0" file="Source/adlib.h"/>
|
||||
<FILE id="aiSUQT" name="dbopl.cpp" compile="1" resource="0" file="Source/dbopl.cpp"/>
|
||||
<FILE id="btwPHz" name="dbopl.h" compile="0" resource="0" file="Source/dbopl.h"/>
|
||||
<FILE id="r2C2po" name="dosbox.h" compile="0" resource="0" file="Source/dosbox.h"/>
|
||||
<FILE id="RS71D5" name="hardware.h" compile="0" resource="0" file="Source/hardware.h"/>
|
||||
<FILE id="ZFzWho" name="inout.h" compile="0" resource="0" file="Source/inout.h"/>
|
||||
<FILE id="C90jAE" name="logging.h" compile="0" resource="0" file="Source/logging.h"/>
|
||||
<FILE id="NcdeaJ" name="opl.h" compile="0" resource="0" file="Source/opl.h"/>
|
||||
<FILE id="dUyyeP" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/>
|
||||
<FILE id="dVqY5n" name="pic.h" compile="0" resource="0" file="Source/pic.h"/>
|
||||
<FILE id="MhLIxC" name="setup.h" compile="0" resource="0" file="Source/setup.h"/>
|
||||
</GROUP>
|
||||
<FILE id="IWoszV" name="config.h" compile="0" resource="0" file="Source/config.h"/>
|
||||
<FILE id="aiSUQT" name="dbopl.cpp" compile="1" resource="0" file="Source/dbopl.cpp"/>
|
||||
<FILE id="btwPHz" name="dbopl.h" compile="0" resource="0" file="Source/dbopl.h"/>
|
||||
<FILE id="r2C2po" name="dosbox.h" compile="0" resource="0" file="Source/dosbox.h"/>
|
||||
<FILE id="q3FMeJ" name="DROMultiplexer.cpp" compile="1" resource="0"
|
||||
file="Source/DROMultiplexer.cpp"/>
|
||||
<FILE id="KiwneM" name="DROMultiplexer.h" compile="0" resource="0"
|
||||
|
@ -28,10 +38,8 @@
|
|||
file="Source/FloatParameter.cpp"/>
|
||||
<FILE id="zhBEYO" name="FloatParameter.h" compile="0" resource="0"
|
||||
file="Source/FloatParameter.h"/>
|
||||
<FILE id="RS71D5" name="hardware.h" compile="0" resource="0" file="Source/hardware.h"/>
|
||||
<FILE id="DwaOZA" name="hiopl.cpp" compile="1" resource="0" file="Source/hiopl.cpp"/>
|
||||
<FILE id="KWqH0b" name="hiopl.h" compile="0" resource="0" file="Source/hiopl.h"/>
|
||||
<FILE id="ZFzWho" name="inout.h" compile="0" resource="0" file="Source/inout.h"/>
|
||||
<FILE id="MEqllP" name="InstrumentLoader.h" compile="0" resource="0"
|
||||
file="Source/InstrumentLoader.h"/>
|
||||
<FILE id="h9FLJU" name="IntFloatParameter.cpp" compile="1" resource="0"
|
||||
|
@ -39,10 +47,6 @@
|
|||
<FILE id="K565bW" name="IntFloatParameter.h" compile="0" resource="0"
|
||||
file="Source/IntFloatParameter.h"/>
|
||||
<FILE id="PcN4IQ" name="itoa.h" compile="0" resource="0" file="Source/itoa.h"/>
|
||||
<FILE id="C90jAE" name="logging.h" compile="0" resource="0" file="Source/logging.h"/>
|
||||
<FILE id="dUyyeP" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/>
|
||||
<FILE id="NcdeaJ" name="opl.h" compile="0" resource="0" file="Source/opl.h"/>
|
||||
<FILE id="dVqY5n" name="pic.h" compile="0" resource="0" file="Source/pic.h"/>
|
||||
<FILE id="kakPwh" name="PluginGui.cpp" compile="1" resource="0" file="Source/PluginGui.cpp"/>
|
||||
<FILE id="v7FmIh" name="PluginGui.h" compile="0" resource="0" file="Source/PluginGui.h"/>
|
||||
<FILE id="bBGAG8" name="PluginProcessor.cpp" compile="1" resource="0"
|
||||
|
@ -51,7 +55,6 @@
|
|||
file="Source/PluginProcessor.h"/>
|
||||
<FILE id="IipiOc" name="SbiLoader.cpp" compile="1" resource="0" file="Source/SbiLoader.cpp"/>
|
||||
<FILE id="BP1b58" name="SbiLoader.h" compile="0" resource="0" file="Source/SbiLoader.h"/>
|
||||
<FILE id="MhLIxC" name="setup.h" compile="0" resource="0" file="Source/setup.h"/>
|
||||
<FILE id="okBzcz" name="tests.cpp" compile="1" resource="0" file="Source/tests.cpp"/>
|
||||
<FILE id="fxEtqM" name="windows.h" compile="0" resource="0" file="Source/windows.h"/>
|
||||
<FILE id="ZX8w8R" name="zdopl.cpp" compile="1" resource="0" file="Source/zdopl.cpp"/>
|
||||
|
@ -60,12 +63,12 @@
|
|||
</MAINGROUP>
|
||||
<EXPORTFORMATS>
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" postbuildCommand=" # This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on # which plugin types you've built original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME # this looks inside the binary to detect which platforms are needed.. copyAU=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'AudioUnit' | wc -l` copyVST=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'VSTPlugin' | wc -l` copyVST3=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'GetPluginFactory' | wc -l` copyRTAS=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'CProcess' | wc -l` copyAAX=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'ACFStartup' | wc -l` if [ $copyAU -gt 0 ]; then echo "Copying to AudioUnit folder..." AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component if [ -d "$AU" ]; then rm -r "$AU" fi cp -r "$original" "$AU" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE" # Fix info.plist for AUs built with Xcode 3 if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then echo else echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU" /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist" fi fi if [ $copyVST -gt 0 ]; then echo "Copying to VST folder..." VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst if [ -d "$VST" ]; then rm -r "$VST" fi cp -r "$original" "$VST" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE" fi if [ $copyVST3 -gt 0 ]; then echo "Copying to VST3 folder..." VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3 if [ -d "$VST3" ]; then rm -r "$VST3" fi cp -r "$original" "$VST3" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE" fi if [ $copyRTAS -gt 0 ]; then echo "Copying to RTAS folder..." RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm if [ -d "$RTAS" ]; then rm -r "$RTAS" fi cp -r "$original" "$RTAS" fi if [ $copyAAX -gt 0 ]; then echo "Copying to AAX folder..." if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX1" ]; then rm -r "$AAX1" fi cp -R -H "$original" "$AAX1" fi if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX2" ]; then rm -r "$AAX2" fi cp -R -H "$original" "$AAX2" fi fi "
|
||||
vst3Folder="~/SDKs/VST3 SDK">
|
||||
vst3Folder="~/SDKs/VST3 SDK" extraCompilerFlags="-std=c++11 -stdlib=libc++">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"
|
||||
isDebug="1" optimisation="1" targetName="AdlibBlaster"/>
|
||||
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"
|
||||
isDebug="0" optimisation="2" targetName="AdlibBlaster"/>
|
||||
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="10.7 SDK" osxArchitecture="64BitIntel"
|
||||
isDebug="1" optimisation="1" targetName="AdlibBlaster" cppLibType="libc++"/>
|
||||
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="10.7 SDK" osxArchitecture="64BitIntel"
|
||||
isDebug="0" optimisation="2" targetName="AdlibBlaster" cppLibType="libc++"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
<MODULEPATH id="juce_core" path="../Juce/modules"/>
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
class InstrumentLoader
|
||||
{
|
||||
public:
|
||||
virtual void loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc) = 0;
|
||||
virtual void loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc) = 0;
|
||||
virtual String getExtension() = 0;
|
||||
};
|
||||
|
|
|
@ -150,7 +150,7 @@ void PluginGui::setRecordButtonState(bool recording) {
|
|||
//[/MiscUserDefs]
|
||||
|
||||
//==============================================================================
|
||||
PluginGui::PluginGui (JuceOplvstiAudioProcessor* ownerFilter)
|
||||
PluginGui::PluginGui (AdlibBlasterAudioProcessor* ownerFilter)
|
||||
: AudioProcessorEditor (ownerFilter)
|
||||
{
|
||||
addAndMakeVisible (groupComponent = new GroupComponent ("new group",
|
||||
|
@ -1661,7 +1661,7 @@ BEGIN_JUCER_METADATA
|
|||
|
||||
<JUCER_COMPONENT documentType="Component" className="PluginGui" componentName=""
|
||||
parentClasses="public AudioProcessorEditor, public FileDragAndDropTarget, public DragAndDropContainer, public Timer"
|
||||
constructorParams="JuceOplvstiAudioProcessor* ownerFilter" variableInitialisers=" AudioProcessorEditor (ownerFilter)"
|
||||
constructorParams="AdlibBlasterAudioProcessor* ownerFilter" variableInitialisers=" AudioProcessorEditor (ownerFilter)"
|
||||
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
|
||||
fixedSize="0" initialWidth="860" initialHeight="550">
|
||||
<BACKGROUND backgroundColour="ff000000"/>
|
||||
|
|
|
@ -44,7 +44,7 @@ class PluginGui : public AudioProcessorEditor,
|
|||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
PluginGui (JuceOplvstiAudioProcessor* ownerFilter);
|
||||
PluginGui (AdlibBlasterAudioProcessor* ownerFilter);
|
||||
~PluginGui();
|
||||
|
||||
//==============================================================================
|
||||
|
@ -92,7 +92,7 @@ private:
|
|||
//[UserVariables] -- You can add your own custom variables in this section.
|
||||
static const uint32 COLOUR_MID = 0xff007f00;
|
||||
static const uint32 COLOUR_RECORDING = 0xffff0000;
|
||||
JuceOplvstiAudioProcessor* processor;
|
||||
AdlibBlasterAudioProcessor* processor;
|
||||
std::array<ScopedPointer<Label>, Hiopl::CHANNELS> channels;
|
||||
TooltipWindow tooltipWindow;
|
||||
//[/UserVariables]
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include "IntFloatParameter.h"
|
||||
#include "SbiLoader.h"
|
||||
|
||||
const char *JuceOplvstiAudioProcessor::PROGRAM_INDEX = "Program Index";
|
||||
const char *AdlibBlasterAudioProcessor::PROGRAM_INDEX = "Program Index";
|
||||
|
||||
//==============================================================================
|
||||
JuceOplvstiAudioProcessor::JuceOplvstiAudioProcessor()
|
||||
AdlibBlasterAudioProcessor::AdlibBlasterAudioProcessor()
|
||||
: i_program(-1)
|
||||
{
|
||||
// Initalize OPL
|
||||
|
@ -142,27 +142,27 @@ JuceOplvstiAudioProcessor::JuceOplvstiAudioProcessor()
|
|||
available_channels.push_back(i);
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::isThisInstanceRecording() {
|
||||
bool AdlibBlasterAudioProcessor::isThisInstanceRecording() {
|
||||
return NULL != recordingFile;
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::isAnyInstanceRecording() {
|
||||
bool AdlibBlasterAudioProcessor::isAnyInstanceRecording() {
|
||||
return dro->IsAnInstanceRecording();
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::startRecording(File *outputFile) {
|
||||
void AdlibBlasterAudioProcessor::startRecording(File *outputFile) {
|
||||
recordingFile = outputFile;
|
||||
if (!dro->StartCapture(outputFile->getFullPathName().toUTF8(), Opl)) {
|
||||
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Could not open specified file for writing!", "OK");
|
||||
}
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::stopRecording() {
|
||||
void AdlibBlasterAudioProcessor::stopRecording() {
|
||||
dro->StopCapture();
|
||||
recordingFile = NULL;
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::initPrograms()
|
||||
void AdlibBlasterAudioProcessor::initPrograms()
|
||||
{
|
||||
// these ones from the Syndicate in-game music
|
||||
const float i_params_0[] = {
|
||||
|
@ -434,7 +434,7 @@ void JuceOplvstiAudioProcessor::initPrograms()
|
|||
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::applyPitchBend()
|
||||
void AdlibBlasterAudioProcessor::applyPitchBend()
|
||||
{ // apply the currently configured pitch bend to all active notes.
|
||||
for (int i = 1; i <= Hiopl::CHANNELS; i++) {
|
||||
if (NO_NOTE != active_notes[i]) {
|
||||
|
@ -445,7 +445,7 @@ void JuceOplvstiAudioProcessor::applyPitchBend()
|
|||
}
|
||||
}
|
||||
|
||||
JuceOplvstiAudioProcessor::~JuceOplvstiAudioProcessor()
|
||||
AdlibBlasterAudioProcessor::~AdlibBlasterAudioProcessor()
|
||||
{
|
||||
for (unsigned int i=0; i < params.size(); ++i)
|
||||
delete params[i];
|
||||
|
@ -454,22 +454,22 @@ JuceOplvstiAudioProcessor::~JuceOplvstiAudioProcessor()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
const String JuceOplvstiAudioProcessor::getName() const
|
||||
const String AdlibBlasterAudioProcessor::getName() const
|
||||
{
|
||||
return JucePlugin_Name;
|
||||
}
|
||||
|
||||
int JuceOplvstiAudioProcessor::getNumParameters()
|
||||
int AdlibBlasterAudioProcessor::getNumParameters()
|
||||
{
|
||||
return (int)params.size();
|
||||
}
|
||||
|
||||
float JuceOplvstiAudioProcessor::getParameter (int index)
|
||||
float AdlibBlasterAudioProcessor::getParameter (int index)
|
||||
{
|
||||
return params[index]->getParameter();
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
|
||||
void AdlibBlasterAudioProcessor::setIntParameter (String name, int value)
|
||||
{
|
||||
int i = paramIdxByName[name];
|
||||
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
||||
|
@ -477,7 +477,7 @@ void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
|
|||
setParameter(i, p->getParameter());
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
|
||||
void AdlibBlasterAudioProcessor::setEnumParameter (String name, int index)
|
||||
{
|
||||
int i = paramIdxByName[name];
|
||||
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
||||
|
@ -485,14 +485,14 @@ void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
|
|||
setParameter(i, p->getParameter());
|
||||
}
|
||||
|
||||
int JuceOplvstiAudioProcessor::getIntParameter (String name)
|
||||
int AdlibBlasterAudioProcessor::getIntParameter (String name)
|
||||
{
|
||||
int i = paramIdxByName[name];
|
||||
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
||||
return p->getParameterValue();
|
||||
}
|
||||
|
||||
int JuceOplvstiAudioProcessor::getEnumParameter (String name)
|
||||
int AdlibBlasterAudioProcessor::getEnumParameter (String name)
|
||||
{
|
||||
int i = paramIdxByName[name];
|
||||
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
||||
|
@ -500,7 +500,7 @@ int JuceOplvstiAudioProcessor::getEnumParameter (String name)
|
|||
}
|
||||
|
||||
// Parameters which apply directly to the OPL
|
||||
void JuceOplvstiAudioProcessor::setParameter (int index, float newValue)
|
||||
void AdlibBlasterAudioProcessor::setParameter (int index, float newValue)
|
||||
{
|
||||
FloatParameter* p = params[index];
|
||||
p->setParameter(newValue);
|
||||
|
@ -548,7 +548,7 @@ void JuceOplvstiAudioProcessor::setParameter (int index, float newValue)
|
|||
}
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::loadInstrumentFromFile(String filename)
|
||||
void AdlibBlasterAudioProcessor::loadInstrumentFromFile(String filename)
|
||||
{
|
||||
FILE* f = fopen(filename.toUTF8(), "rb");
|
||||
unsigned char buf[MAX_INSTRUMENT_FILE_SIZE_BYTES];
|
||||
|
@ -560,7 +560,7 @@ void JuceOplvstiAudioProcessor::loadInstrumentFromFile(String filename)
|
|||
}
|
||||
|
||||
// Used to configure parameters from .SBI instrument file
|
||||
void JuceOplvstiAudioProcessor::setParametersByRegister(int register_base, int op, uint8 value)
|
||||
void AdlibBlasterAudioProcessor::setParametersByRegister(int register_base, int op, uint8 value)
|
||||
{
|
||||
const String operators[] = {"Modulator", "Carrier"};
|
||||
register_base &= 0xF0;
|
||||
|
@ -596,37 +596,37 @@ void JuceOplvstiAudioProcessor::setParametersByRegister(int register_base, int o
|
|||
}
|
||||
}
|
||||
|
||||
const String JuceOplvstiAudioProcessor::getParameterName (int index)
|
||||
const String AdlibBlasterAudioProcessor::getParameterName (int index)
|
||||
{
|
||||
return params[index]->getName();
|
||||
}
|
||||
|
||||
const String JuceOplvstiAudioProcessor::getParameterText (int index)
|
||||
const String AdlibBlasterAudioProcessor::getParameterText (int index)
|
||||
{
|
||||
return params[index]->getParameterText();
|
||||
}
|
||||
|
||||
const String JuceOplvstiAudioProcessor::getInputChannelName (int channelIndex) const
|
||||
const String AdlibBlasterAudioProcessor::getInputChannelName (int channelIndex) const
|
||||
{
|
||||
return String (channelIndex + 1);
|
||||
}
|
||||
|
||||
const String JuceOplvstiAudioProcessor::getOutputChannelName (int channelIndex) const
|
||||
const String AdlibBlasterAudioProcessor::getOutputChannelName (int channelIndex) const
|
||||
{
|
||||
return String (channelIndex + 1);
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::isInputChannelStereoPair (int index) const
|
||||
bool AdlibBlasterAudioProcessor::isInputChannelStereoPair (int index) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::isOutputChannelStereoPair (int index) const
|
||||
bool AdlibBlasterAudioProcessor::isOutputChannelStereoPair (int index) const
|
||||
{
|
||||
return false;
|
||||
return true; //// Jeff-Russ changed to true for AU version. for vsti make it false
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::acceptsMidi() const
|
||||
bool AdlibBlasterAudioProcessor::acceptsMidi() const
|
||||
{
|
||||
#if JucePlugin_WantsMidiInput
|
||||
return true;
|
||||
|
@ -635,7 +635,7 @@ bool JuceOplvstiAudioProcessor::acceptsMidi() const
|
|||
#endif
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::producesMidi() const
|
||||
bool AdlibBlasterAudioProcessor::producesMidi() const
|
||||
{
|
||||
#if JucePlugin_ProducesMidiOutput
|
||||
return true;
|
||||
|
@ -644,27 +644,27 @@ bool JuceOplvstiAudioProcessor::producesMidi() const
|
|||
#endif
|
||||
}
|
||||
|
||||
bool JuceOplvstiAudioProcessor::silenceInProducesSilenceOut() const
|
||||
bool AdlibBlasterAudioProcessor::silenceInProducesSilenceOut() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
double JuceOplvstiAudioProcessor::getTailLengthSeconds() const
|
||||
double AdlibBlasterAudioProcessor::getTailLengthSeconds() const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
int JuceOplvstiAudioProcessor::getNumPrograms()
|
||||
int AdlibBlasterAudioProcessor::getNumPrograms()
|
||||
{
|
||||
return (int)programs.size();
|
||||
}
|
||||
|
||||
int JuceOplvstiAudioProcessor::getCurrentProgram()
|
||||
int AdlibBlasterAudioProcessor::getCurrentProgram()
|
||||
{
|
||||
return i_program;
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::updateGuiIfPresent()
|
||||
void AdlibBlasterAudioProcessor::updateGuiIfPresent()
|
||||
{
|
||||
PluginGui* gui = (PluginGui*)getActiveEditor();
|
||||
if (gui) {
|
||||
|
@ -672,7 +672,7 @@ void JuceOplvstiAudioProcessor::updateGuiIfPresent()
|
|||
}
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
|
||||
void AdlibBlasterAudioProcessor::setCurrentProgram (int index)
|
||||
{
|
||||
if (i_program==index)
|
||||
return;
|
||||
|
@ -685,24 +685,24 @@ void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
|
|||
updateGuiIfPresent();
|
||||
}
|
||||
|
||||
const String JuceOplvstiAudioProcessor::getProgramName (int index)
|
||||
const String AdlibBlasterAudioProcessor::getProgramName (int index)
|
||||
{
|
||||
return program_order[index];
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::changeProgramName (int index, const String& newName)
|
||||
void AdlibBlasterAudioProcessor::changeProgramName (int index, const String& newName)
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void JuceOplvstiAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
|
||||
void AdlibBlasterAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
|
||||
{
|
||||
//Opl->SetSampleRate((int)sampleRate);
|
||||
// Use this method as the place to do any pre-playback
|
||||
// initialisation that you need..
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::releaseResources()
|
||||
void AdlibBlasterAudioProcessor::releaseResources()
|
||||
{
|
||||
// When playback stops, you can use this as an opportunity to free up any
|
||||
// spare memory, etc.
|
||||
|
@ -710,7 +710,7 @@ void JuceOplvstiAudioProcessor::releaseResources()
|
|||
|
||||
static const Drum DRUM_INDEX[] = { BDRUM, SNARE, TOM, CYMBAL, HIHAT };
|
||||
|
||||
void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
|
||||
void AdlibBlasterAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
|
||||
{
|
||||
buffer.clear(0, 0, buffer.getNumSamples());
|
||||
MidiBuffer::Iterator midi_buffer_iterator(midiMessages);
|
||||
|
@ -822,15 +822,20 @@ void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuf
|
|||
}
|
||||
/// Jeff-Russ: getSampleData(int) is deprecated. use getWritePointer(int)
|
||||
Opl->Generate(buffer.getNumSamples(), buffer.getWritePointer(0));
|
||||
|
||||
/// Jeff-Russ added loop to copy left channel to right channel. uncomment when building to {0,2} AU
|
||||
// const float* LChanRead = buffer.getReadPointer(0, 0);
|
||||
// float* RChanWrite = buffer.getWritePointer(1, 0);
|
||||
// for (int i = 0; i < buffer.getNumSamples(); i++) { RChanWrite[i] = LChanRead[i]; }
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool JuceOplvstiAudioProcessor::hasEditor() const
|
||||
bool AdlibBlasterAudioProcessor::hasEditor() const
|
||||
{
|
||||
return true; // (change this to false if you choose to not supply an editor)
|
||||
}
|
||||
|
||||
AudioProcessorEditor* JuceOplvstiAudioProcessor::createEditor()
|
||||
AudioProcessorEditor* AdlibBlasterAudioProcessor::createEditor()
|
||||
{
|
||||
PluginGui* gui = new PluginGui(this);
|
||||
gui->updateFromParameters();
|
||||
|
@ -848,7 +853,7 @@ Identifier stringToIdentifier(const String &s)
|
|||
return s.replaceCharacters(" ", "_");
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
|
||||
void AdlibBlasterAudioProcessor::getStateInformation(MemoryBlock& destData)
|
||||
{
|
||||
ReferenceCountedObjectPtr<DynamicObject> v(new DynamicObject);
|
||||
|
||||
|
@ -866,7 +871,7 @@ void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
|
|||
destData.copyFrom(s.getCharPointer(), 0, destData.getSize());
|
||||
}
|
||||
|
||||
void JuceOplvstiAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
||||
void AdlibBlasterAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
||||
{
|
||||
if (sizeInBytes < 1)
|
||||
return;
|
||||
|
@ -911,13 +916,13 @@ void JuceOplvstiAudioProcessor::setStateInformation (const void* data, int sizeI
|
|||
|
||||
// @param idx 1-based channel index
|
||||
// @note since this is just reading off pod, "safe" to access without a mutex by other threads such as GUI
|
||||
int JuceOplvstiAudioProcessor::isChannelActive(int idx) const
|
||||
int AdlibBlasterAudioProcessor::isChannelActive(int idx) const
|
||||
{
|
||||
return active_notes[idx] != NO_NOTE;
|
||||
}
|
||||
|
||||
// @param idx 1-based channel index
|
||||
const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
|
||||
const char* AdlibBlasterAudioProcessor::getChannelEnvelopeStage(int idx) const
|
||||
{
|
||||
return Opl->GetState(idx);
|
||||
}
|
||||
|
@ -927,5 +932,5 @@ const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
|
|||
// This creates new instances of the plugin..
|
||||
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
||||
{
|
||||
return new JuceOplvstiAudioProcessor();
|
||||
return new AdlibBlasterAudioProcessor();
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
|
||||
|
||||
//==============================================================================
|
||||
class JuceOplvstiAudioProcessor : public AudioProcessor
|
||||
class AdlibBlasterAudioProcessor : public AudioProcessor
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
JuceOplvstiAudioProcessor();
|
||||
AdlibBlasterAudioProcessor();
|
||||
void initPrograms();
|
||||
void applyPitchBend();
|
||||
~JuceOplvstiAudioProcessor();
|
||||
~AdlibBlasterAudioProcessor();
|
||||
|
||||
bool isThisInstanceRecording();
|
||||
bool isAnyInstanceRecording();
|
||||
|
@ -105,6 +105,6 @@ private:
|
|||
File *recordingFile;
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceOplvstiAudioProcessor)
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AdlibBlasterAudioProcessor)
|
||||
};
|
||||
#endif // PLUGINPROCESSOR_H_INCLUDED
|
||||
|
|
|
@ -5,7 +5,7 @@ SbiLoader::SbiLoader(void)
|
|||
{
|
||||
}
|
||||
|
||||
void SbiLoader::loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc)
|
||||
void SbiLoader::loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc)
|
||||
{
|
||||
if (0 == strncmp("SBI", (const char*)data, 3)) {
|
||||
data += 36;
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
SbiLoader(void);
|
||||
virtual ~SbiLoader(void);
|
||||
|
||||
void loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc);
|
||||
void loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc);
|
||||
String getExtension();
|
||||
};
|
||||
|
||||
|
|
3792
Source/zdopl.cpp
3792
Source/zdopl.cpp
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue