| @@ -66,6 +66,8 @@ package.files = { matchfiles ( | |||
| "../../src/juce_appframework/audio/dsp/*.h", | |||
| "../../src/juce_appframework/audio/midi/*.cpp", | |||
| "../../src/juce_appframework/audio/midi/*.h", | |||
| "../../src/juce_appframework/audio/processors/*.cpp", | |||
| "../../src/juce_appframework/audio/processors/*.h", | |||
| "../../src/juce_appframework/audio/audio_file_formats/*.cpp", | |||
| "../../src/juce_appframework/audio/audio_file_formats/*.h", | |||
| "../../src/juce_appframework/audio/audio_file_formats/flac/libFLAC/*.c", | |||
| @@ -527,6 +527,14 @@ | |||
| 84A48BEB08A22E4B00752A2B /* juce_TimeSliceThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A48A2508A22E4A00752A2B /* juce_TimeSliceThread.cpp */; }; | |||
| 84A48BEC08A22E4B00752A2B /* juce_TimeSliceThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A48A2608A22E4A00752A2B /* juce_TimeSliceThread.h */; }; | |||
| 84A48BED08A22E4B00752A2B /* juce_WaitableEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A48A2708A22E4A00752A2B /* juce_WaitableEvent.h */; }; | |||
| 84BC4E290C8DD38C00FA249B /* juce_AudioPlayHead.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E210C8DD38C00FA249B /* juce_AudioPlayHead.h */; }; | |||
| 84BC4E2A0C8DD38C00FA249B /* juce_AudioProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */; }; | |||
| 84BC4E2B0C8DD38C00FA249B /* juce_AudioProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E230C8DD38C00FA249B /* juce_AudioProcessor.h */; }; | |||
| 84BC4E2C0C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BC4E240C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp */; }; | |||
| 84BC4E2D0C8DD38C00FA249B /* juce_AudioProcessorEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E250C8DD38C00FA249B /* juce_AudioProcessorEditor.h */; }; | |||
| 84BC4E2E0C8DD38C00FA249B /* juce_AudioProcessorListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */; }; | |||
| 84BC4E2F0C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */; }; | |||
| 84BC4E300C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */; }; | |||
| 84C0EA5E0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C0EA5C0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp */; }; | |||
| 84C0EA5F0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C0EA5D0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h */; }; | |||
| 84D296BD09B763190026C535 /* juce_PropertiesFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D296BB09B763190026C535 /* juce_PropertiesFile.cpp */; }; | |||
| @@ -1174,6 +1182,14 @@ | |||
| 84A48A2508A22E4A00752A2B /* juce_TimeSliceThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_TimeSliceThread.cpp; path = ../../src/juce_core/threads/juce_TimeSliceThread.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84A48A2608A22E4A00752A2B /* juce_TimeSliceThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_TimeSliceThread.h; path = ../../src/juce_core/threads/juce_TimeSliceThread.h; sourceTree = SOURCE_ROOT; }; | |||
| 84A48A2708A22E4A00752A2B /* juce_WaitableEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_WaitableEvent.h; path = ../../src/juce_core/threads/juce_WaitableEvent.h; sourceTree = SOURCE_ROOT; }; | |||
| 84BC4E210C8DD38C00FA249B /* juce_AudioPlayHead.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioPlayHead.h; sourceTree = "<group>"; }; | |||
| 84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessor.cpp; sourceTree = "<group>"; }; | |||
| 84BC4E230C8DD38C00FA249B /* juce_AudioProcessor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessor.h; sourceTree = "<group>"; }; | |||
| 84BC4E240C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessorEditor.cpp; sourceTree = "<group>"; }; | |||
| 84BC4E250C8DD38C00FA249B /* juce_AudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorEditor.h; sourceTree = "<group>"; }; | |||
| 84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorListener.h; sourceTree = "<group>"; }; | |||
| 84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_GenericAudioProcessorEditor.cpp; sourceTree = "<group>"; }; | |||
| 84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_GenericAudioProcessorEditor.h; sourceTree = "<group>"; }; | |||
| 84C0EA5C0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_IIRFilterAudioSource.cpp; path = ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84C0EA5D0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_IIRFilterAudioSource.h; path = ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.h; sourceTree = SOURCE_ROOT; }; | |||
| 84D296BB09B763190026C535 /* juce_PropertiesFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_PropertiesFile.cpp; sourceTree = "<group>"; }; | |||
| @@ -1479,6 +1495,7 @@ | |||
| 84A4883B08A22E4900752A2B /* audio */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84BC4E200C8DD38C00FA249B /* processors */, | |||
| 84A4883C08A22E4900752A2B /* audio_file_formats */, | |||
| 84A4884908A22E4900752A2B /* audio_sources */, | |||
| 84198B08096D8E2B0022A439 /* devices */, | |||
| @@ -2329,6 +2346,21 @@ | |||
| path = ../../src/juce_core/threads; | |||
| sourceTree = SOURCE_ROOT; | |||
| }; | |||
| 84BC4E200C8DD38C00FA249B /* processors */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84BC4E210C8DD38C00FA249B /* juce_AudioPlayHead.h */, | |||
| 84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */, | |||
| 84BC4E230C8DD38C00FA249B /* juce_AudioProcessor.h */, | |||
| 84BC4E240C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp */, | |||
| 84BC4E250C8DD38C00FA249B /* juce_AudioProcessorEditor.h */, | |||
| 84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */, | |||
| 84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */, | |||
| 84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */, | |||
| ); | |||
| path = processors; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 84F690DC0B3444A500ABAE1C /* flac */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| @@ -2729,6 +2761,11 @@ | |||
| 847F72DC0C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.h in Headers */, | |||
| 847F72DE0C2702A000CBECEC /* juce_FileTreeComponent.h in Headers */, | |||
| 84FFAF2C0C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.h in Headers */, | |||
| 84BC4E290C8DD38C00FA249B /* juce_AudioPlayHead.h in Headers */, | |||
| 84BC4E2B0C8DD38C00FA249B /* juce_AudioProcessor.h in Headers */, | |||
| 84BC4E2D0C8DD38C00FA249B /* juce_AudioProcessorEditor.h in Headers */, | |||
| 84BC4E2E0C8DD38C00FA249B /* juce_AudioProcessorListener.h in Headers */, | |||
| 84BC4E300C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h in Headers */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -3126,6 +3163,9 @@ | |||
| 847F72DD0C2702A000CBECEC /* juce_FileTreeComponent.cpp in Sources */, | |||
| 8406AA5A0C4BDF90003A0D6A /* juce_MidiOutput.cpp in Sources */, | |||
| 84FFAF2B0C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.cpp in Sources */, | |||
| 84BC4E2A0C8DD38C00FA249B /* juce_AudioProcessor.cpp in Sources */, | |||
| 84BC4E2C0C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp in Sources */, | |||
| 84BC4E2F0C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp in Sources */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -1166,6 +1166,42 @@ | |||
| > | |||
| </File> | |||
| </Filter> | |||
| <Filter | |||
| Name="processors" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioPlayHead.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioProcessor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioProcessor.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioProcessorEditor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioProcessorEditor.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_AudioProcessorListener.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_GenericAudioProcessorEditor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\src\juce_appframework\audio\processors\juce_GenericAudioProcessorEditor.h" | |||
| > | |||
| </File> | |||
| </Filter> | |||
| </Filter> | |||
| <Filter | |||
| Name="events" | |||
| @@ -7,10 +7,11 @@ | |||
| Changelist for version 1.45 | |||
| - big new project in the "extras" folder - a basic audio plugin host! Currently it loads VSTs on PC/Mac, and lets you put them together in a filter graph, which it plays. Hosting functionality is very basic at the moment, but I'm laying down a good architecture to hopefully develop into a full cross-platform plugin host. | |||
| - audio plugins: I've simplified the processBlock() call in AudioFilterBase. It now just takes a single buffer for all input and output channels, and the accumulate parameter has gone. This will mean tweaking your plugin code, but will probably make it much less complicated. | |||
| - audio plugins: AudioFilterBase now requires a few extra methods to be implemented by your plugin: getInputChannelName, getOutputChannelName, isInputChannelStereoPair, isOutputChannelStereoPair, getLatencySamples (which supersedes the old macro for setting the latency) | |||
| - audio plugins: new method AudioFilterBase::updateHostDisplay() to tell the host that something about your plugin has changed and that it should refresh its display. | |||
| - audio plugins: new methods AudioFilterBase::beginParameterChangeGesture() and endParameterChangeGesture() let you tell the host when a parameter-change action starts and finishes. | |||
| - audio plugins: The AudioFilterBase and AudioFilterEditor classes have moved into the main juce tree, and been renamed as AudioProcessor and AudioProcessorEditor. This means you can remove these files from your plugin projects, and should search-and-replace any instances of the old names with the new ones. | |||
| - audio plugins: the processBlock() call in AudioFilterBase has been simplified in AudioProcessor. It now just takes a single buffer for all input and output channels, and the accumulate parameter has gone. This will mean tweaking your plugin code, but will probably make it much less complicated. | |||
| - audio plugins: AudioProcessor requires a few more methods to be implemented by your plugin than AudioFilterBase did: getInputChannelName, getOutputChannelName, isInputChannelStereoPair, isOutputChannelStereoPair, getLatencySamples (which supersedes the old macro for setting the latency). These are all quite simple to add. | |||
| - audio plugins: new methods AudioProcessor::beginParameterChangeGesture() and endParameterChangeGesture() let you tell the host when a parameter-change action starts and finishes. | |||
| - audio plugins: new method AudioProcessor::updateHostDisplay() to tell the host that something about your plugin has changed and that it should refresh its display. | |||
| - new class: FileSearchPathListComponent, for letting the user edit a FileSearchPath. | |||
| - added a critical section option to ReferenceCountedArray | |||
| - refactored and added features to the Socket class, replacing it with StreamableSocket (basically the same as the original class), and DatagramSocket. | |||
| @@ -7,7 +7,6 @@ | |||
| objects = { | |||
| /* Begin PBXBuildFile section */ | |||
| 84E5BB970C7203B70088E799 /* juce_GenericAudioFilterEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E5BB950C7203B70088E799 /* juce_GenericAudioFilterEditor.cpp */; }; | |||
| 84FFAEAC0C6C8A6F009F6E72 /* FilterGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FFAE920C6C8A6F009F6E72 /* FilterGraph.cpp */; }; | |||
| 84FFAEAD0C6C8A6F009F6E72 /* GraphEditorPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FFAE940C6C8A6F009F6E72 /* GraphEditorPanel.cpp */; }; | |||
| 84FFAEAE0C6C8A6F009F6E72 /* InternalFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FFAE960C6C8A6F009F6E72 /* InternalFilters.cpp */; }; | |||
| @@ -44,8 +43,6 @@ | |||
| 4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; | |||
| 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; | |||
| 508344B209E5C41E0093A071 /* Juce Plugin Host.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = "Juce Plugin Host.app"; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| 84E5BB950C7203B70088E799 /* juce_GenericAudioFilterEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_GenericAudioFilterEditor.cpp; sourceTree = "<group>"; }; | |||
| 84E5BB960C7203B70088E799 /* juce_GenericAudioFilterEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_GenericAudioFilterEditor.h; sourceTree = "<group>"; }; | |||
| 84FFAE920C6C8A6F009F6E72 /* FilterGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = FilterGraph.cpp; path = ../../src/host/FilterGraph.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84FFAE930C6C8A6F009F6E72 /* FilterGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FilterGraph.h; path = ../../src/host/FilterGraph.h; sourceTree = SOURCE_ROOT; }; | |||
| 84FFAE940C6C8A6F009F6E72 /* GraphEditorPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GraphEditorPanel.cpp; path = ../../src/host/GraphEditorPanel.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -174,8 +171,6 @@ | |||
| 84FFAE9D0C6C8A6F009F6E72 /* juce_AudioPluginFormat.h */, | |||
| 84FFAE9E0C6C8A6F009F6E72 /* juce_AudioPluginInstance.cpp */, | |||
| 84FFAE9F0C6C8A6F009F6E72 /* juce_AudioPluginInstance.h */, | |||
| 84E5BB950C7203B70088E799 /* juce_GenericAudioFilterEditor.cpp */, | |||
| 84E5BB960C7203B70088E799 /* juce_GenericAudioFilterEditor.h */, | |||
| 84FFAEA00C6C8A6F009F6E72 /* juce_KnownPluginList.cpp */, | |||
| 84FFAEA10C6C8A6F009F6E72 /* juce_KnownPluginList.h */, | |||
| 84FFAEA20C6C8A6F009F6E72 /* juce_PluginDescription.cpp */, | |||
| @@ -287,7 +282,6 @@ | |||
| 84FFAEB50C6C8A6F009F6E72 /* juce_PluginDirectoryScanner.cpp in Sources */, | |||
| 84FFAEB60C6C8A6F009F6E72 /* juce_PluginListComponent.cpp in Sources */, | |||
| 84FFAEB70C6C8A6F009F6E72 /* juce_VSTPluginInstance.cpp in Sources */, | |||
| 84E5BB970C7203B70088E799 /* juce_GenericAudioFilterEditor.cpp in Sources */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -233,14 +233,6 @@ | |||
| RelativePath="..\..\src\plugins\juce_AudioPluginInstance.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\src\plugins\juce_GenericAudioFilterEditor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\src\plugins\juce_GenericAudioFilterEditor.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\src\plugins\juce_KnownPluginList.cpp" | |||
| > | |||
| @@ -1,110 +1,110 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../juce.h" | |||
| #include "host/MainHostWindow.h" | |||
| #include "host/InternalFilters.h" | |||
| ApplicationCommandManager* commandManager = 0; | |||
| //============================================================================== | |||
| class PluginHostApp : public JUCEApplication | |||
| { | |||
| MainHostWindow* mainWindow; | |||
| public: | |||
| //============================================================================== | |||
| PluginHostApp() | |||
| : mainWindow (0) | |||
| { | |||
| } | |||
| ~PluginHostApp() | |||
| { | |||
| } | |||
| void initialise (const String& /*commandLine*/) | |||
| { | |||
| // initialise our settings file.. | |||
| ApplicationProperties::getInstance() | |||
| ->setStorageParameters (T("Juce Audio Plugin Host"), | |||
| T("settings"), String::empty, 1000, | |||
| PropertiesFile::storeAsXML); | |||
| commandManager = new ApplicationCommandManager(); | |||
| AudioPluginFormatManager::getInstance()->addDefaultFormats(); | |||
| AudioPluginFormatManager::getInstance()->addFormat (new InternalPluginFormat()); | |||
| mainWindow = new MainHostWindow(); | |||
| commandManager->registerAllCommandsForTarget (this); | |||
| commandManager->registerAllCommandsForTarget (mainWindow); | |||
| } | |||
| void shutdown() | |||
| { | |||
| deleteAndZero (mainWindow); | |||
| ApplicationProperties::getInstance()->closeFiles(); | |||
| deleteAndZero (commandManager); | |||
| } | |||
| const String getApplicationName() | |||
| { | |||
| return T("Juce Plug-In Host"); | |||
| } | |||
| const String getApplicationVersion() | |||
| { | |||
| return T("0.9"); | |||
| } | |||
| void systemRequestedQuit() | |||
| { | |||
| if (mainWindow->isValidComponent()) | |||
| mainWindow->tryToQuitApplication(); | |||
| else | |||
| JUCEApplication::quit(); | |||
| } | |||
| bool moreThanOneInstanceAllowed() | |||
| { | |||
| return true; | |||
| } | |||
| }; | |||
| // This kicks the whole thing off.. | |||
| START_JUCE_APPLICATION (PluginHostApp) | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../juce.h" | |||
| #include "host/MainHostWindow.h" | |||
| #include "host/InternalFilters.h" | |||
| ApplicationCommandManager* commandManager = 0; | |||
| //============================================================================== | |||
| class PluginHostApp : public JUCEApplication | |||
| { | |||
| MainHostWindow* mainWindow; | |||
| public: | |||
| //============================================================================== | |||
| PluginHostApp() | |||
| : mainWindow (0) | |||
| { | |||
| } | |||
| ~PluginHostApp() | |||
| { | |||
| } | |||
| void initialise (const String& /*commandLine*/) | |||
| { | |||
| // initialise our settings file.. | |||
| ApplicationProperties::getInstance() | |||
| ->setStorageParameters (T("Juce Audio Plugin Host"), | |||
| T("settings"), String::empty, 1000, | |||
| PropertiesFile::storeAsXML); | |||
| commandManager = new ApplicationCommandManager(); | |||
| AudioPluginFormatManager::getInstance()->addDefaultFormats(); | |||
| AudioPluginFormatManager::getInstance()->addFormat (new InternalPluginFormat()); | |||
| mainWindow = new MainHostWindow(); | |||
| commandManager->registerAllCommandsForTarget (this); | |||
| commandManager->registerAllCommandsForTarget (mainWindow); | |||
| } | |||
| void shutdown() | |||
| { | |||
| deleteAndZero (mainWindow); | |||
| ApplicationProperties::getInstance()->closeFiles(); | |||
| deleteAndZero (commandManager); | |||
| } | |||
| const String getApplicationName() | |||
| { | |||
| return T("Juce Plug-In Host"); | |||
| } | |||
| const String getApplicationVersion() | |||
| { | |||
| return T("0.9"); | |||
| } | |||
| void systemRequestedQuit() | |||
| { | |||
| if (mainWindow->isValidComponent()) | |||
| mainWindow->tryToQuitApplication(); | |||
| else | |||
| JUCEApplication::quit(); | |||
| } | |||
| bool moreThanOneInstanceAllowed() | |||
| { | |||
| return true; | |||
| } | |||
| }; | |||
| // This kicks the whole thing off.. | |||
| START_JUCE_APPLICATION (PluginHostApp) | |||
| @@ -29,9 +29,9 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../../juce.h" | |||
| #include "FilterGraph.h" | |||
| #include "InternalFilters.h" | |||
| #include "../plugins/juce_GenericAudioFilterEditor.h" | |||
| //============================================================================== | |||
| @@ -146,7 +146,7 @@ void FilterInGraph::showUI (bool useGenericUI) | |||
| { | |||
| if (activeGenericUI == 0) | |||
| { | |||
| Component* ui = new GenericAudioFilterEditor (filter); | |||
| Component* ui = new GenericAudioProcessorEditor (filter); | |||
| ui->setName (filter->getName()); | |||
| activeGenericUI = new PluginWindow (ui, *this); | |||
| @@ -225,7 +225,7 @@ XmlElement* FilterInGraph::createXml() const | |||
| XmlElement* state = new XmlElement ("STATE"); | |||
| juce::MemoryBlock m; | |||
| MemoryBlock m; | |||
| filter->getStateInformation (m); | |||
| state->addTextElement (m.toBase64Encoding()); | |||
| e->addChildElement (state); | |||
| @@ -233,7 +233,7 @@ XmlElement* FilterInGraph::createXml() const | |||
| return e; | |||
| } | |||
| FilterInGraph* FilterInGraph::createForDescription (FilterGraph& owner, | |||
| FilterInGraph* FilterInGraph::createForDescription (FilterGraph& owner, | |||
| const PluginDescription& desc, | |||
| String& errorMessage) | |||
| { | |||
| @@ -265,7 +265,7 @@ FilterInGraph* FilterInGraph::createFromXml (FilterGraph& owner, const XmlElemen | |||
| if (state != 0) | |||
| { | |||
| juce::MemoryBlock m; | |||
| MemoryBlock m; | |||
| m.fromBase64Encoding (state->getAllSubText()); | |||
| c->filter->setStateInformation (m.getData(), m.getSize()); | |||
| @@ -411,7 +411,7 @@ void FilterGraph::addFilter (const PluginDescription* desc, double x, double y) | |||
| } | |||
| else | |||
| { | |||
| AlertWindow::showMessageBox (AlertWindow::WarningIcon, | |||
| AlertWindow::showMessageBox (AlertWindow::WarningIcon, | |||
| TRANS("Couldn't create filter"), | |||
| errorMessage); | |||
| } | |||
| @@ -95,7 +95,7 @@ public: | |||
| XmlElement* createXml() const; | |||
| static FilterInGraph* createForDescription (FilterGraph& owner, | |||
| static FilterInGraph* createForDescription (FilterGraph& owner, | |||
| const PluginDescription& desc, | |||
| String& errorMessage); | |||
| @@ -131,7 +131,7 @@ private: | |||
| class FilterComponent : public Component | |||
| { | |||
| public: | |||
| FilterComponent (FilterGraph& graph_, | |||
| FilterComponent (FilterGraph& graph_, | |||
| const uint32 filterID_) | |||
| : graph (graph_), | |||
| filterID (filterID_), | |||
| @@ -615,7 +615,7 @@ private: | |||
| distanceFromStart = juce_hypot (x - (x1 - getX()), y - (y1 - getY())); | |||
| distanceFromEnd = juce_hypot (x - (x2 - getX()), y - (y2 - getY())); | |||
| } | |||
| ConnectorComponent (const ConnectorComponent&); | |||
| const ConnectorComponent& operator= (const ConnectorComponent&); | |||
| }; | |||
| @@ -707,7 +707,7 @@ PinComponent* GraphEditorPanel::findPinAt (const int x, const int y) const | |||
| if (fc != 0) | |||
| { | |||
| PinComponent* const pin | |||
| = dynamic_cast <PinComponent*> (fc->getComponentAt (x - fc->getX(), | |||
| = dynamic_cast <PinComponent*> (fc->getComponentAt (x - fc->getX(), | |||
| y - fc->getY())); | |||
| if (pin != 0) | |||
| @@ -893,7 +893,7 @@ void GraphEditorPanel::endDraggingConnector (const MouseEvent& e) | |||
| //============================================================================== | |||
| class TooltipBar : public Component, | |||
| class TooltipBar : public Component, | |||
| private Timer | |||
| { | |||
| public: | |||
| @@ -944,7 +944,7 @@ GraphDocumentComponent::GraphDocumentComponent (AudioDeviceManager* deviceManage | |||
| graphPlayer = new FilterGraphPlayer (graph); | |||
| addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (graphPlayer->keyState, | |||
| addAndMakeVisible (keyboardComp = new MidiKeyboardComponent (graphPlayer->keyState, | |||
| MidiKeyboardComponent::horizontalKeyboard)); | |||
| addAndMakeVisible (statusBar = new TooltipBar()); | |||
| @@ -29,9 +29,11 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../../juce.h" | |||
| #include "InternalFilters.h" | |||
| #include "FilterGraph.h" | |||
| //============================================================================== | |||
| class InternalFilterBase : public AudioPluginInstance, | |||
| public FilterGraphPlayer::PlayerAwareFilter | |||
| @@ -52,27 +54,27 @@ public: | |||
| playerChanged(); | |||
| } | |||
| virtual void playerChanged() {} | |||
| const String getManufacturer() const { return "Raw Material Software"; } | |||
| const String getFormatName() const { return "Internal"; } | |||
| const File getFile() const { return File::nonexistent; } | |||
| int getUID() const { return getName().hashCode(); } | |||
| int getSamplesLatency() const { return 0; } | |||
| AudioFilterEditor* JUCE_CALLTYPE createEditor() { return 0; } | |||
| int JUCE_CALLTYPE getNumParameters() { return 0; } | |||
| const String JUCE_CALLTYPE getParameterName (int) { return String::empty; } | |||
| float JUCE_CALLTYPE getParameter (int) { return 0; } | |||
| const String JUCE_CALLTYPE getParameterText (int) { return String::empty; } | |||
| void JUCE_CALLTYPE setParameter (int, float) {} | |||
| int JUCE_CALLTYPE getNumPrograms() { return 0; } | |||
| int JUCE_CALLTYPE getCurrentProgram() { return 0; } | |||
| void JUCE_CALLTYPE setCurrentProgram (int) {} | |||
| const String JUCE_CALLTYPE getProgramName (int) { return String::empty; } | |||
| void JUCE_CALLTYPE changeProgramName (int, const String&) {} | |||
| void JUCE_CALLTYPE getStateInformation (JUCE_NAMESPACE::MemoryBlock&) {} | |||
| void JUCE_CALLTYPE setStateInformation (const void*, int) {} | |||
| virtual void playerChanged() {} | |||
| const String getManufacturer() const { return "Raw Material Software"; } | |||
| const String getFormatName() const { return "Internal"; } | |||
| const File getFile() const { return File::nonexistent; } | |||
| int getUID() const { return getName().hashCode(); } | |||
| int getSamplesLatency() const { return 0; } | |||
| AudioProcessorEditor* createEditor() { return 0; } | |||
| int getNumParameters() { return 0; } | |||
| const String getParameterName (int) { return String::empty; } | |||
| float getParameter (int) { return 0; } | |||
| const String getParameterText (int) { return String::empty; } | |||
| void setParameter (int, float) {} | |||
| int getNumPrograms() { return 0; } | |||
| int getCurrentProgram() { return 0; } | |||
| void setCurrentProgram (int) {} | |||
| const String getProgramName (int) { return String::empty; } | |||
| void changeProgramName (int, const String&) {} | |||
| void getStateInformation (MemoryBlock&) {} | |||
| void setStateInformation (const void*, int) {} | |||
| protected: | |||
| FilterGraphPlayer* player; | |||
| @@ -118,17 +120,16 @@ public: | |||
| setPlayConfigDetails (0, dev->getActiveInputChannels().countNumberOfSetBits(), getSampleRate(), getBlockSize()); | |||
| } | |||
| void JUCE_CALLTYPE prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| void prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| { | |||
| playerChanged(); | |||
| } | |||
| void JUCE_CALLTYPE releaseResources() | |||
| void releaseResources() | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer&) | |||
| void processBlock (AudioSampleBuffer& buffer, MidiBuffer&) | |||
| { | |||
| int n = 0; | |||
| @@ -145,12 +146,12 @@ public: | |||
| } | |||
| } | |||
| const String JUCE_CALLTYPE getInputChannelName (const int channelIndex) const | |||
| const String getInputChannelName (const int channelIndex) const | |||
| { | |||
| return String (channelIndex + 1); | |||
| } | |||
| const String JUCE_CALLTYPE getOutputChannelName (const int channelIndex) const | |||
| const String getOutputChannelName (const int channelIndex) const | |||
| { | |||
| AudioIODevice* const dev = getAudioDevice(); | |||
| @@ -160,12 +161,12 @@ public: | |||
| return "Input Channel " + String (channelIndex + 1); | |||
| } | |||
| bool JUCE_CALLTYPE isInputChannelStereoPair (int) const | |||
| bool isInputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| bool JUCE_CALLTYPE isOutputChannelStereoPair (int) const | |||
| bool isOutputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| @@ -198,17 +199,16 @@ public: | |||
| setPlayConfigDetails (dev->getActiveOutputChannels().countNumberOfSetBits(), 0, getSampleRate(), getBlockSize()); | |||
| } | |||
| void JUCE_CALLTYPE prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| void prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| { | |||
| playerChanged(); | |||
| } | |||
| void JUCE_CALLTYPE releaseResources() | |||
| void releaseResources() | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer&) | |||
| void processBlock (AudioSampleBuffer& buffer, MidiBuffer&) | |||
| { | |||
| int n = 0; | |||
| @@ -224,7 +224,7 @@ public: | |||
| } | |||
| else | |||
| { | |||
| memcpy (dst, buffer.getSampleData (n), | |||
| memcpy (dst, buffer.getSampleData (n), | |||
| sizeof (float) * buffer.getNumSamples()); | |||
| } | |||
| @@ -233,7 +233,7 @@ public: | |||
| } | |||
| } | |||
| const String JUCE_CALLTYPE getInputChannelName (const int channelIndex) const | |||
| const String getInputChannelName (const int channelIndex) const | |||
| { | |||
| AudioIODevice* const dev = getAudioDevice(); | |||
| @@ -243,17 +243,17 @@ public: | |||
| return "Output Channel " + String (channelIndex + 1); | |||
| } | |||
| const String JUCE_CALLTYPE getOutputChannelName (const int channelIndex) const | |||
| const String getOutputChannelName (const int channelIndex) const | |||
| { | |||
| return String (channelIndex + 1); | |||
| } | |||
| bool JUCE_CALLTYPE isInputChannelStereoPair (int) const | |||
| bool isInputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| bool JUCE_CALLTYPE isOutputChannelStereoPair (int) const | |||
| bool isOutputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| @@ -283,32 +283,32 @@ public: | |||
| { | |||
| AudioDeviceManager* const dm = player->getAudioDeviceManager(); | |||
| (void) dm; | |||
| jassert (dm != 0); | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| void prepareToPlay (double /*sampleRate*/, int /*estimatedSamplesPerBlock*/) | |||
| { | |||
| playerChanged(); | |||
| } | |||
| void JUCE_CALLTYPE releaseResources() | |||
| void releaseResources() | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiBuffer) | |||
| void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiBuffer) | |||
| { | |||
| midiBuffer.clear(); | |||
| midiBuffer.addEvents (player->incomingMidi, 0, buffer.getNumSamples(), 0); | |||
| } | |||
| const String JUCE_CALLTYPE getInputChannelName (const int channelIndex) const | |||
| const String getInputChannelName (const int channelIndex) const | |||
| { | |||
| return String (channelIndex + 1); | |||
| } | |||
| const String JUCE_CALLTYPE getOutputChannelName (const int channelIndex) const | |||
| const String getOutputChannelName (const int channelIndex) const | |||
| { | |||
| AudioIODevice* const dev = getAudioDevice(); | |||
| @@ -318,12 +318,12 @@ public: | |||
| return "Midi Input"; | |||
| } | |||
| bool JUCE_CALLTYPE isInputChannelStereoPair (int) const | |||
| bool isInputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| bool JUCE_CALLTYPE isOutputChannelStereoPair (int) const | |||
| bool isOutputChannelStereoPair (int) const | |||
| { | |||
| return true; | |||
| } | |||
| @@ -36,7 +36,7 @@ | |||
| #include "../plugins/juce_AudioPluginFormat.h" | |||
| //============================================================================== | |||
| /** | |||
| /** | |||
| Manages the internal plugin types. | |||
| */ | |||
| class InternalPluginFormat : public AudioPluginFormat | |||
| @@ -154,7 +154,7 @@ void MainHostWindow::closeButtonPressed() | |||
| bool MainHostWindow::tryToQuitApplication() | |||
| { | |||
| if (getGraphEditor() != 0 | |||
| if (getGraphEditor() != 0 | |||
| && getGraphEditor()->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk) | |||
| { | |||
| JUCEApplication::quit(); | |||
| @@ -31,151 +31,15 @@ | |||
| #define JUCE_PLUGIN_HOST 1 | |||
| //============================================================================== | |||
| // (Just a quick way of getting these files into the project) | |||
| #include "../../../audio plugins/wrapper/juce_AudioFilterBase.cpp" | |||
| #include "../../../audio plugins/wrapper/juce_AudioFilterEditor.cpp" | |||
| #include "../../../../juce.h" | |||
| #include "juce_AudioPluginInstance.h" | |||
| //============================================================================== | |||
| AudioPluginInstance::AudioPluginInstance() | |||
| { | |||
| internalAsyncUpdater = new InternalAsyncUpdater (*this); | |||
| setHostCallbacks (this); | |||
| } | |||
| AudioPluginInstance::~AudioPluginInstance() | |||
| { | |||
| delete internalAsyncUpdater; | |||
| } | |||
| void AudioPluginInstance::addListener (AudioPluginParameterListener* const newListener) throw() | |||
| { | |||
| listeners.addIfNotAlreadyThere (newListener); | |||
| } | |||
| void AudioPluginInstance::removeListener (AudioPluginParameterListener* const listenerToRemove) throw() | |||
| { | |||
| listeners.removeValue (listenerToRemove); | |||
| } | |||
| void AudioPluginInstance::internalAsyncCallback() | |||
| { | |||
| changedParamLock.enter(); | |||
| Array <int> changed; | |||
| changed.swapWithArray (changedParams); | |||
| Array <float> changedValues; | |||
| changedValues.swapWithArray (changedParamValues); | |||
| changedParamLock.exit(); | |||
| for (int j = 0; j < changed.size(); ++j) | |||
| { | |||
| const int paramIndex = changed.getUnchecked (j); | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| AudioPluginParameterListener* const l = (AudioPluginParameterListener*) listeners.getUnchecked(i); | |||
| if (paramIndex >= 0) | |||
| l->audioPluginParameterChanged (this, paramIndex, changedValues.getUnchecked(j)); | |||
| else if (paramIndex == -1) | |||
| l->audioPluginChanged (this); | |||
| else if ((paramIndex & 0xc0000000) == 0xc0000000) | |||
| l->audioPluginParameterChangeGestureBegin (this, paramIndex & 0x3fffffff); | |||
| else if ((paramIndex & 0xc0000000) == 0x80000000) | |||
| l->audioPluginParameterChangeGestureEnd (this, paramIndex & 0x3fffffff); | |||
| i = jmin (i, listeners.size()); | |||
| } | |||
| } | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE AudioPluginInstance::getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info) | |||
| { | |||
| info.bpm = 120.0; | |||
| info.timeSigNumerator = 4; | |||
| info.timeSigDenominator = 4; | |||
| info.timeInSeconds = 0; | |||
| /** For timecode, the position of the start of the edit, in seconds from 00:00:00:00. */ | |||
| info.editOriginTime = 0; | |||
| /** The current play position in pulses-per-quarter-note. | |||
| This is the number of quarter notes since the edit start. | |||
| */ | |||
| info.ppqPosition = 0; | |||
| /** The position of the start of the last bar, in pulses-per-quarter-note. | |||
| This is the number of quarter notes from the start of the edit to the | |||
| start of the current bar. | |||
| Note - this value may be unavailable on some hosts, e.g. Pro-Tools. If | |||
| it's not available, the value will be 0. | |||
| */ | |||
| info.ppqPositionOfLastBarStart = 0; | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fpsUnknown; | |||
| info.isPlaying = false; | |||
| info.isRecording = false; | |||
| return true; | |||
| } | |||
| void JUCE_CALLTYPE AudioPluginInstance::informHostOfParameterChange (int index, float newValue) | |||
| { | |||
| queueChangeMessage (index, newValue); | |||
| } | |||
| void JUCE_CALLTYPE AudioPluginInstance::informHostOfParameterGestureBegin (int index) | |||
| { | |||
| queueChangeMessage (0xc0000000 | index, 0); | |||
| } | |||
| void JUCE_CALLTYPE AudioPluginInstance::informHostOfParameterGestureEnd (int index) | |||
| { | |||
| queueChangeMessage (0x80000000 | index, 0); | |||
| } | |||
| void JUCE_CALLTYPE AudioPluginInstance::informHostOfStateChange() | |||
| { | |||
| queueChangeMessage (-1, 0); | |||
| } | |||
| void AudioPluginInstance::queueChangeMessage (const int index, const float value) throw() | |||
| { | |||
| const ScopedLock sl (changedParamLock); | |||
| changedParams.add (index); | |||
| changedParamValues.add (value); | |||
| if (! internalAsyncUpdater->isTimerRunning()) | |||
| internalAsyncUpdater->startTimer (1); | |||
| } | |||
| //============================================================================== | |||
| AudioPluginInstance::InternalAsyncUpdater::InternalAsyncUpdater (AudioPluginInstance& owner_) | |||
| : owner (owner_) | |||
| { | |||
| } | |||
| void AudioPluginInstance::InternalAsyncUpdater::timerCallback() | |||
| { | |||
| stopTimer(); | |||
| owner.internalAsyncCallback(); | |||
| } | |||
| //============================================================================== | |||
| void AudioPluginParameterListener::audioPluginParameterChangeGestureBegin (AudioPluginInstance*, int) | |||
| { | |||
| } | |||
| void AudioPluginParameterListener::audioPluginParameterChangeGestureEnd (AudioPluginInstance*, int) | |||
| { | |||
| } | |||
| @@ -32,63 +32,17 @@ | |||
| #ifndef __JUCE_AUDIOPLUGININSTANCE_JUCEHEADER__ | |||
| #define __JUCE_AUDIOPLUGININSTANCE_JUCEHEADER__ | |||
| #include "../../../audio plugins/wrapper/juce_AudioFilterBase.h" | |||
| class AudioPluginInstance; | |||
| //============================================================================== | |||
| class AudioPluginParameterListener | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| /** Destructor. */ | |||
| virtual ~AudioPluginParameterListener() {} | |||
| //============================================================================== | |||
| /** Receives a callback when a parameter is changed. */ | |||
| virtual void audioPluginParameterChanged (AudioPluginInstance* plugin, | |||
| int parameterIndex, | |||
| float newValue) = 0; | |||
| /** Called to indicate that something else in the plugin has changed, like its | |||
| program, number of parameters, etc. | |||
| */ | |||
| virtual void audioPluginChanged (AudioPluginInstance* plugin) = 0; | |||
| /** Indicates that a parameter change gesture has started. | |||
| E.g. if the user is dragging a slider, this would be called when they first | |||
| press the mouse button, and audioPluginParameterChangeGestureEnd would be | |||
| called when they release it. | |||
| @see audioPluginParameterChangeGestureEnd | |||
| */ | |||
| virtual void audioPluginParameterChangeGestureBegin (AudioPluginInstance* plugin, | |||
| int parameterIndex); | |||
| /** Indicates that a parameter change gesture has finished. | |||
| E.g. if the user is dragging a slider, this would be called when they release | |||
| the mouse button. | |||
| @see audioPluginParameterChangeGestureStart | |||
| */ | |||
| virtual void audioPluginParameterChangeGestureEnd (AudioPluginInstance* plugin, | |||
| int parameterIndex); | |||
| }; | |||
| //============================================================================== | |||
| /** | |||
| Base class for an active instance of a plugin. | |||
| This derives from the same AudioFilterBase object that is used in the | |||
| plugin wrapper code, and most of its functionality is exposed by that interface, | |||
| with just a few extra methods here for using it from the host side. | |||
| This derives from the AudioProcessor class, and adds some extra functionality | |||
| that helps when wrapping dynamically loaded plugins. | |||
| @see AudioFilterBase, AudioPluginFormat | |||
| @see AudioProcessor, AudioPluginFormat | |||
| */ | |||
| class AudioPluginInstance : public AudioFilterBase, | |||
| private AudioFilterBase::HostCallbacks | |||
| class AudioPluginInstance : public AudioProcessor | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| @@ -144,55 +98,12 @@ public: | |||
| /** Returns true if the plugin produces midi messages. */ | |||
| virtual bool producesMidi() const = 0; | |||
| /** Returns the plugin's latency. | |||
| This may not always be fixed, but should be correct just after the filter | |||
| has been prepared for playback. | |||
| */ | |||
| virtual int getSamplesLatency() const = 0; | |||
| //============================================================================== | |||
| /** Adds a listener that will be called when one of this plugin's parameters changes. */ | |||
| void addListener (AudioPluginParameterListener* const newListener) throw(); | |||
| /** Removes a previously added listener. */ | |||
| void removeListener (AudioPluginParameterListener* const listenerToRemove) throw(); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| protected: | |||
| VoidArray listeners; | |||
| CriticalSection changedParamLock; | |||
| Array <int> changedParams; | |||
| Array <float> changedParamValues; | |||
| class InternalAsyncUpdater : public Timer | |||
| { | |||
| public: | |||
| InternalAsyncUpdater (AudioPluginInstance& owner); | |||
| ~InternalAsyncUpdater() {} | |||
| void timerCallback(); | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| AudioPluginInstance& owner; | |||
| }; | |||
| InternalAsyncUpdater* internalAsyncUpdater; | |||
| void internalAsyncCallback(); | |||
| void queueChangeMessage (const int index, const float value) throw(); | |||
| AudioPluginInstance(); | |||
| bool JUCE_CALLTYPE getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info); | |||
| void JUCE_CALLTYPE informHostOfParameterChange (int index, float newValue); | |||
| void JUCE_CALLTYPE informHostOfParameterGestureBegin (int index); | |||
| void JUCE_CALLTYPE informHostOfParameterGestureEnd (int index); | |||
| void JUCE_CALLTYPE informHostOfStateChange(); | |||
| }; | |||
| @@ -112,12 +112,12 @@ public: | |||
| void fillInFromInstance (AudioPluginInstance& instance) throw(); | |||
| //============================================================================== | |||
| /** Tries to load the type for this description, by trying all the formats | |||
| /** Tries to load the type for this description, by trying all the formats | |||
| available in the AudioPluginFormat. | |||
| The caller is responsible for deleting the object that is returned. | |||
| If it can't load the plugin, it returns 0 and leaves a message in the | |||
| If it can't load the plugin, it returns 0 and leaves a message in the | |||
| errorMessage string. | |||
| */ | |||
| AudioPluginInstance* createInstance (String& errorMessage) const; | |||
| @@ -53,14 +53,14 @@ public: | |||
| @param directoriesToSearch the path to search | |||
| @param searchRecursively true to search recursively | |||
| @param deadMansPedalFile if this isn't File::nonexistent, then it will | |||
| be used as a file to store the names of any plugins | |||
| be used as a file to store the names of any plugins | |||
| that crash during initialisation. If there are | |||
| any plugins listed in it, then these will always | |||
| be scanned after all other possible files have | |||
| been tried - in this way, even if there's a few | |||
| be scanned after all other possible files have | |||
| been tried - in this way, even if there's a few | |||
| dodgy plugins in your path, then a couple of rescans | |||
| will still manage to find all the proper plugins. | |||
| It's probably best to choose a file in the user's | |||
| It's probably best to choose a file in the user's | |||
| application data directory (alongside your app's | |||
| settings file) for this. The file format it uses | |||
| is just a list of filenames of the modules that | |||
| @@ -36,7 +36,7 @@ | |||
| //============================================================================== | |||
| /** | |||
| /** | |||
| Implements a plugin format manager for VSTs. | |||
| */ | |||
| class VSTPluginFormat : public AudioPluginFormat | |||
| @@ -447,7 +447,7 @@ public: | |||
| if (resFileId != 0) | |||
| CloseResFile (resFileId); | |||
| } | |||
| else | |||
| else | |||
| #endif | |||
| if (bundleRef != 0) | |||
| { | |||
| @@ -654,7 +654,7 @@ void VSTPluginInstance::initialise() | |||
| dispatch (effOpen, 0, 0, 0, 0); | |||
| setPlayConfigDetails (effect->numInputs, effect->numOutputs, | |||
| setPlayConfigDetails (effect->numInputs, effect->numOutputs, | |||
| getSampleRate(), getBlockSize()); | |||
| if (getNumPrograms() > 1) | |||
| @@ -672,16 +672,20 @@ void VSTPluginInstance::initialise() | |||
| updateStoredProgramNames(); | |||
| wantsMidiMessages = dispatch (effCanDo, 0, 0, (void*) "receiveVstMidiEvent", 0) > 0; | |||
| setLatencySamples (effect->initialDelay); | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE VSTPluginInstance::prepareToPlay (double sampleRate_, | |||
| int samplesPerBlockExpected) | |||
| void VSTPluginInstance::prepareToPlay (double sampleRate_, | |||
| int samplesPerBlockExpected) | |||
| { | |||
| setPlayConfigDetails (effect->numInputs, effect->numOutputs, | |||
| setPlayConfigDetails (effect->numInputs, effect->numOutputs, | |||
| sampleRate_, samplesPerBlockExpected); | |||
| setLatencySamples (effect->initialDelay); | |||
| midiCollector.reset (sampleRate_); | |||
| juce_free (channels); | |||
| @@ -728,7 +732,7 @@ void JUCE_CALLTYPE VSTPluginInstance::prepareToPlay (double sampleRate_, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::releaseResources() | |||
| void VSTPluginInstance::releaseResources() | |||
| { | |||
| if (initialised) | |||
| { | |||
| @@ -745,8 +749,8 @@ void JUCE_CALLTYPE VSTPluginInstance::releaseResources() | |||
| channels = 0; | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages) | |||
| void VSTPluginInstance::processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages) | |||
| { | |||
| const int numSamples = buffer.getNumSamples(); | |||
| @@ -922,13 +926,13 @@ void VSTPluginInstance::handleMidiFromPlugin (const VstEvents* const events) | |||
| } | |||
| //============================================================================== | |||
| class VSTPluginWindow : public AudioFilterEditor, | |||
| class VSTPluginWindow : public AudioProcessorEditor, | |||
| public Timer | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| VSTPluginWindow (VSTPluginInstance& plugin_) | |||
| : AudioFilterEditor (&plugin_), | |||
| : AudioProcessorEditor (&plugin_), | |||
| plugin (plugin_), | |||
| isOpen (false), | |||
| wasShowing (false), | |||
| @@ -948,6 +952,7 @@ public: | |||
| activeWindows.add (this); | |||
| setSize (1, 1); | |||
| setOpaque (true); | |||
| setVisible (true); | |||
| } | |||
| @@ -1406,7 +1411,7 @@ private: | |||
| }; | |||
| //============================================================================== | |||
| AudioFilterEditor* JUCE_CALLTYPE VSTPluginInstance::createEditor() | |||
| AudioProcessorEditor* VSTPluginInstance::createEditor() | |||
| { | |||
| if (hasEditor()) | |||
| return new VSTPluginWindow (*this); | |||
| @@ -1548,7 +1553,7 @@ void VSTPluginInstance::setParamsInProgramBlock (fxProgram* const prog) throw() | |||
| prog->params[i] = swapFloat (getParameter (i)); | |||
| } | |||
| bool VSTPluginInstance::saveToFXBFile (JUCE_NAMESPACE::MemoryBlock& dest, bool isFXB, int maxSizeMB) | |||
| bool VSTPluginInstance::saveToFXBFile (MemoryBlock& dest, bool isFXB, int maxSizeMB) | |||
| { | |||
| const int numPrograms = getNumPrograms(); | |||
| const int numParams = getNumParameters(); | |||
| @@ -1557,7 +1562,7 @@ bool VSTPluginInstance::saveToFXBFile (JUCE_NAMESPACE::MemoryBlock& dest, bool i | |||
| { | |||
| if (isFXB) | |||
| { | |||
| JUCE_NAMESPACE::MemoryBlock chunk; | |||
| MemoryBlock chunk; | |||
| getChunkData (chunk, false, maxSizeMB); | |||
| const int totalLen = sizeof (fxChunkSet) + chunk.getSize() - 8; | |||
| @@ -1577,7 +1582,7 @@ bool VSTPluginInstance::saveToFXBFile (JUCE_NAMESPACE::MemoryBlock& dest, bool i | |||
| } | |||
| else | |||
| { | |||
| JUCE_NAMESPACE::MemoryBlock chunk; | |||
| MemoryBlock chunk; | |||
| getChunkData (chunk, true, maxSizeMB); | |||
| const int totalLen = sizeof (fxProgramSet) + chunk.getSize() - 8; | |||
| @@ -1615,7 +1620,7 @@ bool VSTPluginInstance::saveToFXBFile (JUCE_NAMESPACE::MemoryBlock& dest, bool i | |||
| set->numPrograms = swap (numPrograms); | |||
| const int oldProgram = getCurrentProgram(); | |||
| JUCE_NAMESPACE::MemoryBlock oldSettings; | |||
| MemoryBlock oldSettings; | |||
| createTempParameterStore (oldSettings); | |||
| setParamsInProgramBlock ((fxProgram*) (((char*) (set->programs)) + oldProgram * progLen)); | |||
| @@ -1644,7 +1649,7 @@ bool VSTPluginInstance::saveToFXBFile (JUCE_NAMESPACE::MemoryBlock& dest, bool i | |||
| return true; | |||
| } | |||
| void VSTPluginInstance::getChunkData (JUCE_NAMESPACE::MemoryBlock& mb, bool isPreset, int maxSizeMB) const | |||
| void VSTPluginInstance::getChunkData (MemoryBlock& mb, bool isPreset, int maxSizeMB) const | |||
| { | |||
| if (usesChunks()) | |||
| { | |||
| @@ -1796,8 +1801,7 @@ VstIntPtr VSTPluginInstance::handleCallback (VstInt32 opcode, VstInt32 index, Vs | |||
| switch (opcode) | |||
| { | |||
| case audioMasterAutomate: | |||
| if (callbacks != 0) | |||
| callbacks->informHostOfParameterChange (index, opt); | |||
| sendParamChangeMessageToListeners (index, opt); | |||
| break; | |||
| case audioMasterProcessEvents: | |||
| @@ -2048,12 +2052,12 @@ const String VSTPluginInstance::getCategory() const | |||
| } | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE VSTPluginInstance::getNumParameters() | |||
| int VSTPluginInstance::getNumParameters() | |||
| { | |||
| return effect != 0 ? effect->numParams : 0; | |||
| } | |||
| float JUCE_CALLTYPE VSTPluginInstance::getParameter (int index) | |||
| float VSTPluginInstance::getParameter (int index) | |||
| { | |||
| if (effect != 0 && index >= 0 && index < effect->numParams) | |||
| { | |||
| @@ -2070,7 +2074,7 @@ float JUCE_CALLTYPE VSTPluginInstance::getParameter (int index) | |||
| return 0.0f; | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::setParameter (int index, float newValue) | |||
| void VSTPluginInstance::setParameter (int index, float newValue) | |||
| { | |||
| if (effect != 0 && index >= 0 && index < effect->numParams) | |||
| { | |||
| @@ -2087,7 +2091,7 @@ void JUCE_CALLTYPE VSTPluginInstance::setParameter (int index, float newValue) | |||
| } | |||
| } | |||
| const String JUCE_CALLTYPE VSTPluginInstance::getParameterName (int index) | |||
| const String VSTPluginInstance::getParameterName (int index) | |||
| { | |||
| if (effect != 0) | |||
| { | |||
| @@ -2117,7 +2121,7 @@ const String VSTPluginInstance::getParameterLabel (int index) const | |||
| return String::empty; | |||
| } | |||
| const String JUCE_CALLTYPE VSTPluginInstance::getParameterText (int index) | |||
| const String VSTPluginInstance::getParameterText (int index) | |||
| { | |||
| if (effect != 0) | |||
| { | |||
| @@ -2143,7 +2147,7 @@ bool VSTPluginInstance::isParameterAutomatable (int index) const | |||
| return false; | |||
| } | |||
| void VSTPluginInstance::createTempParameterStore (JUCE_NAMESPACE::MemoryBlock& dest) | |||
| void VSTPluginInstance::createTempParameterStore (MemoryBlock& dest) | |||
| { | |||
| dest.setSize (64 + 4 * getNumParameters()); | |||
| dest.fillWith (0); | |||
| @@ -2155,7 +2159,7 @@ void VSTPluginInstance::createTempParameterStore (JUCE_NAMESPACE::MemoryBlock& d | |||
| p[i] = getParameter(i); | |||
| } | |||
| void VSTPluginInstance::restoreFromTempParameterStore (const JUCE_NAMESPACE::MemoryBlock& m) | |||
| void VSTPluginInstance::restoreFromTempParameterStore (const MemoryBlock& m) | |||
| { | |||
| changeProgramName (getCurrentProgram(), (const char*) m); | |||
| @@ -2165,23 +2169,23 @@ void VSTPluginInstance::restoreFromTempParameterStore (const JUCE_NAMESPACE::Mem | |||
| } | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE VSTPluginInstance::getNumPrograms() | |||
| int VSTPluginInstance::getNumPrograms() | |||
| { | |||
| return effect != 0 ? effect->numPrograms : 0; | |||
| } | |||
| int JUCE_CALLTYPE VSTPluginInstance::getCurrentProgram() | |||
| int VSTPluginInstance::getCurrentProgram() | |||
| { | |||
| return dispatch (effGetProgram, 0, 0, 0, 0); | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::setCurrentProgram (int newIndex) | |||
| void VSTPluginInstance::setCurrentProgram (int newIndex) | |||
| { | |||
| if (getNumPrograms() > 0 && newIndex != getCurrentProgram()) | |||
| dispatch (effSetProgram, 0, jlimit (0, getNumPrograms() - 1, newIndex), 0, 0); | |||
| } | |||
| const String JUCE_CALLTYPE VSTPluginInstance::getProgramName (int index) | |||
| const String VSTPluginInstance::getProgramName (int index) | |||
| { | |||
| if (index == getCurrentProgram()) | |||
| { | |||
| @@ -2203,7 +2207,7 @@ const String JUCE_CALLTYPE VSTPluginInstance::getProgramName (int index) | |||
| return programNames [index]; | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::changeProgramName (int index, const String& newName) | |||
| void VSTPluginInstance::changeProgramName (int index, const String& newName) | |||
| { | |||
| if (index == getCurrentProgram()) | |||
| { | |||
| @@ -2227,7 +2231,7 @@ void VSTPluginInstance::updateStoredProgramNames() | |||
| if (dispatch (effGetProgramNameIndexed, 0, -1, nm, 0) == 0) | |||
| { | |||
| const int oldProgram = getCurrentProgram(); | |||
| JUCE_NAMESPACE::MemoryBlock oldSettings; | |||
| MemoryBlock oldSettings; | |||
| createTempParameterStore (oldSettings); | |||
| for (int i = 0; i < getNumPrograms(); ++i) | |||
| @@ -2325,11 +2329,6 @@ bool VSTPluginInstance::producesMidi() const | |||
| return dispatch (effCanDo, 0, 0, (void*) "sendVstMidiEvent", 0) > 0; | |||
| } | |||
| int VSTPluginInstance::getSamplesLatency() const | |||
| { | |||
| return effect != 0 ? effect->initialDelay : 0; | |||
| } | |||
| void VSTPluginInstance::setPower (const bool on) | |||
| { | |||
| dispatch (effMainsChanged, 0, on ? 1 : 0, 0, 0); | |||
| @@ -2365,22 +2364,22 @@ bool VSTPluginInstance::usesChunks() const throw() | |||
| //============================================================================== | |||
| const int defaultMaxSizeMB = 64; | |||
| void JUCE_CALLTYPE VSTPluginInstance::getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) | |||
| void VSTPluginInstance::getStateInformation (MemoryBlock& destData) | |||
| { | |||
| saveToFXBFile (destData, true, defaultMaxSizeMB); | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) | |||
| void VSTPluginInstance::getCurrentProgramStateInformation (MemoryBlock& destData) | |||
| { | |||
| saveToFXBFile (destData, false, defaultMaxSizeMB); | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::setStateInformation (const void* data, int sizeInBytes) | |||
| void VSTPluginInstance::setStateInformation (const void* data, int sizeInBytes) | |||
| { | |||
| loadFromFXBFile (data, sizeInBytes); | |||
| } | |||
| void JUCE_CALLTYPE VSTPluginInstance::setCurrentProgramStateInformation (const void* data, int sizeInBytes) | |||
| void VSTPluginInstance::setCurrentProgramStateInformation (const void* data, int sizeInBytes) | |||
| { | |||
| loadFromFXBFile (data, sizeInBytes); | |||
| } | |||
| @@ -1,183 +1,182 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_VSTFORMAT_JUCEHEADER__ | |||
| #define __JUCE_VSTFORMAT_JUCEHEADER__ | |||
| #include "juce_VSTPluginFormat.h" | |||
| #undef PRAGMA_ALIGN_SUPPORTED | |||
| #define VST_FORCE_DEPRECATED 0 | |||
| #ifdef _MSC_VER | |||
| #pragma warning (push) | |||
| #pragma warning (disable: 4996) | |||
| #endif | |||
| /* Obviously you're going to need the Steinberg vstsdk2.4 folder in | |||
| your include path. | |||
| */ | |||
| #include "pluginterfaces/vst2.x/aeffectx.h" | |||
| #ifdef _MSC_VER | |||
| #pragma warning (pop) | |||
| #endif | |||
| class ModuleHandle; | |||
| struct fxProgram; | |||
| //============================================================================== | |||
| /** | |||
| An instance of a plugin, created by a VSTPluginType. | |||
| */ | |||
| class VSTPluginInstance : public AudioPluginInstance, | |||
| private Timer, | |||
| private AsyncUpdater | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| ~VSTPluginInstance(); | |||
| //============================================================================== | |||
| // AudioPluginInstance methods: | |||
| const String getName() const; | |||
| const String getManufacturer() const; | |||
| const String getVersion() const; | |||
| bool isInstrument() const; | |||
| const String getCategory() const; | |||
| const String getFormatName() const; | |||
| const File getFile() const; | |||
| int getUID() const; | |||
| bool acceptsMidi() const; | |||
| bool producesMidi() const; | |||
| int getSamplesLatency() const; | |||
| //============================================================================== | |||
| // AudioFilterBase methods: | |||
| void JUCE_CALLTYPE prepareToPlay (double sampleRate, int estimatedSamplesPerBlock); | |||
| void JUCE_CALLTYPE releaseResources(); | |||
| void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages); | |||
| AudioFilterEditor* JUCE_CALLTYPE createEditor(); | |||
| const String JUCE_CALLTYPE getInputChannelName (const int index) const; | |||
| bool JUCE_CALLTYPE isInputChannelStereoPair (int index) const; | |||
| const String JUCE_CALLTYPE getOutputChannelName (const int index) const; | |||
| bool JUCE_CALLTYPE isOutputChannelStereoPair (int index) const; | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE getNumParameters(); | |||
| float JUCE_CALLTYPE getParameter (int index); | |||
| void JUCE_CALLTYPE setParameter (int index, float newValue); | |||
| const String JUCE_CALLTYPE getParameterName (int index); | |||
| const String JUCE_CALLTYPE getParameterText (int index); | |||
| bool isParameterAutomatable (int index) const; | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE getNumPrograms(); | |||
| int JUCE_CALLTYPE getCurrentProgram(); | |||
| void JUCE_CALLTYPE setCurrentProgram (int index); | |||
| const String JUCE_CALLTYPE getProgramName (int index); | |||
| void JUCE_CALLTYPE changeProgramName (int index, const String& newName); | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); | |||
| void JUCE_CALLTYPE getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); | |||
| void JUCE_CALLTYPE setStateInformation (const void* data, int sizeInBytes); | |||
| void JUCE_CALLTYPE setCurrentProgramStateInformation (const void* data, int sizeInBytes); | |||
| //============================================================================== | |||
| void timerCallback(); | |||
| void handleAsyncUpdate(); | |||
| VstIntPtr handleCallback (VstInt32 opcode, VstInt32 index, VstInt32 value, void *ptr, float opt); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| friend class VSTPluginType; | |||
| friend class VSTPluginWindow; | |||
| friend class VSTPluginFormat; | |||
| AEffect* effect; | |||
| String name; | |||
| CriticalSection lock; | |||
| bool wantsMidiMessages, initialised, isPowerOn; | |||
| mutable StringArray programNames; | |||
| MidiMessageCollector midiCollector; | |||
| AudioSampleBuffer tempBuffer; | |||
| CriticalSection midiInLock; | |||
| MidiBuffer incomingMidi; | |||
| void* midiEventsToSend; | |||
| int numAllocatedMidiEvents; | |||
| VstTimeInfo vstHostTime; | |||
| float** channels; | |||
| ReferenceCountedObjectPtr <ModuleHandle> module; | |||
| //============================================================================== | |||
| int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) const; | |||
| bool restoreProgramSettings (const fxProgram* const prog); | |||
| const String getCurrentProgramName(); | |||
| void setParamsInProgramBlock (fxProgram* const prog) throw(); | |||
| void updateStoredProgramNames(); | |||
| void initialise(); | |||
| void ensureMidiEventSize (int numEventsNeeded); | |||
| void freeMidiEvents(); | |||
| void handleMidiFromPlugin (const VstEvents* const events); | |||
| void createTempParameterStore (juce::MemoryBlock& dest); | |||
| void restoreFromTempParameterStore (const juce::MemoryBlock& mb); | |||
| const String getParameterLabel (int index) const; | |||
| bool usesChunks() const throw(); | |||
| void getChunkData (juce::MemoryBlock& mb, bool isPreset, int maxSizeMB) const; | |||
| void setChunkData (const char* data, int size, bool isPreset); | |||
| bool loadFromFXBFile (const void* data, int numBytes); | |||
| bool saveToFXBFile (juce::MemoryBlock& dest, bool isFXB, int maxSizeMB); | |||
| int getVersionNumber() const throw(); | |||
| bool hasEditor() const throw(); | |||
| bool canMono() const throw(); | |||
| bool isOffline() const throw(); | |||
| void setPower (const bool on); | |||
| VSTPluginInstance (const ReferenceCountedObjectPtr <ModuleHandle>& module); | |||
| }; | |||
| #endif // __JUCE_VSTFORMAT_JUCEHEADER__ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_VSTPLUGININSTANCE_JUCEHEADER__ | |||
| #define __JUCE_VSTPLUGININSTANCE_JUCEHEADER__ | |||
| #include "juce_VSTPluginFormat.h" | |||
| #undef PRAGMA_ALIGN_SUPPORTED | |||
| #define VST_FORCE_DEPRECATED 0 | |||
| #ifdef _MSC_VER | |||
| #pragma warning (push) | |||
| #pragma warning (disable: 4996) | |||
| #endif | |||
| /* Obviously you're going to need the Steinberg vstsdk2.4 folder in | |||
| your include path. | |||
| */ | |||
| #include "pluginterfaces/vst2.x/aeffectx.h" | |||
| #ifdef _MSC_VER | |||
| #pragma warning (pop) | |||
| #endif | |||
| class ModuleHandle; | |||
| struct fxProgram; | |||
| //============================================================================== | |||
| /** | |||
| An instance of a plugin, created by a VSTPluginType. | |||
| */ | |||
| class VSTPluginInstance : public AudioPluginInstance, | |||
| private Timer, | |||
| private AsyncUpdater | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| ~VSTPluginInstance(); | |||
| //============================================================================== | |||
| // AudioPluginInstance methods: | |||
| const String getName() const; | |||
| const String getManufacturer() const; | |||
| const String getVersion() const; | |||
| bool isInstrument() const; | |||
| const String getCategory() const; | |||
| const String getFormatName() const; | |||
| const File getFile() const; | |||
| int getUID() const; | |||
| bool acceptsMidi() const; | |||
| bool producesMidi() const; | |||
| //============================================================================== | |||
| // AudioProcessor methods: | |||
| void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock); | |||
| void releaseResources(); | |||
| void processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages); | |||
| AudioProcessorEditor* createEditor(); | |||
| const String getInputChannelName (const int index) const; | |||
| bool isInputChannelStereoPair (int index) const; | |||
| const String getOutputChannelName (const int index) const; | |||
| bool isOutputChannelStereoPair (int index) const; | |||
| //============================================================================== | |||
| int getNumParameters(); | |||
| float getParameter (int index); | |||
| void setParameter (int index, float newValue); | |||
| const String getParameterName (int index); | |||
| const String getParameterText (int index); | |||
| bool isParameterAutomatable (int index) const; | |||
| //============================================================================== | |||
| int getNumPrograms(); | |||
| int getCurrentProgram(); | |||
| void setCurrentProgram (int index); | |||
| const String getProgramName (int index); | |||
| void changeProgramName (int index, const String& newName); | |||
| //============================================================================== | |||
| void getStateInformation (MemoryBlock& destData); | |||
| void getCurrentProgramStateInformation (MemoryBlock& destData); | |||
| void setStateInformation (const void* data, int sizeInBytes); | |||
| void setCurrentProgramStateInformation (const void* data, int sizeInBytes); | |||
| //============================================================================== | |||
| void timerCallback(); | |||
| void handleAsyncUpdate(); | |||
| VstIntPtr handleCallback (VstInt32 opcode, VstInt32 index, VstInt32 value, void *ptr, float opt); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| friend class VSTPluginType; | |||
| friend class VSTPluginWindow; | |||
| friend class VSTPluginFormat; | |||
| AEffect* effect; | |||
| String name; | |||
| CriticalSection lock; | |||
| bool wantsMidiMessages, initialised, isPowerOn; | |||
| mutable StringArray programNames; | |||
| MidiMessageCollector midiCollector; | |||
| AudioSampleBuffer tempBuffer; | |||
| CriticalSection midiInLock; | |||
| MidiBuffer incomingMidi; | |||
| void* midiEventsToSend; | |||
| int numAllocatedMidiEvents; | |||
| VstTimeInfo vstHostTime; | |||
| float** channels; | |||
| ReferenceCountedObjectPtr <ModuleHandle> module; | |||
| //============================================================================== | |||
| int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) const; | |||
| bool restoreProgramSettings (const fxProgram* const prog); | |||
| const String getCurrentProgramName(); | |||
| void setParamsInProgramBlock (fxProgram* const prog) throw(); | |||
| void updateStoredProgramNames(); | |||
| void initialise(); | |||
| void ensureMidiEventSize (int numEventsNeeded); | |||
| void freeMidiEvents(); | |||
| void handleMidiFromPlugin (const VstEvents* const events); | |||
| void createTempParameterStore (MemoryBlock& dest); | |||
| void restoreFromTempParameterStore (const MemoryBlock& mb); | |||
| const String getParameterLabel (int index) const; | |||
| bool usesChunks() const throw(); | |||
| void getChunkData (MemoryBlock& mb, bool isPreset, int maxSizeMB) const; | |||
| void setChunkData (const char* data, int size, bool isPreset); | |||
| bool loadFromFXBFile (const void* data, int numBytes); | |||
| bool saveToFXBFile (MemoryBlock& dest, bool isFXB, int maxSizeMB); | |||
| int getVersionNumber() const throw(); | |||
| bool hasEditor() const throw(); | |||
| bool canMono() const throw(); | |||
| bool isOffline() const throw(); | |||
| void setPower (const bool on); | |||
| VSTPluginInstance (const ReferenceCountedObjectPtr <ModuleHandle>& module); | |||
| }; | |||
| #endif // __JUCE_VSTPLUGININSTANCE_JUCEHEADER__ | |||
| @@ -36,6 +36,7 @@ | |||
| 845FAEE10A5C2696008C94D8 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845FAEE00A5C2696008C94D8 /* QuickTime.framework */; }; | |||
| 84B4CDD10C7DD23B0083122F /* MusicDeviceBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */; }; | |||
| 84B4CDD20C7DD23B0083122F /* MusicDeviceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84B4CDD00C7DD23B0083122F /* MusicDeviceBase.h */; }; | |||
| 84BC4E5E0C8DDD3D00FA249B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BC4E5D0C8DDD3C00FA249B /* OpenGL.framework */; }; | |||
| 84CFAEFB090964560053C22C /* AUCarbonViewDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AAB03175F3201CA2136 /* AUCarbonViewDispatch.cpp */; }; | |||
| 84CFAEFC090964560053C22C /* AUCarbonViewControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AA903175F3201CA2136 /* AUCarbonViewControl.cpp */; }; | |||
| 84CFAEFD090964560053C22C /* AUCarbonViewBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AA703175F3201CA2136 /* AUCarbonViewBase.cpp */; }; | |||
| @@ -48,10 +49,6 @@ | |||
| 84EB4042090A4F5A008FAC1B /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F4E5DC280898301D00589A5A /* CAVectorUnit.cpp */; }; | |||
| 84EB404E090A5116008FAC1B /* JucePluginCharacteristics.h in Headers */ = {isa = PBXBuildFile; fileRef = 84EB404D090A5116008FAC1B /* JucePluginCharacteristics.h */; }; | |||
| 84F0521E090674BB00AEC8DB /* Info-JuceAU.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84F05215090674BB00AEC8DB /* Info-JuceAU.plist */; }; | |||
| 84F05486090687BF00AEC8DB /* juce_AudioFilterBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F05482090687BF00AEC8DB /* juce_AudioFilterBase.cpp */; }; | |||
| 84F05487090687BF00AEC8DB /* juce_AudioFilterBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F05483090687BF00AEC8DB /* juce_AudioFilterBase.h */; }; | |||
| 84F05488090687BF00AEC8DB /* juce_AudioFilterEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F05484090687BF00AEC8DB /* juce_AudioFilterEditor.cpp */; }; | |||
| 84F05489090687BF00AEC8DB /* juce_AudioFilterEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F05485090687BF00AEC8DB /* juce_AudioFilterEditor.h */; }; | |||
| 84F0548F090687F600AEC8DB /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F0548E090687F600AEC8DB /* CoreAudio.framework */; }; | |||
| 84F054E80906C8DD00AEC8DB /* AUMIDIBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F054E40906C8DD00AEC8DB /* AUMIDIBase.cpp */; }; | |||
| 84F054E90906C8DD00AEC8DB /* AUMIDIBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F054E50906C8DD00AEC8DB /* AUMIDIBase.h */; }; | |||
| @@ -104,16 +101,13 @@ | |||
| 845FAEE00A5C2696008C94D8 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = QuickTime.framework; sourceTree = "<group>"; }; | |||
| 84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MusicDeviceBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp; sourceTree = "<absolute>"; }; | |||
| 84B4CDD00C7DD23B0083122F /* MusicDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MusicDeviceBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h; sourceTree = "<absolute>"; }; | |||
| 84BC4E5D0C8DDD3C00FA249B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; | |||
| 84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioUnitWrapper.cpp; path = ../../../wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84EB400A090A4A2C008FAC1B /* juce_AudioUnitWrapper.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = juce_AudioUnitWrapper.r; path = ../../../wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r; sourceTree = SOURCE_ROOT; }; | |||
| 84EB404D090A5116008FAC1B /* JucePluginCharacteristics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../src/JucePluginCharacteristics.h; sourceTree = SOURCE_ROOT; }; | |||
| 84F05215090674BB00AEC8DB /* Info-JuceAU.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Info-JuceAU.plist"; sourceTree = "<group>"; }; | |||
| 84F05217090674BB00AEC8DB /* JuceAU.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = JuceAU.exp; sourceTree = "<group>"; }; | |||
| 84F0545A0906865D00AEC8DB /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; }; | |||
| 84F05482090687BF00AEC8DB /* juce_AudioFilterBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterBase.cpp; path = ../../../wrapper/juce_AudioFilterBase.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84F05483090687BF00AEC8DB /* juce_AudioFilterBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterBase.h; path = ../../../wrapper/juce_AudioFilterBase.h; sourceTree = SOURCE_ROOT; }; | |||
| 84F05484090687BF00AEC8DB /* juce_AudioFilterEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterEditor.cpp; path = ../../../wrapper/juce_AudioFilterEditor.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84F05485090687BF00AEC8DB /* juce_AudioFilterEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterEditor.h; path = ../../../wrapper/juce_AudioFilterEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| 84F0548E090687F600AEC8DB /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; | |||
| 84F054E40906C8DD00AEC8DB /* AUMIDIBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp; sourceTree = "<absolute>"; }; | |||
| 84F054E50906C8DD00AEC8DB /* AUMIDIBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AUMIDIBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h; sourceTree = "<absolute>"; }; | |||
| @@ -177,19 +171,20 @@ | |||
| 84F87963093B1EDC00225D65 /* AGL.framework in Frameworks */, | |||
| 845FAEE10A5C2696008C94D8 /* QuickTime.framework in Frameworks */, | |||
| 844C50290C71B6E300D0082E /* IOKit.framework in Frameworks */, | |||
| 84BC4E5E0C8DDD3D00FA249B /* OpenGL.framework in Frameworks */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| /* End PBXFrameworksBuildPhase section */ | |||
| /* Begin PBXGroup section */ | |||
| 84EB403B090A4ED3008FAC1B /* AU specific */ = { | |||
| 84EB403B090A4ED3008FAC1B /* Juce AU Code */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp */, | |||
| 84EB400A090A4A2C008FAC1B /* juce_AudioUnitWrapper.r */, | |||
| ); | |||
| name = "AU specific"; | |||
| name = "Juce AU Code"; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 84F0516D09066DB800AEC8DB /* Plugin Code */ = { | |||
| @@ -209,11 +204,7 @@ | |||
| 84F0516E09066DC900AEC8DB /* Wrapper Code */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84F05482090687BF00AEC8DB /* juce_AudioFilterBase.cpp */, | |||
| 84F05483090687BF00AEC8DB /* juce_AudioFilterBase.h */, | |||
| 84F05484090687BF00AEC8DB /* juce_AudioFilterEditor.cpp */, | |||
| 84F05485090687BF00AEC8DB /* juce_AudioFilterEditor.h */, | |||
| 84EB403B090A4ED3008FAC1B /* AU specific */, | |||
| 84EB403B090A4ED3008FAC1B /* Juce AU Code */, | |||
| F5AA99C50281A64501C34293 /* Apple AU Code */, | |||
| ); | |||
| name = "Wrapper Code"; | |||
| @@ -278,6 +269,7 @@ | |||
| F5AA9A2F0281AAB901C34293 /* CoreFoundation.framework */, | |||
| F5AA9A300281AAB901C34293 /* CoreServices.framework */, | |||
| 84F87962093B1EDC00225D65 /* AGL.framework */, | |||
| 84BC4E5D0C8DDD3C00FA249B /* OpenGL.framework */, | |||
| 844C50280C71B6E300D0082E /* IOKit.framework */, | |||
| 845FAEE00A5C2696008C94D8 /* QuickTime.framework */, | |||
| ); | |||
| @@ -391,8 +383,6 @@ | |||
| A9E885EA0874B5BF00B2DFE8 /* CAThreadSafeList.h in Headers */, | |||
| F4E5DC2C0898301D00589A5A /* CAVectorUnit.h in Headers */, | |||
| F4E5DC2D0898301D00589A5A /* CAVectorUnitTypes.h in Headers */, | |||
| 84F05487090687BF00AEC8DB /* juce_AudioFilterBase.h in Headers */, | |||
| 84F05489090687BF00AEC8DB /* juce_AudioFilterEditor.h in Headers */, | |||
| 84F054E90906C8DD00AEC8DB /* AUMIDIBase.h in Headers */, | |||
| 84F054EB0906C8DD00AEC8DB /* AUMIDIEffectBase.h in Headers */, | |||
| 84F055020906E9EA00AEC8DB /* DemoEditorComponent.h in Headers */, | |||
| @@ -502,8 +492,6 @@ | |||
| 3E8BF118079CA60300021B09 /* ComponentBase.cpp in Sources */, | |||
| 84CFAF10090965080053C22C /* CAAUParameter.cpp in Sources */, | |||
| 3E8BF11A079CA60300021B09 /* AUBuffer.cpp in Sources */, | |||
| 84F05486090687BF00AEC8DB /* juce_AudioFilterBase.cpp in Sources */, | |||
| 84F05488090687BF00AEC8DB /* juce_AudioFilterEditor.cpp in Sources */, | |||
| 84F054E80906C8DD00AEC8DB /* AUMIDIBase.cpp in Sources */, | |||
| 84F054EA0906C8DD00AEC8DB /* AUMIDIEffectBase.cpp in Sources */, | |||
| 84F055010906E9EA00AEC8DB /* DemoEditorComponent.cpp in Sources */, | |||
| @@ -10,8 +10,6 @@ | |||
| 5B521CB1088F264F009C75FE /* System.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B521CB0088F264F009C75FE /* System.framework */; }; | |||
| 841E07300AF9F015005E6FCC /* DemoEditorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E072B0AF9F015005E6FCC /* DemoEditorComponent.cpp */; }; | |||
| 841E07310AF9F015005E6FCC /* DemoJuceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E072D0AF9F015005E6FCC /* DemoJuceFilter.cpp */; }; | |||
| 841E07390AF9F055005E6FCC /* juce_AudioFilterBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E07350AF9F055005E6FCC /* juce_AudioFilterBase.cpp */; }; | |||
| 841E073A0AF9F055005E6FCC /* juce_AudioFilterEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E07370AF9F055005E6FCC /* juce_AudioFilterEditor.cpp */; }; | |||
| 841E073D0AF9F099005E6FCC /* juce_RTASUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E073B0AF9F099005E6FCC /* juce_RTASUtilities.cpp */; }; | |||
| 841E073E0AF9F099005E6FCC /* juce_RTASWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E073C0AF9F099005E6FCC /* juce_RTASWrapper.cpp */; }; | |||
| 846444EF0AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444E20AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp */; }; | |||
| @@ -27,6 +25,7 @@ | |||
| 846445060AFA010800E7B2BE /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846445040AFA010800E7B2BE /* AGL.framework */; }; | |||
| 846445070AFA010800E7B2BE /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846445050AFA010800E7B2BE /* CoreAudio.framework */; }; | |||
| 8464450A0AFA012100E7B2BE /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846445090AFA012100E7B2BE /* QuickTime.framework */; }; | |||
| 84BC4E9C0C8DDF6400FA249B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BC4E9B0C8DDF6400FA249B /* OpenGL.framework */; }; | |||
| 84C9D7FB0AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C9D7F90AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp */; }; | |||
| 84C9D7FC0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C9D7FA0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp */; }; | |||
| 84EEB4180AFB6679009655FF /* DummyResourceFile.r in Rez */ = {isa = PBXBuildFile; fileRef = 84EEB4170AFB6679009655FF /* DummyResourceFile.r */; }; | |||
| @@ -41,7 +40,7 @@ | |||
| isa = PBXContainerItemProxy; | |||
| containerPortal = 5B521CEB08916D36009C75FE /* PluginLibrary.xcodeproj */; | |||
| proxyType = 2; | |||
| remoteGlobalIDString = B65B09B30860FB0800FE2E6A /* libPluginLibrary.a */; | |||
| remoteGlobalIDString = B65B09B30860FB0800FE2E6A; | |||
| remoteInfo = "Plugin Library"; | |||
| }; | |||
| 84FDB00F0C15BBA500CD0087 /* PBXContainerItemProxy */ = { | |||
| @@ -62,10 +61,6 @@ | |||
| 841E072D0AF9F015005E6FCC /* DemoJuceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoJuceFilter.cpp; path = ../../src/DemoJuceFilter.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 841E072E0AF9F015005E6FCC /* DemoJuceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoJuceFilter.h; path = ../../src/DemoJuceFilter.h; sourceTree = SOURCE_ROOT; }; | |||
| 841E072F0AF9F015005E6FCC /* JucePluginCharacteristics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../src/JucePluginCharacteristics.h; sourceTree = SOURCE_ROOT; }; | |||
| 841E07350AF9F055005E6FCC /* juce_AudioFilterBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterBase.cpp; path = ../../../wrapper/juce_AudioFilterBase.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 841E07360AF9F055005E6FCC /* juce_AudioFilterBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterBase.h; path = ../../../wrapper/juce_AudioFilterBase.h; sourceTree = SOURCE_ROOT; }; | |||
| 841E07370AF9F055005E6FCC /* juce_AudioFilterEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterEditor.cpp; path = ../../../wrapper/juce_AudioFilterEditor.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 841E07380AF9F055005E6FCC /* juce_AudioFilterEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterEditor.h; path = ../../../wrapper/juce_AudioFilterEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| 841E073B0AF9F099005E6FCC /* juce_RTASUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_RTASUtilities.cpp; path = ../../../wrapper/formats/RTAS/juce_RTASUtilities.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 841E073C0AF9F099005E6FCC /* juce_RTASWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_RTASWrapper.cpp; path = ../../../wrapper/formats/RTAS/juce_RTASWrapper.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 841E07420AF9F126005E6FCC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; | |||
| @@ -84,6 +79,7 @@ | |||
| 846445040AFA010800E7B2BE /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; | |||
| 846445050AFA010800E7B2BE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; | |||
| 846445090AFA012100E7B2BE /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; | |||
| 84BC4E9B0C8DDF6400FA249B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; | |||
| 84C442690B306D39003FCBFF /* CommonReleaseSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = CommonReleaseSettings.xcconfig; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/common/Mac/CommonReleaseSettings.xcconfig; sourceTree = "<absolute>"; }; | |||
| 84C4426A0B306D39003FCBFF /* CommonDebugSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = CommonDebugSettings.xcconfig; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/common/Mac/CommonDebugSettings.xcconfig; sourceTree = "<absolute>"; }; | |||
| 84C9D7F90AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_Dispatcher.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_Dispatcher.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -107,6 +103,7 @@ | |||
| 846445070AFA010800E7B2BE /* CoreAudio.framework in Frameworks */, | |||
| 8464450A0AFA012100E7B2BE /* QuickTime.framework in Frameworks */, | |||
| 84FAD76D0C7C894B00AF3028 /* IOKit.framework in Frameworks */, | |||
| 84BC4E9C0C8DDF6400FA249B /* OpenGL.framework in Frameworks */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -129,6 +126,7 @@ | |||
| 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84BC4E9B0C8DDF6400FA249B /* OpenGL.framework */, | |||
| 84FAD76C0C7C894B00AF3028 /* IOKit.framework */, | |||
| 846445040AFA010800E7B2BE /* AGL.framework */, | |||
| 846445050AFA010800E7B2BE /* CoreAudio.framework */, | |||
| @@ -182,10 +180,6 @@ | |||
| 841E072A0AF9EFEF005E6FCC /* wrapper */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 841E07350AF9F055005E6FCC /* juce_AudioFilterBase.cpp */, | |||
| 841E07360AF9F055005E6FCC /* juce_AudioFilterBase.h */, | |||
| 841E07370AF9F055005E6FCC /* juce_AudioFilterEditor.cpp */, | |||
| 841E07380AF9F055005E6FCC /* juce_AudioFilterEditor.h */, | |||
| 841E07340AF9F02D005E6FCC /* rtas specific */, | |||
| ); | |||
| name = wrapper; | |||
| @@ -319,8 +313,6 @@ | |||
| files = ( | |||
| 841E07300AF9F015005E6FCC /* DemoEditorComponent.cpp in Sources */, | |||
| 841E07310AF9F015005E6FCC /* DemoJuceFilter.cpp in Sources */, | |||
| 841E07390AF9F055005E6FCC /* juce_AudioFilterBase.cpp in Sources */, | |||
| 841E073A0AF9F055005E6FCC /* juce_AudioFilterEditor.cpp in Sources */, | |||
| 841E073D0AF9F099005E6FCC /* juce_RTASUtilities.cpp in Sources */, | |||
| 841E073E0AF9F099005E6FCC /* juce_RTASWrapper.cpp in Sources */, | |||
| 846444EF0AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp in Sources */, | |||
| @@ -214,34 +214,62 @@ | |||
| Name="wrapper code" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterBase.cpp" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASCompileFlags.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterBase.h" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASUtilities.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterEditor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterEditor.h" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASWrapper.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <Filter | |||
| Name="RTAS specific" | |||
| Name="cpp wrappers" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASCompileFlags.h" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTAS_dlldefs.def" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASUtilities.cpp" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectGroup.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTASWrapper.cpp" | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectGroupMIDI.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| @@ -260,258 +288,210 @@ | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <Filter | |||
| Name="cpp wrappers" | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectMIDIUtils.cpp" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\juce_RTAS_dlldefs.def" | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectGroup.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectGroupMIDI.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcess.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectMIDIUtils.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcess.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcessAS.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcessAS.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcessMIDI.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectProcessMIDI.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectType.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectTypeRTAS.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectType.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_ChunkDataParser.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_CEffectTypeRTAS.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_ChunkDataParser.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_DefaultSwap.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_DefaultSwap.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_DLLMain.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_DLLMain.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_Header.h" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_Header.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_PlugInUtils.cpp" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\RTAS\wrappers\juce_Wrapper_PlugInUtils.cpp" | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <FileConfiguration | |||
| Name="Debug|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| <FileConfiguration | |||
| Name="Release|Win32" | |||
| > | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| </Filter> | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| CallingConvention="2" | |||
| /> | |||
| </FileConfiguration> | |||
| </File> | |||
| </Filter> | |||
| </Filter> | |||
| </Filter> | |||
| @@ -10,10 +10,10 @@ | |||
| 8456E9D008A29AE60087C412 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E9CF08A29AE60087C412 /* CoreServices.framework */; }; | |||
| 845FAE4C0A5C09FA008C94D8 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 845FAE4B0A5C09FA008C94D8 /* juce.xcconfig */; }; | |||
| 84BACBD20987847C0073300C /* juce_VstWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BACBD10987847C0073300C /* juce_VstWrapper.cpp */; }; | |||
| 84BC4EBC0C8DE02200FA249B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BC4EBA0C8DE02200FA249B /* IOKit.framework */; }; | |||
| 84BC4EBD0C8DE02200FA249B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BC4EBB0C8DE02200FA249B /* OpenGL.framework */; }; | |||
| 84E1AE51089EBAAA00E85E4F /* DemoEditorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE4D089EBAAA00E85E4F /* DemoEditorComponent.cpp */; }; | |||
| 84E1AE52089EBAAA00E85E4F /* DemoJuceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE4F089EBAAA00E85E4F /* DemoJuceFilter.cpp */; }; | |||
| 84E1AE59089EBAEA00E85E4F /* juce_AudioFilterBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE55089EBAEA00E85E4F /* juce_AudioFilterBase.cpp */; }; | |||
| 84E1AE5A089EBAEA00E85E4F /* juce_AudioFilterEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE57089EBAEA00E85E4F /* juce_AudioFilterEditor.cpp */; }; | |||
| 84E1AF2B089EBE4C00E85E4F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E1AF2A089EBE4C00E85E4F /* Carbon.framework */; }; | |||
| 84E1AF30089EBE5A00E85E4F /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E1AF2F089EBE5A00E85E4F /* QuickTime.framework */; }; | |||
| 84E1AF34089EBE6C00E85E4F /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E1AF33089EBE6C00E85E4F /* AGL.framework */; }; | |||
| @@ -27,15 +27,13 @@ | |||
| 8456E9CF08A29AE60087C412 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; | |||
| 845FAE4B0A5C09FA008C94D8 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; }; | |||
| 84BACBD10987847C0073300C /* juce_VstWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_VstWrapper.cpp; path = ../../../wrapper/formats/VST/juce_VstWrapper.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84BC4EBA0C8DE02200FA249B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; | |||
| 84BC4EBB0C8DE02200FA249B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; | |||
| 84E1AE47089EBA6A00E85E4F /* JuceVST.vst */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JuceVST.vst; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| 84E1AE4D089EBAAA00E85E4F /* DemoEditorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoEditorComponent.cpp; path = ../../src/DemoEditorComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE4E089EBAAA00E85E4F /* DemoEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoEditorComponent.h; path = ../../src/DemoEditorComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE4F089EBAAA00E85E4F /* DemoJuceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoJuceFilter.cpp; path = ../../src/DemoJuceFilter.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE50089EBAAA00E85E4F /* DemoJuceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoJuceFilter.h; path = ../../src/DemoJuceFilter.h; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE55089EBAEA00E85E4F /* juce_AudioFilterBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterBase.cpp; path = ../../../wrapper/juce_AudioFilterBase.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE56089EBAEA00E85E4F /* juce_AudioFilterBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterBase.h; path = ../../../wrapper/juce_AudioFilterBase.h; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE57089EBAEA00E85E4F /* juce_AudioFilterEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioFilterEditor.cpp; path = ../../../wrapper/juce_AudioFilterEditor.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AE58089EBAEA00E85E4F /* juce_AudioFilterEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AudioFilterEditor.h; path = ../../../wrapper/juce_AudioFilterEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| 84E1AF2A089EBE4C00E85E4F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; | |||
| 84E1AF2F089EBE5A00E85E4F /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; | |||
| 84E1AF33089EBE6C00E85E4F /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; | |||
| @@ -54,6 +52,8 @@ | |||
| 84E1AF34089EBE6C00E85E4F /* AGL.framework in Frameworks */, | |||
| 84E1AF38089EBF1300E85E4F /* CoreAudio.framework in Frameworks */, | |||
| 8456E9D008A29AE60087C412 /* CoreServices.framework in Frameworks */, | |||
| 84BC4EBC0C8DE02200FA249B /* IOKit.framework in Frameworks */, | |||
| 84BC4EBD0C8DE02200FA249B /* OpenGL.framework in Frameworks */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -75,6 +75,8 @@ | |||
| 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84BC4EBA0C8DE02200FA249B /* IOKit.framework */, | |||
| 84BC4EBB0C8DE02200FA249B /* OpenGL.framework */, | |||
| 84E1AF2A089EBE4C00E85E4F /* Carbon.framework */, | |||
| 8456E9CF08A29AE60087C412 /* CoreServices.framework */, | |||
| 84E1AF37089EBF1300E85E4F /* CoreAudio.framework */, | |||
| @@ -123,23 +125,11 @@ | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 84E1AE53089EBACA00E85E4F /* wrapper code */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84E1AE55089EBAEA00E85E4F /* juce_AudioFilterBase.cpp */, | |||
| 84E1AE56089EBAEA00E85E4F /* juce_AudioFilterBase.h */, | |||
| 84E1AE57089EBAEA00E85E4F /* juce_AudioFilterEditor.cpp */, | |||
| 84E1AE58089EBAEA00E85E4F /* juce_AudioFilterEditor.h */, | |||
| 84E1AE54089EBAD200E85E4F /* VST specific */, | |||
| ); | |||
| name = "wrapper code"; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 84E1AE54089EBAD200E85E4F /* VST specific */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84BACBD10987847C0073300C /* juce_VstWrapper.cpp */, | |||
| ); | |||
| name = "VST specific"; | |||
| name = "wrapper code"; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| /* End PBXGroup section */ | |||
| @@ -197,8 +187,6 @@ | |||
| files = ( | |||
| 84E1AE51089EBAAA00E85E4F /* DemoEditorComponent.cpp in Sources */, | |||
| 84E1AE52089EBAAA00E85E4F /* DemoJuceFilter.cpp in Sources */, | |||
| 84E1AE59089EBAEA00E85E4F /* juce_AudioFilterBase.cpp in Sources */, | |||
| 84E1AE5A089EBAEA00E85E4F /* juce_AudioFilterEditor.cpp in Sources */, | |||
| 84BACBD20987847C0073300C /* juce_VstWrapper.cpp in Sources */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| @@ -248,29 +248,9 @@ | |||
| Name="wrapper_code" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterBase.cpp" | |||
| RelativePath="..\..\..\wrapper\formats\VST\juce_VstWrapper.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterBase.h" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterEditor.cpp" | |||
| > | |||
| </File> | |||
| <File | |||
| RelativePath="..\..\..\wrapper\juce_AudioFilterEditor.h" | |||
| > | |||
| </File> | |||
| <Filter | |||
| Name="VST specific" | |||
| > | |||
| <File | |||
| RelativePath="..\..\..\wrapper\formats\VST\juce_VstWrapper.cpp" | |||
| > | |||
| </File> | |||
| </Filter> | |||
| </Filter> | |||
| </Filter> | |||
| <Filter | |||
| @@ -29,6 +29,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../../juce.h" | |||
| #include "DemoEditorComponent.h" | |||
| //============================================================================== | |||
| @@ -71,7 +72,7 @@ static const String ppqToBarsBeatsString (const double ppq, | |||
| //============================================================================== | |||
| DemoEditorComponent::DemoEditorComponent (DemoJuceFilter* const ownerFilter) | |||
| : AudioFilterEditor (ownerFilter) | |||
| : AudioProcessorEditor (ownerFilter) | |||
| { | |||
| // create our gain slider.. | |||
| addAndMakeVisible (gainSlider = new Slider (T("gain"))); | |||
| @@ -159,7 +160,7 @@ void DemoEditorComponent::updateParametersFromFilter() | |||
| filter->getCallbackLock().enter(); | |||
| // take a local copy of the info we need while we've got the lock.. | |||
| const AudioFilterBase::CurrentPositionInfo positionInfo (filter->lastPosInfo); | |||
| const AudioPlayHead::CurrentPositionInfo positionInfo (filter->lastPosInfo); | |||
| const float newGain = filter->getParameter (0); | |||
| // ..release the lock ASAP | |||
| @@ -48,7 +48,7 @@ | |||
| when it's destroyed. When the filter's parameters are changed, it broadcasts | |||
| a message and this editor responds by updating its display. | |||
| */ | |||
| class DemoEditorComponent : public AudioFilterEditor, | |||
| class DemoEditorComponent : public AudioProcessorEditor, | |||
| public ChangeListener, | |||
| public SliderListener | |||
| { | |||
| @@ -29,16 +29,17 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../../juce.h" | |||
| #include "DemoJuceFilter.h" | |||
| #include "DemoEditorComponent.h" | |||
| //============================================================================== | |||
| /** | |||
| This function must be implemented to create the actual plugin object that | |||
| you want to use. | |||
| This function must be implemented to create a new instance of your | |||
| plugin object. | |||
| */ | |||
| AudioFilterBase* JUCE_CALLTYPE createPluginFilter() | |||
| AudioProcessor* JUCE_CALLTYPE createPluginFilter() | |||
| { | |||
| return new DemoJuceFilter(); | |||
| } | |||
| @@ -103,22 +104,22 @@ const String DemoJuceFilter::getParameterText (int index) | |||
| return String::empty; | |||
| } | |||
| const String JUCE_CALLTYPE DemoJuceFilter::getInputChannelName (const int channelIndex) const | |||
| const String DemoJuceFilter::getInputChannelName (const int channelIndex) const | |||
| { | |||
| return String (channelIndex + 1); | |||
| } | |||
| const String JUCE_CALLTYPE DemoJuceFilter::getOutputChannelName (const int channelIndex) const | |||
| const String DemoJuceFilter::getOutputChannelName (const int channelIndex) const | |||
| { | |||
| return String (channelIndex + 1); | |||
| } | |||
| bool JUCE_CALLTYPE DemoJuceFilter::isInputChannelStereoPair (int index) const | |||
| bool DemoJuceFilter::isInputChannelStereoPair (int index) const | |||
| { | |||
| return false; | |||
| } | |||
| bool JUCE_CALLTYPE DemoJuceFilter::isOutputChannelStereoPair (int index) const | |||
| bool DemoJuceFilter::isOutputChannelStereoPair (int index) const | |||
| { | |||
| return false; | |||
| } | |||
| @@ -146,7 +147,7 @@ void DemoJuceFilter::processBlock (AudioSampleBuffer& buffer, | |||
| buffer.applyGain (channel, 0, buffer.getNumSamples(), gain); | |||
| } | |||
| // in case we have more outputs than inputs, we'll clear any output | |||
| // in case we have more outputs than inputs, we'll clear any output | |||
| // channels that didn't contain input data, (because these aren't | |||
| // guaranteed to be empty - they may contain garbage). | |||
| for (int i = getNumInputChannels(); i < getNumOutputChannels(); ++i) | |||
| @@ -162,9 +163,9 @@ void DemoJuceFilter::processBlock (AudioSampleBuffer& buffer, | |||
| // have a go at getting the current time from the host, and if it's changed, tell | |||
| // our UI to update itself. | |||
| CurrentPositionInfo pos; | |||
| AudioPlayHead::CurrentPositionInfo pos; | |||
| if (getCurrentPositionInfo (pos)) | |||
| if (getPlayHead() != 0 && getPlayHead()->getCurrentPosition (pos)) | |||
| { | |||
| if (memcmp (&pos, &lastPosInfo, sizeof (pos)) != 0) | |||
| { | |||
| @@ -182,13 +183,13 @@ void DemoJuceFilter::processBlock (AudioSampleBuffer& buffer, | |||
| } | |||
| //============================================================================== | |||
| AudioFilterEditor* DemoJuceFilter::createEditor() | |||
| AudioProcessorEditor* DemoJuceFilter::createEditor() | |||
| { | |||
| return new DemoEditorComponent (this); | |||
| } | |||
| //============================================================================== | |||
| void DemoJuceFilter::getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) | |||
| void DemoJuceFilter::getStateInformation (MemoryBlock& destData) | |||
| { | |||
| // you can store your parameters as binary data if you want to or if you've got | |||
| // a load of binary to put in there, but if you're not doing anything too heavy, | |||
| @@ -32,8 +32,6 @@ | |||
| #ifndef DEMOJUCEPLUGINFILTER_H | |||
| #define DEMOJUCEPLUGINFILTER_H | |||
| #include "../../wrapper/juce_AudioFilterBase.h" | |||
| //============================================================================== | |||
| /** | |||
| @@ -41,7 +39,7 @@ | |||
| passing through it. | |||
| */ | |||
| class DemoJuceFilter : public AudioFilterBase, | |||
| class DemoJuceFilter : public AudioProcessor, | |||
| public ChangeBroadcaster | |||
| { | |||
| public: | |||
| @@ -50,39 +48,39 @@ public: | |||
| ~DemoJuceFilter(); | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE prepareToPlay (double sampleRate, int samplesPerBlock); | |||
| void JUCE_CALLTYPE releaseResources(); | |||
| void prepareToPlay (double sampleRate, int samplesPerBlock); | |||
| void releaseResources(); | |||
| void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages); | |||
| void processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages); | |||
| //============================================================================== | |||
| AudioFilterEditor* JUCE_CALLTYPE createEditor(); | |||
| AudioProcessorEditor* createEditor(); | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE getNumParameters(); | |||
| int getNumParameters(); | |||
| float JUCE_CALLTYPE getParameter (int index); | |||
| void JUCE_CALLTYPE setParameter (int index, float newValue); | |||
| float getParameter (int index); | |||
| void setParameter (int index, float newValue); | |||
| const String JUCE_CALLTYPE getParameterName (int index); | |||
| const String JUCE_CALLTYPE getParameterText (int index); | |||
| const String getParameterName (int index); | |||
| const String getParameterText (int index); | |||
| const String JUCE_CALLTYPE getInputChannelName (const int channelIndex) const; | |||
| const String JUCE_CALLTYPE getOutputChannelName (const int channelIndex) const; | |||
| bool JUCE_CALLTYPE isInputChannelStereoPair (int index) const; | |||
| bool JUCE_CALLTYPE isOutputChannelStereoPair (int index) const; | |||
| const String getInputChannelName (const int channelIndex) const; | |||
| const String getOutputChannelName (const int channelIndex) const; | |||
| bool isInputChannelStereoPair (int index) const; | |||
| bool isOutputChannelStereoPair (int index) const; | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE getNumPrograms() { return 0; } | |||
| int JUCE_CALLTYPE getCurrentProgram() { return 0; } | |||
| void JUCE_CALLTYPE setCurrentProgram (int index) { } | |||
| const String JUCE_CALLTYPE getProgramName (int index) { return String::empty; } | |||
| void JUCE_CALLTYPE changeProgramName (int index, const String& newName) { } | |||
| int getNumPrograms() { return 0; } | |||
| int getCurrentProgram() { return 0; } | |||
| void setCurrentProgram (int index) { } | |||
| const String getProgramName (int index) { return String::empty; } | |||
| void changeProgramName (int index, const String& newName) { } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); | |||
| void JUCE_CALLTYPE setStateInformation (const void* data, int sizeInBytes); | |||
| void getStateInformation (MemoryBlock& destData); | |||
| void setStateInformation (const void* data, int sizeInBytes); | |||
| //============================================================================== | |||
| // These properties are public so that our editor component can access them | |||
| @@ -94,7 +92,7 @@ public: | |||
| // this keeps a copy of the last set of time info that was acquired during an audio | |||
| // callback - the UI component will read this and display it. | |||
| AudioFilterBase::CurrentPositionInfo lastPosInfo; | |||
| AudioPlayHead::CurrentPositionInfo lastPosInfo; | |||
| // these are used to persist the UI's size - the values are stored along with the | |||
| // filter's other parameters, and the UI component will update them when it gets | |||
| @@ -1,270 +1,270 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_PLUGIN_CHARACTERISTICS_H__ | |||
| #define __JUCE_PLUGIN_CHARACTERISTICS_H__ | |||
| //============================================================================== | |||
| /* All of the following settings need to be defined for your plugin. | |||
| Go through each of these definitions and check that it's correctly | |||
| set-up before trying to do a build. | |||
| */ | |||
| //============================================================================== | |||
| /* Generic settings */ | |||
| /** The name of your plugin. (Try to keep this as short as possible) | |||
| */ | |||
| #define JucePlugin_Name "Juce Demo Plugin" | |||
| /** A longer decription of your plugin. | |||
| */ | |||
| #define JucePlugin_Desc "A Demo Plugin demonstrating Juce" | |||
| /** The name of your company. (Try to keep this as short as possible) | |||
| */ | |||
| #define JucePlugin_Manufacturer "Raw Material Software" | |||
| /** A four-character code for your company. | |||
| Use single quotes - this isn't a string! | |||
| */ | |||
| #define JucePlugin_ManufacturerCode 'RawM' | |||
| /** A unique four-character code for your plugin. | |||
| Use single quotes - this isn't a string! | |||
| Note that for AU compatibility, this must contain at least one | |||
| upper-case letter. | |||
| */ | |||
| #define JucePlugin_PluginCode 'JcDm' | |||
| //============================================================================== | |||
| /** The maximum number of channels of audio input that the plugin can handle. | |||
| The actual number of channels supplied may be less than this, depending on the host. | |||
| For VSTs, you specify a maximum number of channels, for AUs and RTAS a set | |||
| of channel configurations is specified in JucePlugin_PreferredChannelConfigurations | |||
| and the host will choose one of these, but you should still set the max number of | |||
| channels correctly. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that will be used with the AudioFilterBase::getNumInputChannels() | |||
| method. | |||
| */ | |||
| #define JucePlugin_MaxNumInputChannels 2 | |||
| /** The maximum number of channels of audio output that the plugin can handle. | |||
| The actual number of channels supplied may be less than this, depending on the host. | |||
| For VSTs, you specify a maximum number of channels, for AUs and RTAS a set | |||
| of channel configurations is specified in JucePlugin_PreferredChannelConfigurations | |||
| and the host will choose one of these, but you should still set the max number of | |||
| channels correctly. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that will be used with the AudioFilterBase::getNumOutputChannels() | |||
| method. | |||
| */ | |||
| #define JucePlugin_MaxNumOutputChannels 2 | |||
| /** This allows the plugin to specify the configurations of input/output channels that | |||
| they can support. | |||
| AU and RTAS hosts will use this information, although VSTs only have a concept of | |||
| a maximum number of channels. | |||
| The list is a set of pairs of values in the form { numInputs, numOutputs }, and each | |||
| pair indicates a valid configuration that the plugin can handle. | |||
| So for example, {1, 1}, {2, 2} means that the plugin can be used in just two | |||
| configurations: either with 1 input and 1 output, or with 2 inputs and 2 outputs. If | |||
| you used this in Pro-Tools, the plugin could be placed on a mono or stereo track. | |||
| If the list was just {1, 1}, then Pro-Tools would only allow it to be used as a mono | |||
| plugin. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that the host has connected to the plugin by using the | |||
| AudioFilterBase::getNumOutputChannels() and AudioFilterBase::getNumInputChannels() | |||
| methods. | |||
| */ | |||
| #define JucePlugin_PreferredChannelConfigurations { 1, 1 }, { 2, 2 } | |||
| //============================================================================== | |||
| /** Set this value to 1 if your plugin is a synth, or 0 if it isn't. | |||
| */ | |||
| #define JucePlugin_IsSynth 0 | |||
| /** Set this to 1 if your plugin needs to receive midi messages, or 0 if | |||
| it doesn't. | |||
| */ | |||
| #define JucePlugin_WantsMidiInput 1 | |||
| /** Set this to 1 if your plugin wants to output midi messages, or 0 if | |||
| it doesn't. | |||
| */ | |||
| #define JucePlugin_ProducesMidiOutput 1 | |||
| /** If this is 1, it means that when the plugins input buffers are | |||
| silent, it's output will be too. | |||
| Some hosts may use this to avoid calling the plugin when no audio | |||
| would be produced. | |||
| */ | |||
| #define JucePlugin_SilenceInProducesSilenceOut 0 | |||
| /** If set to 1, this hints that the host should ignore any keys that are pressed | |||
| when the plugin has keyboard focus. If 0, then the host should still execute | |||
| any shortcut keys that are pressed, even if the plugin does have focus. | |||
| Various hosts/platforms may deal with this differently, or ignore it. | |||
| */ | |||
| #define JucePlugin_EditorRequiresKeyboardFocus 1 | |||
| //============================================================================== | |||
| /** A version number | |||
| */ | |||
| #define JucePlugin_VersionCode 0x00010100 | |||
| #define JucePlugin_VersionString "1.1" | |||
| //============================================================================== | |||
| /* VST settings */ | |||
| /** For VSTs, if you're compiling against the V2.3 SDK, set this to zero. If | |||
| you're using V2.4 or later, make sure it's set to 1. | |||
| */ | |||
| #define JUCE_USE_VSTSDK_2_4 1 | |||
| /** Defines a UID for your VST plugin. | |||
| The default setting here is probably fine, unless you specifically need | |||
| a custom value. It's passed to the setUniqueID() method of the plugin class. | |||
| */ | |||
| #define JucePlugin_VSTUniqueID JucePlugin_PluginCode | |||
| /** Defines the type of plugin. For most pursposes, you don't need to change this | |||
| setting. | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_VSTCategory kPlugCategSynth | |||
| #else | |||
| #define JucePlugin_VSTCategory kPlugCategEffect | |||
| #endif | |||
| //============================================================================== | |||
| /* AudioUnit settings */ | |||
| /** Defines the major type of plugin - see AUComponent.h for the available options. | |||
| If it's an effect, you should use kAudioUnitType_Effect. For a synth, you'll | |||
| need to use kAudioUnitType_MusicEffect or kAudioUnitType_MusicDevice. | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_AUMainType kAudioUnitType_MusicDevice | |||
| #else | |||
| #define JucePlugin_AUMainType kAudioUnitType_Effect | |||
| #endif | |||
| /** A 4-character plugin ID code that should be unique. | |||
| You can leave this using the generic value JucePlugin_PluginCode, or | |||
| override it if necessary. | |||
| Note that for AU, this must contain at least one upper-case letter. | |||
| */ | |||
| #define JucePlugin_AUSubType JucePlugin_PluginCode | |||
| /** A prefix for the names of exported entry-point functions that the component exposes. | |||
| It's very important that your plugin's .exp file contains two entries that correspond to | |||
| this name. So for example if you set the prefix to "abc" then your exports | |||
| file must contain: | |||
| _abcEntry | |||
| _abcViewEntry | |||
| */ | |||
| #define JucePlugin_AUExportPrefix JuceDemoAU | |||
| /** This is the same as JucePlugin_AUExportPrefix, but in quotes | |||
| (needed for the resource compiler...) | |||
| */ | |||
| #define JucePlugin_AUExportPrefixQuoted "JuceDemoAU" | |||
| /** A 4-character manufacturer code - this is your company name. | |||
| You can leave this using the generic value JucePlugin_ManufacturerCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode | |||
| /** If you define this value to be the same as the CFBundleIdentifier in your | |||
| plugin's plist, it allows the plugin to work out its own path, which is | |||
| needed if you want to use File::getSpecialLocation (currentExecutableFile) | |||
| */ | |||
| #define JucePlugin_CFBundleIdentifier "com.rawmaterialsoftware.JuceDemo" | |||
| //============================================================================== | |||
| /* RTAS settings */ | |||
| /** How to categorise this plugin. | |||
| For a synth you probably want to set this to ePlugInCategory_SWGenerators. | |||
| For an effect, you could choose one of: | |||
| ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, | |||
| ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, | |||
| ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, | |||
| ePlugInCategory_Dither, ePlugInCategory_SoundField | |||
| (All values are listed in FicPluginEnums.h) | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_RTASCategory ePlugInCategory_SWGenerators | |||
| #else | |||
| #define JucePlugin_RTASCategory ePlugInCategory_None | |||
| #endif | |||
| /** A 4-character manufacturer code - this is your company name. | |||
| You can leave this using the generic value JucePlugin_ManufacturerCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode | |||
| /** A 4-character plugin ID code that should be unique. | |||
| You can leave this using the generic value JucePlugin_PluginCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_RTASProductId JucePlugin_PluginCode | |||
| //============================================================================== | |||
| #endif | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_PLUGIN_CHARACTERISTICS_H__ | |||
| #define __JUCE_PLUGIN_CHARACTERISTICS_H__ | |||
| //============================================================================== | |||
| /* All of the following settings need to be defined for your plugin. | |||
| Go through each of these definitions and check that it's correctly | |||
| set-up before trying to do a build. | |||
| */ | |||
| //============================================================================== | |||
| /* Generic settings */ | |||
| /** The name of your plugin. (Try to keep this as short as possible) | |||
| */ | |||
| #define JucePlugin_Name "Juce Demo Plugin" | |||
| /** A longer decription of your plugin. | |||
| */ | |||
| #define JucePlugin_Desc "A Demo Plugin demonstrating Juce" | |||
| /** The name of your company. (Try to keep this as short as possible) | |||
| */ | |||
| #define JucePlugin_Manufacturer "Raw Material Software" | |||
| /** A four-character code for your company. | |||
| Use single quotes - this isn't a string! | |||
| */ | |||
| #define JucePlugin_ManufacturerCode 'RawM' | |||
| /** A unique four-character code for your plugin. | |||
| Use single quotes - this isn't a string! | |||
| Note that for AU compatibility, this must contain at least one | |||
| upper-case letter. | |||
| */ | |||
| #define JucePlugin_PluginCode 'JcDm' | |||
| //============================================================================== | |||
| /** The maximum number of channels of audio input that the plugin can handle. | |||
| The actual number of channels supplied may be less than this, depending on the host. | |||
| For VSTs, you specify a maximum number of channels, for AUs and RTAS a set | |||
| of channel configurations is specified in JucePlugin_PreferredChannelConfigurations | |||
| and the host will choose one of these, but you should still set the max number of | |||
| channels correctly. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that will be used with the AudioProcessor::getNumInputChannels() | |||
| method. | |||
| */ | |||
| #define JucePlugin_MaxNumInputChannels 2 | |||
| /** The maximum number of channels of audio output that the plugin can handle. | |||
| The actual number of channels supplied may be less than this, depending on the host. | |||
| For VSTs, you specify a maximum number of channels, for AUs and RTAS a set | |||
| of channel configurations is specified in JucePlugin_PreferredChannelConfigurations | |||
| and the host will choose one of these, but you should still set the max number of | |||
| channels correctly. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that will be used with the AudioProcessor::getNumOutputChannels() | |||
| method. | |||
| */ | |||
| #define JucePlugin_MaxNumOutputChannels 2 | |||
| /** This allows the plugin to specify the configurations of input/output channels that | |||
| they can support. | |||
| AU and RTAS hosts will use this information, although VSTs only have a concept of | |||
| a maximum number of channels. | |||
| The list is a set of pairs of values in the form { numInputs, numOutputs }, and each | |||
| pair indicates a valid configuration that the plugin can handle. | |||
| So for example, {1, 1}, {2, 2} means that the plugin can be used in just two | |||
| configurations: either with 1 input and 1 output, or with 2 inputs and 2 outputs. If | |||
| you used this in Pro-Tools, the plugin could be placed on a mono or stereo track. | |||
| If the list was just {1, 1}, then Pro-Tools would only allow it to be used as a mono | |||
| plugin. | |||
| As soon as a plugin's prepareToPlay() method is called, you can find out the actual | |||
| number of channels that the host has connected to the plugin by using the | |||
| AudioProcessor::getNumOutputChannels() and AudioFilterBase::getNumInputChannels() | |||
| methods. | |||
| */ | |||
| #define JucePlugin_PreferredChannelConfigurations { 1, 1 }, { 2, 2 } | |||
| //============================================================================== | |||
| /** Set this value to 1 if your plugin is a synth, or 0 if it isn't. | |||
| */ | |||
| #define JucePlugin_IsSynth 0 | |||
| /** Set this to 1 if your plugin needs to receive midi messages, or 0 if | |||
| it doesn't. | |||
| */ | |||
| #define JucePlugin_WantsMidiInput 1 | |||
| /** Set this to 1 if your plugin wants to output midi messages, or 0 if | |||
| it doesn't. | |||
| */ | |||
| #define JucePlugin_ProducesMidiOutput 1 | |||
| /** If this is 1, it means that when the plugins input buffers are | |||
| silent, it's output will be too. | |||
| Some hosts may use this to avoid calling the plugin when no audio | |||
| would be produced. | |||
| */ | |||
| #define JucePlugin_SilenceInProducesSilenceOut 0 | |||
| /** If set to 1, this hints that the host should ignore any keys that are pressed | |||
| when the plugin has keyboard focus. If 0, then the host should still execute | |||
| any shortcut keys that are pressed, even if the plugin does have focus. | |||
| Various hosts/platforms may deal with this differently, or ignore it. | |||
| */ | |||
| #define JucePlugin_EditorRequiresKeyboardFocus 1 | |||
| //============================================================================== | |||
| /** A version number | |||
| */ | |||
| #define JucePlugin_VersionCode 0x00010100 | |||
| #define JucePlugin_VersionString "1.1" | |||
| //============================================================================== | |||
| /* VST settings */ | |||
| /** For VSTs, if you're compiling against the V2.3 SDK, set this to zero. If | |||
| you're using V2.4 or later, make sure it's set to 1. | |||
| */ | |||
| #define JUCE_USE_VSTSDK_2_4 1 | |||
| /** Defines a UID for your VST plugin. | |||
| The default setting here is probably fine, unless you specifically need | |||
| a custom value. It's passed to the setUniqueID() method of the plugin class. | |||
| */ | |||
| #define JucePlugin_VSTUniqueID JucePlugin_PluginCode | |||
| /** Defines the type of plugin. For most pursposes, you don't need to change this | |||
| setting. | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_VSTCategory kPlugCategSynth | |||
| #else | |||
| #define JucePlugin_VSTCategory kPlugCategEffect | |||
| #endif | |||
| //============================================================================== | |||
| /* AudioUnit settings */ | |||
| /** Defines the major type of plugin - see AUComponent.h for the available options. | |||
| If it's an effect, you should use kAudioUnitType_Effect. For a synth, you'll | |||
| need to use kAudioUnitType_MusicEffect or kAudioUnitType_MusicDevice. | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_AUMainType kAudioUnitType_MusicDevice | |||
| #else | |||
| #define JucePlugin_AUMainType kAudioUnitType_Effect | |||
| #endif | |||
| /** A 4-character plugin ID code that should be unique. | |||
| You can leave this using the generic value JucePlugin_PluginCode, or | |||
| override it if necessary. | |||
| Note that for AU, this must contain at least one upper-case letter. | |||
| */ | |||
| #define JucePlugin_AUSubType JucePlugin_PluginCode | |||
| /** A prefix for the names of exported entry-point functions that the component exposes. | |||
| It's very important that your plugin's .exp file contains two entries that correspond to | |||
| this name. So for example if you set the prefix to "abc" then your exports | |||
| file must contain: | |||
| _abcEntry | |||
| _abcViewEntry | |||
| */ | |||
| #define JucePlugin_AUExportPrefix JuceDemoAU | |||
| /** This is the same as JucePlugin_AUExportPrefix, but in quotes | |||
| (needed for the resource compiler...) | |||
| */ | |||
| #define JucePlugin_AUExportPrefixQuoted "JuceDemoAU" | |||
| /** A 4-character manufacturer code - this is your company name. | |||
| You can leave this using the generic value JucePlugin_ManufacturerCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode | |||
| /** If you define this value to be the same as the CFBundleIdentifier in your | |||
| plugin's plist, it allows the plugin to work out its own path, which is | |||
| needed if you want to use File::getSpecialLocation (currentExecutableFile) | |||
| */ | |||
| #define JucePlugin_CFBundleIdentifier "com.rawmaterialsoftware.JuceDemo" | |||
| //============================================================================== | |||
| /* RTAS settings */ | |||
| /** How to categorise this plugin. | |||
| For a synth you probably want to set this to ePlugInCategory_SWGenerators. | |||
| For an effect, you could choose one of: | |||
| ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, | |||
| ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, | |||
| ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, | |||
| ePlugInCategory_Dither, ePlugInCategory_SoundField | |||
| (All values are listed in FicPluginEnums.h) | |||
| */ | |||
| #if JucePlugin_IsSynth | |||
| #define JucePlugin_RTASCategory ePlugInCategory_SWGenerators | |||
| #else | |||
| #define JucePlugin_RTASCategory ePlugInCategory_None | |||
| #endif | |||
| /** A 4-character manufacturer code - this is your company name. | |||
| You can leave this using the generic value JucePlugin_ManufacturerCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode | |||
| /** A 4-character plugin ID code that should be unique. | |||
| You can leave this using the generic value JucePlugin_PluginCode, or | |||
| override it if necessary. | |||
| */ | |||
| #define JucePlugin_RTASProductId JucePlugin_PluginCode | |||
| //============================================================================== | |||
| #endif | |||
| @@ -33,9 +33,8 @@ | |||
| #include "AUMIDIEffectBase.h" | |||
| #include "MusicDeviceBase.h" | |||
| #include "AUCarbonViewBase.h" | |||
| #include "../../juce_AudioFilterBase.h" | |||
| #include "../../juce_IncludeCharacteristics.h" | |||
| #include "../../../../../juce.h" | |||
| //============================================================================== | |||
| #define juceFilterObjectPropertyID 0x1a45ffe9 | |||
| @@ -54,9 +53,17 @@ END_JUCE_NAMESPACE | |||
| #define JuceAUBaseClass AUMIDIEffectBase | |||
| #endif | |||
| //============================================================================== | |||
| /** Somewhere in the codebase of your plugin, you need to implement this function | |||
| and make it create an instance of the filter subclass that you're building. | |||
| */ | |||
| extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); | |||
| //============================================================================== | |||
| class JuceAU : public JuceAUBaseClass, | |||
| public AudioFilterBase::HostCallbacks | |||
| public AudioProcessorListener, | |||
| public AudioPlayHead | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| @@ -85,7 +92,8 @@ public: | |||
| } | |||
| juceFilter = createPluginFilter(); | |||
| juceFilter->setHostCallbacks (this); | |||
| juceFilter->setPlayHead (this); | |||
| juceFilter->addListener (this); | |||
| jassert (juceFilter != 0); | |||
| Globals()->UseIndexedParameters (juceFilter->getNumParameters()); | |||
| @@ -163,7 +171,7 @@ public: | |||
| if (juceFilter != 0) | |||
| { | |||
| JUCE_NAMESPACE::MemoryBlock state; | |||
| MemoryBlock state; | |||
| juceFilter->getStateInformation (state); | |||
| if (state.getSize() > 0) | |||
| @@ -237,7 +245,7 @@ public: | |||
| { | |||
| const int index = (int) inParameterID; | |||
| if (inScope == kAudioUnitScope_Global | |||
| if (inScope == kAudioUnitScope_Global | |||
| && juceFilter != 0 | |||
| && index < juceFilter->getNumParameters()) | |||
| { | |||
| @@ -306,7 +314,7 @@ public: | |||
| Float64 GetSampleRate() | |||
| { | |||
| return GetOutput(0)->GetStreamFormat().mSampleRate; | |||
| } | |||
| } | |||
| Float64 GetLatency() | |||
| { | |||
| @@ -331,7 +339,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| bool getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info) | |||
| bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info) | |||
| { | |||
| info.timeSigNumerator = 0; | |||
| info.timeSigDenominator = 0; | |||
| @@ -344,33 +352,33 @@ public: | |||
| switch (lastSMPTETime.mType) | |||
| { | |||
| case kSMPTETimeType24: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps24; | |||
| info.frameRate = AudioPlayHead::fps24; | |||
| break; | |||
| case kSMPTETimeType25: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps25; | |||
| info.frameRate = AudioPlayHead::fps25; | |||
| break; | |||
| case kSMPTETimeType30Drop: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps30drop; | |||
| info.frameRate = AudioPlayHead::fps30drop; | |||
| break; | |||
| case kSMPTETimeType30: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps30; | |||
| info.frameRate = AudioPlayHead::fps30; | |||
| break; | |||
| case kSMPTETimeType2997: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps2997; | |||
| info.frameRate = AudioPlayHead::fps2997; | |||
| break; | |||
| case kSMPTETimeType2997Drop: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps2997drop; | |||
| info.frameRate = AudioPlayHead::fps2997drop; | |||
| break; | |||
| //case kSMPTETimeType60: | |||
| //case kSMPTETimeType5994: | |||
| default: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fpsUnknown; | |||
| info.frameRate = AudioPlayHead::fpsUnknown; | |||
| break; | |||
| } | |||
| @@ -420,33 +428,27 @@ public: | |||
| } | |||
| } | |||
| void informHostOfParameterChange (int index, float newValue) | |||
| void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) | |||
| { | |||
| if (juceFilter != 0) | |||
| { | |||
| juceFilter->setParameter (index, newValue); | |||
| sendAUEvent (kAudioUnitEvent_ParameterValueChange, index); | |||
| } | |||
| sendAUEvent (kAudioUnitEvent_ParameterValueChange, index); | |||
| } | |||
| void informHostOfParameterGestureBegin (int index) | |||
| void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) | |||
| { | |||
| if (juceFilter != 0) | |||
| sendAUEvent (kAudioUnitEvent_BeginParameterChangeGesture, index); | |||
| sendAUEvent (kAudioUnitEvent_BeginParameterChangeGesture, index); | |||
| } | |||
| void informHostOfParameterGestureEnd (int index) | |||
| void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) | |||
| { | |||
| if (juceFilter != 0) | |||
| sendAUEvent (kAudioUnitEvent_EndParameterChangeGesture, index); | |||
| sendAUEvent (kAudioUnitEvent_EndParameterChangeGesture, index); | |||
| } | |||
| void informHostOfStateChange() | |||
| void audioProcessorChanged (AudioProcessor*) | |||
| { | |||
| // xxx is there an AU equivalent? | |||
| } | |||
| bool StreamFormatWritable (AudioUnitScope inScope, AudioUnitElement element) | |||
| bool StreamFormatWritable (AudioUnitScope inScope, AudioUnitElement element) | |||
| { | |||
| return ! IsInitialized(); | |||
| } | |||
| @@ -456,7 +458,7 @@ public: | |||
| return noErr; | |||
| } | |||
| ComponentResult StopNote (MusicDeviceGroupID, NoteInstanceID, UInt32) | |||
| ComponentResult StopNote (MusicDeviceGroupID, NoteInstanceID, UInt32) | |||
| { | |||
| return noErr; | |||
| } | |||
| @@ -728,7 +730,7 @@ protected: | |||
| //============================================================================== | |||
| private: | |||
| AudioFilterBase* juceFilter; | |||
| AudioProcessor* juceFilter; | |||
| AudioSampleBuffer bufferSpace; | |||
| float** channels; | |||
| MidiBuffer midiEvents; | |||
| @@ -776,8 +778,8 @@ class JuceAUView : public AUCarbonViewBase, | |||
| public MouseListener, | |||
| public Timer | |||
| { | |||
| AudioFilterBase* juceFilter; | |||
| AudioFilterEditor* editorComp; | |||
| AudioProcessor* juceFilter; | |||
| AudioProcessorEditor* editorComp; | |||
| Component* windowComp; | |||
| bool recursive; | |||
| int mx, my; | |||
| @@ -40,7 +40,7 @@ | |||
| #pragma pack (push, 8) | |||
| #endif | |||
| #include "../../juce_AudioFilterBase.h" | |||
| #include "../../../../../juce.h" | |||
| #ifdef _MSC_VER | |||
| #pragma pack (pop) | |||
| @@ -83,8 +83,7 @@ | |||
| #pragma pack (push, 8) | |||
| #endif | |||
| #include "../../juce_AudioFilterBase.h" | |||
| #include "../../juce_AudioFilterEditor.h" | |||
| #include "../../../../../juce.h" | |||
| #include "../../juce_IncludeCharacteristics.h" | |||
| #ifdef _MSC_VER | |||
| @@ -92,6 +91,7 @@ | |||
| #endif | |||
| #undef Component | |||
| #undef MemoryBlock | |||
| //============================================================================== | |||
| #if JUCE_WIN32 | |||
| @@ -106,6 +106,12 @@ const int midiBufferSize = 1024; | |||
| const OSType juceChunkType = 'juce'; | |||
| static const int bypassControlIndex = 1; | |||
| //============================================================================== | |||
| /** Somewhere in the codebase of your plugin, you need to implement this function | |||
| and make it return a new instance of the filter subclass that you're building. | |||
| */ | |||
| extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); | |||
| //============================================================================== | |||
| static float longToFloat (const long n) throw() | |||
| @@ -123,7 +129,8 @@ static long floatToLong (const float n) throw() | |||
| //============================================================================== | |||
| class JucePlugInProcess : public CEffectProcessMIDI, | |||
| public CEffectProcessRTAS, | |||
| public AudioFilterBase::HostCallbacks, | |||
| public AudioProcessorListener, | |||
| public AudioPlayHead, | |||
| public AsyncUpdater | |||
| { | |||
| public: | |||
| @@ -161,7 +168,7 @@ public: | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JuceCustomUIView (AudioFilterBase* const filter_) | |||
| JuceCustomUIView (AudioProcessor* const filter_) | |||
| : filter (filter_), | |||
| editorComp (0), | |||
| wrapper (0) | |||
| @@ -247,9 +254,9 @@ public: | |||
| //============================================================================== | |||
| private: | |||
| AudioFilterBase* const filter; | |||
| AudioProcessor* const filter; | |||
| juce::Component* wrapper; | |||
| AudioFilterEditor* editorComp; | |||
| AudioProcessorEditor* editorComp; | |||
| void deleteEditorComp() | |||
| { | |||
| @@ -268,7 +275,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| // A component to hold the AudioFilterEditor, and cope with some housekeeping | |||
| // A component to hold the AudioProcessorEditor, and cope with some housekeeping | |||
| // chores when it changes or repaints. | |||
| class EditorCompWrapper : public juce::Component, | |||
| #if JUCE_MAC | |||
| @@ -279,7 +286,7 @@ public: | |||
| { | |||
| public: | |||
| EditorCompWrapper (void* const hostWindow_, | |||
| AudioFilterEditor* const editorComp, | |||
| AudioProcessorEditor* const editorComp, | |||
| JuceCustomUIView* const owner_) | |||
| : hostWindow (hostWindow_), | |||
| owner (owner_), | |||
| @@ -546,7 +553,7 @@ protected: | |||
| SFicPlugInStemFormats stems; | |||
| GetProcessType()->GetStemFormats (&stems); | |||
| juceFilter->setPlayConfigDetails (fNumInputs, fNumOutputs, | |||
| juceFilter->setPlayConfigDetails (fNumInputs, fNumOutputs, | |||
| juceFilter->getSampleRate(), juceFilter->getBlockSize()); | |||
| AddControl (new CPluginControl_OnOff ('bypa', "Master Bypass\nMastrByp\nMByp\nByp", false, true)); | |||
| @@ -581,7 +588,8 @@ protected: | |||
| midiTransport = new CEffectMIDITransport (&mMIDIWorld); | |||
| juceFilter->setHostCallbacks (this); | |||
| juceFilter->setPlayHead (this); | |||
| juceFilter->addListener (this); | |||
| } | |||
| void handleAsyncUpdate() | |||
| @@ -592,10 +600,10 @@ protected: | |||
| jassert (sampleRate > 0); | |||
| juce_free (channels); | |||
| channels = (float**) juce_calloc (sizeof (float*) * jmax (juceFilter->getNumInputChannels(), | |||
| channels = (float**) juce_calloc (sizeof (float*) * jmax (juceFilter->getNumInputChannels(), | |||
| juceFilter->getNumOutputChannels())); | |||
| juceFilter->setPlayConfigDetails (fNumInputs, fNumOutputs, | |||
| juceFilter->setPlayConfigDetails (fNumInputs, fNumOutputs, | |||
| sampleRate, mRTGlobals->mHWBufferSizeInSamples); | |||
| juceFilter->prepareToPlay (sampleRate, | |||
| @@ -770,7 +778,7 @@ protected: | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info) | |||
| bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info) | |||
| { | |||
| // this method can only be called while the plugin is running | |||
| jassert (prepared); | |||
| @@ -805,42 +813,42 @@ protected: | |||
| switch (fTimeCodeInfo.mFrameRate) | |||
| { | |||
| case ficFrameRate_24Frame: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps24; | |||
| info.frameRate = AudioPlayHead::fps24; | |||
| break; | |||
| case ficFrameRate_25Frame: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps25; | |||
| info.frameRate = AudioPlayHead::fps25; | |||
| framesPerSec = 25.0; | |||
| break; | |||
| case ficFrameRate_2997NonDrop: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps2997; | |||
| info.frameRate = AudioPlayHead::fps2997; | |||
| framesPerSec = 29.97002997; | |||
| break; | |||
| case ficFrameRate_2997DropFrame: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps2997drop; | |||
| info.frameRate = AudioPlayHead::fps2997drop; | |||
| framesPerSec = 29.97002997; | |||
| break; | |||
| case ficFrameRate_30NonDrop: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps30; | |||
| info.frameRate = AudioPlayHead::fps30; | |||
| framesPerSec = 30.0; | |||
| break; | |||
| case ficFrameRate_30DropFrame: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps30drop; | |||
| info.frameRate = AudioPlayHead::fps30drop; | |||
| framesPerSec = 30.0; | |||
| break; | |||
| case ficFrameRate_23976: | |||
| // xxx not strictly true.. | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fps24; | |||
| info.frameRate = AudioPlayHead::fps24; | |||
| framesPerSec = 23.976; | |||
| break; | |||
| default: | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fpsUnknown; | |||
| info.frameRate = AudioPlayHead::fpsUnknown; | |||
| break; | |||
| } | |||
| @@ -849,38 +857,35 @@ protected: | |||
| return true; | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterChange (int index, float newValue) | |||
| void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) | |||
| { | |||
| if (juceFilter != 0) | |||
| juceFilter->setParameter (index, newValue); | |||
| SetControlValue (index + 2, floatToLong (newValue)); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterGestureBegin (int index) | |||
| void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) | |||
| { | |||
| TouchControl (index + 2); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterGestureEnd (int index) | |||
| void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) | |||
| { | |||
| ReleaseControl (index + 2); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfStateChange() | |||
| void audioProcessorChanged (AudioProcessor*) | |||
| { | |||
| // xxx is there an RTAS equivalent? | |||
| } | |||
| //============================================================================== | |||
| private: | |||
| AudioFilterBase* juceFilter; | |||
| AudioProcessor* juceFilter; | |||
| MidiBuffer midiEvents; | |||
| CEffectMIDIOtherBufferedNode* midiBufferNode; | |||
| CEffectMIDITransport* midiTransport; | |||
| DirectMidiPacket midiBuffer [midiBufferSize]; | |||
| juce::MemoryBlock tempFilterData; | |||
| JUCE_NAMESPACE::MemoryBlock tempFilterData; | |||
| float** channels; | |||
| bool prepared; | |||
| double sampleRate; | |||
| @@ -901,7 +906,7 @@ private: | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JucePluginControl (AudioFilterBase* const juceFilter_, const int index_) | |||
| JucePluginControl (AudioProcessor* const juceFilter_, const int index_) | |||
| : juceFilter (juceFilter_), | |||
| index (index_) | |||
| { | |||
| @@ -951,7 +956,7 @@ private: | |||
| private: | |||
| //============================================================================== | |||
| AudioFilterBase* const juceFilter; | |||
| AudioProcessor* const juceFilter; | |||
| const int index; | |||
| JucePluginControl (const JucePluginControl&); | |||
| @@ -34,7 +34,7 @@ | |||
| //============================================================================== | |||
| AudioFilterStreamer::AudioFilterStreamer (AudioFilterBase& filterToUse) | |||
| AudioFilterStreamer::AudioFilterStreamer (AudioProcessor& filterToUse) | |||
| : filter (filterToUse), | |||
| isPlaying (false), | |||
| sampleRate (0), | |||
| @@ -42,7 +42,7 @@ AudioFilterStreamer::AudioFilterStreamer (AudioFilterBase& filterToUse) | |||
| { | |||
| filter.setPlayConfigDetails (JucePlugin_MaxNumInputChannels, JucePlugin_MaxNumOutputChannels, 0, 0); | |||
| filter.setHostCallbacks (this); | |||
| filter.setPlayHead (this); | |||
| } | |||
| AudioFilterStreamer::~AudioFilterStreamer() | |||
| @@ -132,28 +132,11 @@ void AudioFilterStreamer::handleIncomingMidiMessage (MidiInput* source, const Mi | |||
| #endif | |||
| } | |||
| bool AudioFilterStreamer::getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info) | |||
| bool AudioFilterStreamer::getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info) | |||
| { | |||
| return false; | |||
| } | |||
| void AudioFilterStreamer::informHostOfParameterChange (int index, float newValue) | |||
| { | |||
| filter.setParameter (index, newValue); | |||
| } | |||
| void JUCE_CALLTYPE AudioFilterStreamer::informHostOfParameterGestureBegin (int index) | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE AudioFilterStreamer::informHostOfParameterGestureEnd (int index) | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE AudioFilterStreamer::informHostOfStateChange() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| AudioFilterStreamingDeviceManager::AudioFilterStreamingDeviceManager() | |||
| @@ -167,7 +150,7 @@ AudioFilterStreamingDeviceManager::~AudioFilterStreamingDeviceManager() | |||
| clearSingletonInstance(); | |||
| } | |||
| void AudioFilterStreamingDeviceManager::setFilter (AudioFilterBase* filterToStream) | |||
| void AudioFilterStreamingDeviceManager::setFilter (AudioProcessor* filterToStream) | |||
| { | |||
| if (streamer != 0) | |||
| { | |||
| @@ -32,12 +32,12 @@ | |||
| #ifndef __JUCE_AUDIOFILTERSTREAMER_JUCEHEADER__ | |||
| #define __JUCE_AUDIOFILTERSTREAMER_JUCEHEADER__ | |||
| #include "../../juce_AudioFilterBase.h" | |||
| #include "../../../../../juce.h" | |||
| //============================================================================== | |||
| /** | |||
| A class that wraps an AudioFilterBase as an AudioIODeviceCallback, so its | |||
| A class that wraps an AudioProcessor as an AudioIODeviceCallback, so its | |||
| output can be streamed directly to/from some audio and midi inputs and outputs. | |||
| To use it, just create an instance of this for your filter, and register it | |||
| @@ -51,11 +51,11 @@ | |||
| */ | |||
| class AudioFilterStreamer : public AudioIODeviceCallback, | |||
| public MidiInputCallback, | |||
| public AudioFilterBase::HostCallbacks | |||
| public AudioPlayHead | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| AudioFilterStreamer (AudioFilterBase& filterToUse); | |||
| AudioFilterStreamer (AudioProcessor& filterToUse); | |||
| ~AudioFilterStreamer(); | |||
| @@ -71,17 +71,13 @@ public: | |||
| void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message); | |||
| bool JUCE_CALLTYPE getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info); | |||
| void JUCE_CALLTYPE informHostOfParameterChange (int index, float newValue); | |||
| void JUCE_CALLTYPE informHostOfParameterGestureBegin (int index); | |||
| void JUCE_CALLTYPE informHostOfParameterGestureEnd (int index); | |||
| void JUCE_CALLTYPE informHostOfStateChange(); | |||
| bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info); | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| //============================================================================== | |||
| AudioFilterBase& filter; | |||
| AudioProcessor& filter; | |||
| bool isPlaying; | |||
| double sampleRate; | |||
| MidiMessageCollector midiCollector; | |||
| @@ -118,7 +114,7 @@ public: | |||
| Pass in 0 to deselect the current filter. | |||
| */ | |||
| void setFilter (AudioFilterBase* filterToStream); | |||
| void setFilter (AudioProcessor* filterToStream); | |||
| //============================================================================== | |||
| @@ -32,6 +32,12 @@ | |||
| #include "juce_StandaloneFilterWindow.h" | |||
| #include "../../juce_IncludeCharacteristics.h" | |||
| //============================================================================== | |||
| /** Somewhere in the codebase of your plugin, you need to implement this function | |||
| and make it create an instance of the filter subclass that you're building. | |||
| */ | |||
| extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); | |||
| //============================================================================== | |||
| StandaloneFilterWindow::StandaloneFilterWindow (const String& title, | |||
| @@ -141,7 +147,7 @@ void StandaloneFilterWindow::deleteFilter() | |||
| if (filter != 0 && getContentComponent() != 0) | |||
| { | |||
| filter->editorBeingDeleted (dynamic_cast <AudioFilterEditor*> (getContentComponent())); | |||
| filter->editorBeingDeleted (dynamic_cast <AudioProcessorEditor*> (getContentComponent())); | |||
| setContentComponent (0, true); | |||
| } | |||
| @@ -83,7 +83,7 @@ public: | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| AudioFilterBase* filter; | |||
| AudioProcessor* filter; | |||
| AudioFilterStreamingDeviceManager* deviceManager; | |||
| Button* optionsButton; | |||
| @@ -95,7 +95,7 @@ | |||
| #pragma pack (push, 8) | |||
| #endif | |||
| #include "../../juce_AudioFilterBase.h" | |||
| #include "../../../../../juce.h" | |||
| #ifdef _MSC_VER | |||
| #pragma pack (pop) | |||
| @@ -210,7 +210,7 @@ juce_ImplementSingleton (SharedMessageThread); | |||
| #endif | |||
| //============================================================================== | |||
| // A component to hold the AudioFilterEditor, and cope with some housekeeping | |||
| // A component to hold the AudioProcessorEditor, and cope with some housekeeping | |||
| // chores when it changes or repaints. | |||
| class EditorCompWrapper : public Component, | |||
| public AsyncUpdater | |||
| @@ -219,7 +219,7 @@ class EditorCompWrapper : public Component, | |||
| public: | |||
| EditorCompWrapper (JuceVSTWrapper* const wrapper_, | |||
| AudioFilterEditor* const editor) | |||
| AudioProcessorEditor* const editor) | |||
| : wrapper (wrapper_) | |||
| { | |||
| setOpaque (true); | |||
| @@ -252,9 +252,9 @@ public: | |||
| triggerAsyncUpdate(); | |||
| } | |||
| AudioFilterEditor* getEditorComp() const | |||
| AudioProcessorEditor* getEditorComp() const | |||
| { | |||
| return dynamic_cast <AudioFilterEditor*> (getChildComponent (0)); | |||
| return dynamic_cast <AudioProcessorEditor*> (getChildComponent (0)); | |||
| } | |||
| void resized() | |||
| @@ -304,16 +304,17 @@ static VoidArray activePlugins; | |||
| //============================================================================== | |||
| /** | |||
| This wraps an AudioFilterBase as an AudioEffectX... | |||
| This wraps an AudioProcessor as an AudioEffectX... | |||
| */ | |||
| class JuceVSTWrapper : public AudioEffectX, | |||
| private Timer, | |||
| public AudioFilterBase::HostCallbacks | |||
| public AudioProcessorListener, | |||
| public AudioPlayHead | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JuceVSTWrapper (audioMasterCallback audioMaster, | |||
| AudioFilterBase* const filter_) | |||
| AudioProcessor* const filter_) | |||
| : AudioEffectX (audioMaster, | |||
| filter_->getNumPrograms(), | |||
| filter_->getNumParameters()), | |||
| @@ -323,7 +324,8 @@ public: | |||
| JucePlugin_MaxNumOutputChannels, | |||
| 0, 0); | |||
| filter_->setHostCallbacks (this); | |||
| filter_->setPlayHead (this); | |||
| filter_->addListener (this); | |||
| editorComp = 0; | |||
| outgoingEvents = 0; | |||
| @@ -703,7 +705,7 @@ public: | |||
| channels = 0; | |||
| } | |||
| bool JUCE_CALLTYPE getCurrentPositionInfo (AudioFilterBase::CurrentPositionInfo& info) | |||
| bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info) | |||
| { | |||
| const VstTimeInfo* const ti = getTimeInfo (kVstPpqPosValid | |||
| | kVstTempoValid | |||
| @@ -746,14 +748,14 @@ public: | |||
| if ((ti->flags & kVstSmpteValid) != 0) | |||
| { | |||
| info.frameRate = (AudioFilterBase::CurrentPositionInfo::FrameRateType) (int) ti->smpteFrameRate; | |||
| info.frameRate = (AudioPlayHead::FrameRateType) (int) ti->smpteFrameRate; | |||
| const double fpsDivisors[] = { 24.0, 25.0, 30.0, 30.0, 30.0, 30.0, 1.0 }; | |||
| info.editOriginTime = (ti->smpteOffset / (80.0 * fpsDivisors [(int) info.frameRate])); | |||
| } | |||
| else | |||
| { | |||
| info.frameRate = AudioFilterBase::CurrentPositionInfo::fpsUnknown; | |||
| info.frameRate = AudioPlayHead::fpsUnknown; | |||
| info.editOriginTime = 0; | |||
| } | |||
| @@ -820,22 +822,22 @@ public: | |||
| filter->getParameterName (index).copyToBuffer (text, 16); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterChange (int index, float newValue) | |||
| void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue) | |||
| { | |||
| setParameterAutomated (index, newValue); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterGestureBegin (int index) | |||
| void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index) | |||
| { | |||
| beginEdit (index); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfParameterGestureEnd (int index) | |||
| void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index) | |||
| { | |||
| endEdit (index); | |||
| } | |||
| void JUCE_CALLTYPE informHostOfStateChange() | |||
| void audioProcessorChanged (AudioProcessor*) | |||
| { | |||
| updateDisplay(); | |||
| } | |||
| @@ -939,7 +941,7 @@ public: | |||
| const MessageManagerLock mml; | |||
| #endif | |||
| AudioFilterEditor* const ed = filter->createEditorIfNeeded(); | |||
| AudioProcessorEditor* const ed = filter->createEditorIfNeeded(); | |||
| if (ed != 0) | |||
| { | |||
| @@ -1198,7 +1200,7 @@ public: | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| AudioFilterBase* filter; | |||
| AudioProcessor* filter; | |||
| juce::MemoryBlock chunkMemory; | |||
| uint32 chunkMemoryTime; | |||
| EditorCompWrapper* editorComp; | |||
| @@ -1274,6 +1276,13 @@ void EditorCompWrapper::handleAsyncUpdate() | |||
| wrapper->tryMasterIdle(); | |||
| } | |||
| //============================================================================== | |||
| /** Somewhere in the codebase of your plugin, you need to implement this function | |||
| and make it create an instance of the filter subclass that you're building. | |||
| */ | |||
| extern AudioProcessor* JUCE_CALLTYPE createPluginFilter(); | |||
| //============================================================================== | |||
| static AEffect* pluginEntryPoint (audioMasterCallback audioMaster) | |||
| { | |||
| @@ -1287,7 +1296,7 @@ static AEffect* pluginEntryPoint (audioMasterCallback audioMaster) | |||
| { | |||
| if (audioMaster (0, audioMasterVersion, 0, 0, 0, 0) != 0) | |||
| { | |||
| AudioFilterBase* const filter = createPluginFilter(); | |||
| AudioProcessor* const filter = createPluginFilter(); | |||
| if (filter != 0) | |||
| { | |||
| @@ -80,7 +80,7 @@ | |||
| #endif | |||
| #ifdef JucePlugin_Latency | |||
| #error "JucePlugin_Latency is now deprecated - instead, call the AudioFilterBase::setLatencySamples() method if your plugin has a non-zero delay" | |||
| #error "JucePlugin_Latency is now deprecated - instead, call the AudioProcessor::setLatencySamples() method if your plugin has a non-zero delay" | |||
| #endif | |||
| #ifndef JucePlugin_SilenceInProducesSilenceOut | |||
| @@ -7928,4 +7928,3 @@ static const unsigned char temp17[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61 | |||
| 110,100,77,97,110,97,103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114, | |||
| 110,32,110,101,119,32,87,105,100,103,101,116,115,68,101,109,111,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,59,13,10,125,13,10,0,0}; | |||
| const char* BinaryData::widgetsdemo_cpp = (const char*) temp17; | |||
| @@ -92,16 +92,16 @@ public: | |||
| String formatDescription; | |||
| formatDescription | |||
| << i << ": RGBA=(" << pixFormat->redBits | |||
| << ", " << pixFormat->greenBits | |||
| << i << ": RGBA=(" << pixFormat->redBits | |||
| << ", " << pixFormat->greenBits | |||
| << ", " << pixFormat->blueBits | |||
| << ", " << pixFormat->alphaBits | |||
| << "), depth=" << pixFormat->depthBufferBits | |||
| << ", stencil=" << pixFormat->stencilBufferBits | |||
| << ", accum RGBA=(" << pixFormat->accumulationBufferRedBits | |||
| << ", " << pixFormat->accumulationBufferGreenBits | |||
| << ", accum RGBA=(" << pixFormat->accumulationBufferRedBits | |||
| << ", " << pixFormat->accumulationBufferGreenBits | |||
| << ", " << pixFormat->accumulationBufferBlueBits | |||
| << ", " << pixFormat->accumulationBufferAlphaBits | |||
| << ", " << pixFormat->accumulationBufferAlphaBits | |||
| << "), full-scene AA=" | |||
| << pixFormat->fullSceneAntiAliasingNumSamples; | |||
| @@ -86,6 +86,21 @@ | |||
| #ifndef __JUCE_IIRFILTER_JUCEHEADER__ | |||
| #include "juce_appframework/audio/dsp/juce_IIRFilter.h" | |||
| #endif | |||
| #ifndef __JUCE_AUDIOPLAYHEAD_JUCEHEADER__ | |||
| #include "juce_appframework/audio/processors/juce_AudioPlayHead.h" | |||
| #endif | |||
| #ifndef __JUCE_AUDIOPROCESSOR_JUCEHEADER__ | |||
| #include "juce_appframework/audio/processors/juce_AudioProcessor.h" | |||
| #endif | |||
| #ifndef __JUCE_AUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #include "juce_appframework/audio/processors/juce_AudioProcessorEditor.h" | |||
| #endif | |||
| #ifndef __JUCE_AUDIOPROCESSORLISTENER_JUCEHEADER__ | |||
| #include "juce_appframework/audio/processors/juce_AudioProcessorListener.h" | |||
| #endif | |||
| #ifndef __JUCE_GENERICAUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #include "juce_appframework/audio/processors/juce_GenericAudioProcessorEditor.h" | |||
| #endif | |||
| #ifndef __JUCE_AUDIOFORMATREADERSOURCE_JUCEHEADER__ | |||
| #include "juce_appframework/audio/audio_sources/juce_AudioFormatReaderSource.h" | |||
| #endif | |||
| @@ -29,12 +29,18 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "juce_AudioFilterBase.h" | |||
| #include "../../../juce_core/basics/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "juce_AudioProcessor.h" | |||
| #include "../../../juce_core/threads/juce_ScopedLock.h" | |||
| #include "../../../juce_core/text/juce_XmlDocument.h" | |||
| //============================================================================== | |||
| AudioFilterBase::AudioFilterBase() | |||
| : callbacks (0), | |||
| AudioProcessor::AudioProcessor() | |||
| : playHead (0), | |||
| activeEditor (0), | |||
| sampleRate (0), | |||
| blockSize (0), | |||
| @@ -45,7 +51,7 @@ AudioFilterBase::AudioFilterBase() | |||
| { | |||
| } | |||
| AudioFilterBase::~AudioFilterBase() | |||
| AudioProcessor::~AudioProcessor() | |||
| { | |||
| // ooh, nasty - the editor should have been deleted before the filter | |||
| // that it refers to is deleted.. | |||
| @@ -56,15 +62,27 @@ AudioFilterBase::~AudioFilterBase() | |||
| jassert (changingParams.countNumberOfSetBits() == 0); | |||
| } | |||
| void AudioFilterBase::setHostCallbacks (HostCallbacks* const callbacks_) throw() | |||
| void AudioProcessor::setPlayHead (AudioPlayHead* const newPlayHead) throw() | |||
| { | |||
| playHead = newPlayHead; | |||
| } | |||
| void AudioProcessor::addListener (AudioProcessorListener* const newListener) throw() | |||
| { | |||
| callbacks = callbacks_; | |||
| const ScopedLock sl (listenerLock); | |||
| listeners.addIfNotAlreadyThere (newListener); | |||
| } | |||
| void AudioFilterBase::setPlayConfigDetails (const int numIns, | |||
| const int numOuts, | |||
| const double sampleRate_, | |||
| const int blockSize_) throw() | |||
| void AudioProcessor::removeListener (AudioProcessorListener* const listenerToRemove) throw() | |||
| { | |||
| const ScopedLock sl (listenerLock); | |||
| listeners.removeValue (listenerToRemove); | |||
| } | |||
| void AudioProcessor::setPlayConfigDetails (const int numIns, | |||
| const int numOuts, | |||
| const double sampleRate_, | |||
| const int blockSize_) throw() | |||
| { | |||
| numInputChannels = numIns; | |||
| numOutputChannels = numOuts; | |||
| @@ -72,7 +90,7 @@ void AudioFilterBase::setPlayConfigDetails (const int numIns, | |||
| blockSize = blockSize_; | |||
| } | |||
| void JUCE_CALLTYPE AudioFilterBase::setLatencySamples (const int newLatency) | |||
| void AudioProcessor::setLatencySamples (const int newLatency) | |||
| { | |||
| if (latencySamples != newLatency) | |||
| { | |||
| @@ -81,18 +99,29 @@ void JUCE_CALLTYPE AudioFilterBase::setLatencySamples (const int newLatency) | |||
| } | |||
| } | |||
| void AudioFilterBase::setParameterNotifyingHost (const int parameterIndex, | |||
| const float newValue) | |||
| void AudioProcessor::setParameterNotifyingHost (const int parameterIndex, | |||
| const float newValue) | |||
| { | |||
| setParameter (parameterIndex, newValue); | |||
| sendParamChangeMessageToListeners (parameterIndex, newValue); | |||
| } | |||
| void AudioProcessor::sendParamChangeMessageToListeners (const int parameterIndex, const float newValue) | |||
| { | |||
| jassert (parameterIndex >= 0 && parameterIndex < getNumParameters()); | |||
| if (callbacks != 0) | |||
| callbacks->informHostOfParameterChange (parameterIndex, newValue); | |||
| else | |||
| setParameter (parameterIndex, newValue); | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| listenerLock.enter(); | |||
| AudioProcessorListener* const l = (AudioProcessorListener*) listeners [i]; | |||
| listenerLock.exit(); | |||
| if (l != 0) | |||
| l->audioProcessorParameterChanged (this, parameterIndex, newValue); | |||
| } | |||
| } | |||
| void AudioFilterBase::beginParameterChangeGesture (int parameterIndex) | |||
| void AudioProcessor::beginParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (parameterIndex >= 0 && parameterIndex < getNumParameters()); | |||
| @@ -100,49 +129,63 @@ void AudioFilterBase::beginParameterChangeGesture (int parameterIndex) | |||
| // call to endParameterChangeGesture. That might be fine in most hosts, but better to avoid doing it. | |||
| jassert (! changingParams [parameterIndex]); | |||
| if (callbacks != 0) | |||
| callbacks->informHostOfParameterGestureBegin (parameterIndex); | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| listenerLock.enter(); | |||
| AudioProcessorListener* const l = (AudioProcessorListener*) listeners [i]; | |||
| listenerLock.exit(); | |||
| if (l != 0) | |||
| l->audioProcessorParameterChangeGestureBegin (this, parameterIndex); | |||
| } | |||
| } | |||
| void AudioFilterBase::endParameterChangeGesture (int parameterIndex) | |||
| void AudioProcessor::endParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (parameterIndex >= 0 && parameterIndex < getNumParameters()); | |||
| // This means you've called endParameterChangeGesture without having previously called | |||
| // endParameterChangeGesture. That might be fine in most hosts, but better to keep the | |||
| // This means you've called endParameterChangeGesture without having previously called | |||
| // endParameterChangeGesture. That might be fine in most hosts, but better to keep the | |||
| // calls matched correctly. | |||
| jassert (changingParams [parameterIndex]); | |||
| if (callbacks != 0) | |||
| callbacks->informHostOfParameterGestureEnd (parameterIndex); | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| listenerLock.enter(); | |||
| AudioProcessorListener* const l = (AudioProcessorListener*) listeners [i]; | |||
| listenerLock.exit(); | |||
| if (l != 0) | |||
| l->audioProcessorParameterChangeGestureEnd (this, parameterIndex); | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE AudioFilterBase::updateHostDisplay() | |||
| void AudioProcessor::updateHostDisplay() | |||
| { | |||
| if (callbacks != 0) | |||
| callbacks->informHostOfStateChange(); | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| listenerLock.enter(); | |||
| AudioProcessorListener* const l = (AudioProcessorListener*) listeners [i]; | |||
| listenerLock.exit(); | |||
| if (l != 0) | |||
| l->audioProcessorChanged (this); | |||
| } | |||
| } | |||
| bool AudioFilterBase::isParameterAutomatable (int /*index*/) const | |||
| bool AudioProcessor::isParameterAutomatable (int /*index*/) const | |||
| { | |||
| return true; | |||
| } | |||
| void AudioFilterBase::suspendProcessing (const bool shouldBeSuspended) | |||
| void AudioProcessor::suspendProcessing (const bool shouldBeSuspended) | |||
| { | |||
| const ScopedLock sl (callbackLock); | |||
| suspended = shouldBeSuspended; | |||
| } | |||
| //============================================================================== | |||
| bool AudioFilterBase::getCurrentPositionInfo (CurrentPositionInfo& info) | |||
| { | |||
| return callbacks != 0 | |||
| && callbacks->getCurrentPositionInfo (info); | |||
| } | |||
| //============================================================================== | |||
| void AudioFilterBase::editorBeingDeleted (AudioFilterEditor* const editor) throw() | |||
| void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) throw() | |||
| { | |||
| const ScopedLock sl (callbackLock); | |||
| @@ -152,19 +195,17 @@ void AudioFilterBase::editorBeingDeleted (AudioFilterEditor* const editor) throw | |||
| activeEditor = 0; | |||
| } | |||
| AudioFilterEditor* AudioFilterBase::createEditorIfNeeded() | |||
| AudioProcessorEditor* AudioProcessor::createEditorIfNeeded() | |||
| { | |||
| if (activeEditor != 0) | |||
| return activeEditor; | |||
| AudioFilterEditor* const ed = createEditor(); | |||
| AudioProcessorEditor* const ed = createEditor(); | |||
| if (ed != 0) | |||
| { | |||
| #if ! JUCE_PLUGIN_HOST | |||
| // you must give your editor comp a size before returning it.. | |||
| jassert (ed->getWidth() > 0 && ed->getHeight() > 0); | |||
| #endif | |||
| const ScopedLock sl (callbackLock); | |||
| activeEditor = ed; | |||
| @@ -174,12 +215,12 @@ AudioFilterEditor* AudioFilterBase::createEditorIfNeeded() | |||
| } | |||
| //============================================================================== | |||
| void AudioFilterBase::getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) | |||
| void AudioProcessor::getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) | |||
| { | |||
| getStateInformation (destData); | |||
| } | |||
| void AudioFilterBase::setCurrentProgramStateInformation (const void* data, int sizeInBytes) | |||
| void AudioProcessor::setCurrentProgramStateInformation (const void* data, int sizeInBytes) | |||
| { | |||
| setStateInformation (data, sizeInBytes); | |||
| } | |||
| @@ -188,8 +229,8 @@ void AudioFilterBase::setCurrentProgramStateInformation (const void* data, int s | |||
| // magic number to identify memory blocks that we've stored as XML | |||
| const uint32 magicXmlNumber = 0x21324356; | |||
| void AudioFilterBase::copyXmlToBinary (const XmlElement& xml, | |||
| JUCE_NAMESPACE::MemoryBlock& destData) | |||
| void AudioProcessor::copyXmlToBinary (const XmlElement& xml, | |||
| JUCE_NAMESPACE::MemoryBlock& destData) | |||
| { | |||
| const String xmlString (xml.createDocument (String::empty, true, false)); | |||
| const int stringLength = xmlString.length(); | |||
| @@ -203,8 +244,8 @@ void AudioFilterBase::copyXmlToBinary (const XmlElement& xml, | |||
| xmlString.copyToBuffer (d + 8, stringLength); | |||
| } | |||
| XmlElement* AudioFilterBase::getXmlFromBinary (const void* data, | |||
| const int sizeInBytes) | |||
| XmlElement* AudioProcessor::getXmlFromBinary (const void* data, | |||
| const int sizeInBytes) | |||
| { | |||
| if (sizeInBytes > 8 | |||
| && littleEndianInt ((const char*) data) == magicXmlNumber) | |||
| @@ -222,3 +263,15 @@ XmlElement* AudioFilterBase::getXmlFromBinary (const void* data, | |||
| return 0; | |||
| } | |||
| //============================================================================== | |||
| void AudioProcessorListener::audioProcessorParameterChangeGestureBegin (AudioProcessor*, int) | |||
| { | |||
| } | |||
| void AudioProcessorListener::audioProcessorParameterChangeGestureEnd (AudioProcessor*, int) | |||
| { | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -29,29 +29,32 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_AUDIOFILTERBASE_JUCEHEADER__ | |||
| #define __JUCE_AUDIOFILTERBASE_JUCEHEADER__ | |||
| #ifndef __JUCE_AUDIOPROCESSOR_JUCEHEADER__ | |||
| #define __JUCE_AUDIOPROCESSOR_JUCEHEADER__ | |||
| #include "../../../juce.h" | |||
| #include "juce_AudioFilterEditor.h" | |||
| #undef MemoryBlock | |||
| #include "juce_AudioProcessorEditor.h" | |||
| #include "../dsp/juce_AudioSampleBuffer.h" | |||
| #include "../midi/juce_MidiBuffer.h" | |||
| #include "../../../juce_core/containers/juce_BitArray.h" | |||
| #include "juce_AudioProcessorListener.h" | |||
| #include "juce_AudioPlayHead.h" | |||
| //============================================================================== | |||
| /** | |||
| Base class for audio filters or plugins written using JUCE. | |||
| Base class for audio processing filters or plugins. | |||
| This is intended to act as a base class of audio filter that is general enough to | |||
| be wrapped as a VST, AU, RTAS, etc, or used internally. | |||
| It is also used by the plugin hosting code as the wrapper around an instance | |||
| It is also used by the plugin hosting code as the wrapper around an instance | |||
| of a loaded plugin. | |||
| Derive your filter class from this base class, and if you're building a plugin, | |||
| you should implement a global function called initialiseFilterInfo() which creates | |||
| you should implement a global function called createPluginFilter() which creates | |||
| and returns a new instance of your subclass. | |||
| */ | |||
| class AudioFilterBase | |||
| class JUCE_API AudioProcessor | |||
| { | |||
| protected: | |||
| //============================================================================== | |||
| @@ -60,11 +63,11 @@ protected: | |||
| You can also do your initialisation tasks in the initialiseFilterInfo() | |||
| call, which will be made after this object has been created. | |||
| */ | |||
| AudioFilterBase(); | |||
| AudioProcessor(); | |||
| public: | |||
| /** Destructor. */ | |||
| virtual ~AudioFilterBase(); | |||
| virtual ~AudioProcessor(); | |||
| //============================================================================== | |||
| /** Called before playback starts, to let the filter prepare itself. | |||
| @@ -77,13 +80,13 @@ public: | |||
| of guarantee. The actual block sizes that the host uses may be different | |||
| each time the callback happens, and may be more or less than this value. | |||
| */ | |||
| virtual void JUCE_CALLTYPE prepareToPlay (double sampleRate, | |||
| int estimatedSamplesPerBlock) = 0; | |||
| virtual void prepareToPlay (double sampleRate, | |||
| int estimatedSamplesPerBlock) = 0; | |||
| /** Called after playback has stopped, to let the filter free up any resources it | |||
| no longer needs. | |||
| */ | |||
| virtual void JUCE_CALLTYPE releaseResources() = 0; | |||
| virtual void releaseResources() = 0; | |||
| /** Renders the next block. | |||
| @@ -98,31 +101,31 @@ public: | |||
| the contents of all 4 channels with its output. | |||
| Or if your filter has 5 inputs and 2 outputs, the buffer will have 5 channels, | |||
| all filled with data, and your filter should overwrite the first 2 of these | |||
| with its output. But be VERY careful not to write anything to the last 3 | |||
| all filled with data, and your filter should overwrite the first 2 of these | |||
| with its output. But be VERY careful not to write anything to the last 3 | |||
| channels, as these might be mapped to memory that the host assumes is read-only! | |||
| Note that if you have more outputs than inputs, then only those channels that | |||
| correspond to an input channel are guaranteed to contain sensible data - e.g. | |||
| Note that if you have more outputs than inputs, then only those channels that | |||
| correspond to an input channel are guaranteed to contain sensible data - e.g. | |||
| in the case of 2 inputs and 4 outputs, the first two channels contain the input, | |||
| but the last two channels may contain garbage, so you should be careful not to | |||
| but the last two channels may contain garbage, so you should be careful not to | |||
| let this pass through without being overwritten or cleared. | |||
| Also note that the buffer may have more channels than are strictly necessary, | |||
| but your should only read/write from the ones that your filter is supposed to | |||
| be using. | |||
| The number of samples in these buffers is NOT guaranteed to be the same for every | |||
| callback, and may be more or less than the estimated value given to prepareToPlay(). | |||
| Your code must be able to cope with variable-sized blocks, or you're going to get | |||
| The number of samples in these buffers is NOT guaranteed to be the same for every | |||
| callback, and may be more or less than the estimated value given to prepareToPlay(). | |||
| Your code must be able to cope with variable-sized blocks, or you're going to get | |||
| clicks and crashes! | |||
| If the filter is receiving a midi input, then the midiMessages array will be filled | |||
| with the midi messages for this block. Each message's timestamp will indicate the | |||
| If the filter is receiving a midi input, then the midiMessages array will be filled | |||
| with the midi messages for this block. Each message's timestamp will indicate the | |||
| message's time, as a number of samples from the start of the block. | |||
| Any messages left in the midi buffer when this method has finished are assumed to | |||
| be the filter's midi output. This means that your filter should be careful to | |||
| be the filter's midi output. This means that your filter should be careful to | |||
| clear any incoming messages from the array if it doesn't want them to be passed-on. | |||
| Be very careful about what you do in this callback - it's going to be called by | |||
| @@ -133,80 +136,21 @@ public: | |||
| processBlock() method to send out an asynchronous message. You could also use | |||
| the AsyncUpdater class in a similar way. | |||
| */ | |||
| virtual void JUCE_CALLTYPE processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages) = 0; | |||
| virtual void processBlock (AudioSampleBuffer& buffer, | |||
| MidiBuffer& midiMessages) = 0; | |||
| //============================================================================== | |||
| /** Structure containing details of the playback position. | |||
| /** Returns the current AudioPlayHead object that should be used to find | |||
| out the state and position of the playhead. | |||
| @see AudioFilterBase::getCurrentPositionInfo | |||
| */ | |||
| struct CurrentPositionInfo | |||
| { | |||
| /** The tempo in BPM */ | |||
| double bpm; | |||
| /** Time signature numerator, e.g. the 3 of a 3/4 time sig */ | |||
| int timeSigNumerator; | |||
| /** Time signature denominator, e.g. the 4 of a 3/4 time sig */ | |||
| int timeSigDenominator; | |||
| /** The current play position, in seconds from the start of the edit. */ | |||
| double timeInSeconds; | |||
| /** For timecode, the position of the start of the edit, in seconds from 00:00:00:00. */ | |||
| double editOriginTime; | |||
| /** The current play position in pulses-per-quarter-note. | |||
| This is the number of quarter notes since the edit start. | |||
| */ | |||
| double ppqPosition; | |||
| /** The position of the start of the last bar, in pulses-per-quarter-note. | |||
| This is the number of quarter notes from the start of the edit to the | |||
| start of the current bar. | |||
| Note - this value may be unavailable on some hosts, e.g. Pro-Tools. If | |||
| it's not available, the value will be 0. | |||
| */ | |||
| double ppqPositionOfLastBarStart; | |||
| /** Frame rate types */ | |||
| enum FrameRateType | |||
| { | |||
| fps24 = 0, | |||
| fps25 = 1, | |||
| fps2997 = 2, | |||
| fps30 = 3, | |||
| fps2997drop = 4, | |||
| fps30drop = 5, | |||
| fpsUnknown = 99 | |||
| }; | |||
| /** The video frame rate, if applicable. */ | |||
| FrameRateType frameRate; | |||
| /** True if the transport is currently playing. */ | |||
| bool isPlaying; | |||
| /** True if the transport is currently recording. | |||
| (When isRecording is true, then isPlaying will also be true). | |||
| */ | |||
| bool isRecording; | |||
| }; | |||
| You can call this from your processBlock() method, and use the AudioPlayHead | |||
| object to get the details about the time of the start of the block currently | |||
| being processed. | |||
| /** Asks the host to return the current playback position. | |||
| You can call this from your processBlock() method to get info about | |||
| the time of the start of the block currently being processed. | |||
| If the host can't supply this for some reason, this will return false, otherwise | |||
| it'll fill in the structure passed in. | |||
| If the host hasn't supplied a playhead object, this will return 0. | |||
| */ | |||
| bool JUCE_CALLTYPE getCurrentPositionInfo (CurrentPositionInfo& info); | |||
| AudioPlayHead* getPlayHead() const throw() { return playHead; } | |||
| //============================================================================== | |||
| /** Returns the current sample rate. | |||
| @@ -214,7 +158,7 @@ public: | |||
| This can be called from your processBlock() method - it's not guaranteed | |||
| to be valid at any other time, and may return 0 if it's unknown. | |||
| */ | |||
| double JUCE_CALLTYPE getSampleRate() const throw() { return sampleRate; } | |||
| double getSampleRate() const throw() { return sampleRate; } | |||
| /** Returns the current typical block size that is being used. | |||
| @@ -225,65 +169,65 @@ public: | |||
| processBlock, it's just the normal one. The actual block sizes used may be | |||
| larger or smaller than this, and will vary between successive calls. | |||
| */ | |||
| int JUCE_CALLTYPE getBlockSize() const throw() { return blockSize; } | |||
| int getBlockSize() const throw() { return blockSize; } | |||
| //============================================================================== | |||
| /** Returns the number of input channels that the host will be sending the filter. | |||
| In your JucePluginCharacteristics.h file, you specify the number of channels | |||
| that your filter would prefer to get, and this method lets you know how | |||
| many the host is actually going to send. | |||
| If writing a plugin, your JucePluginCharacteristics.h file should specify the | |||
| number of channels that your filter would prefer to have, and this method lets | |||
| you know how many the host is actually using. | |||
| Note that this method is only valid during or after the prepareToPlay() | |||
| method call. Until that point, the number of channels will be unknown. | |||
| */ | |||
| int JUCE_CALLTYPE getNumInputChannels() const throw() { return numInputChannels; } | |||
| int getNumInputChannels() const throw() { return numInputChannels; } | |||
| /** Returns the number of output channels that the host will be sending the filter. | |||
| In your JucePluginCharacteristics.h file, you specify the number of channels | |||
| that your filter would prefer to get, and this method lets you know how | |||
| many the host is actually going to send. | |||
| If writing a plugin, your JucePluginCharacteristics.h file should specify the | |||
| number of channels that your filter would prefer to have, and this method lets | |||
| you know how many the host is actually using. | |||
| Note that this method is only valid during or after the prepareToPlay() | |||
| method call. Until that point, the number of channels will be unknown. | |||
| */ | |||
| int JUCE_CALLTYPE getNumOutputChannels() const throw() { return numOutputChannels; } | |||
| int getNumOutputChannels() const throw() { return numOutputChannels; } | |||
| /** Returns the name of one of the input channels, as returned by the host. | |||
| The host might not supply very useful names for channels, and this might be | |||
| something like "1", "2", "left", "right", etc. | |||
| */ | |||
| virtual const String JUCE_CALLTYPE getInputChannelName (const int channelIndex) const = 0; | |||
| virtual const String getInputChannelName (const int channelIndex) const = 0; | |||
| /** Returns the name of one of the output channels, as returned by the host. | |||
| The host might not supply very useful names for channels, and this might be | |||
| something like "1", "2", "left", "right", etc. | |||
| */ | |||
| virtual const String JUCE_CALLTYPE getOutputChannelName (const int channelIndex) const = 0; | |||
| virtual const String getOutputChannelName (const int channelIndex) const = 0; | |||
| /** Returns true if the specified channel is part of a stereo pair with its neighbour. */ | |||
| virtual bool JUCE_CALLTYPE isInputChannelStereoPair (int index) const = 0; | |||
| virtual bool isInputChannelStereoPair (int index) const = 0; | |||
| /** Returns true if the specified channel is part of a stereo pair with its neighbour. */ | |||
| virtual bool JUCE_CALLTYPE isOutputChannelStereoPair (int index) const = 0; | |||
| virtual bool isOutputChannelStereoPair (int index) const = 0; | |||
| /** This returns the number of samples delay that the filter imposes on the audio | |||
| /** This returns the number of samples delay that the filter imposes on the audio | |||
| passing through it. | |||
| The host will call this to find the latency - the filter itself should set this value | |||
| by calling setLatencySamples() as soon as it can during its initialisation. | |||
| */ | |||
| int JUCE_CALLTYPE getLatencySamples() const throw() { return latencySamples; } | |||
| int getLatencySamples() const throw() { return latencySamples; } | |||
| /** The filter should call this to set the number of samples delay that it introduces. | |||
| The filter should call this as soon as it can during initialisation, and can call it | |||
| later if the value changes. | |||
| */ | |||
| void JUCE_CALLTYPE setLatencySamples (const int newLatency); | |||
| void setLatencySamples (const int newLatency); | |||
| //============================================================================== | |||
| /** This returns a critical section that will automatically be locked while the host | |||
| @@ -297,7 +241,7 @@ public: | |||
| @see suspendProcessing | |||
| */ | |||
| const CriticalSection& JUCE_CALLTYPE getCallbackLock() const throw() { return callbackLock; } | |||
| const CriticalSection& getCallbackLock() const throw() { return callbackLock; } | |||
| /** Enables and disables the processing callback. | |||
| @@ -323,19 +267,19 @@ public: | |||
| @see getCallbackLock | |||
| */ | |||
| void JUCE_CALLTYPE suspendProcessing (const bool shouldBeSuspended); | |||
| void suspendProcessing (const bool shouldBeSuspended); | |||
| /** Returns true if processing is currently suspended. | |||
| @see suspendProcessing | |||
| */ | |||
| bool JUCE_CALLTYPE isSuspended() const throw() { return suspended; } | |||
| bool isSuspended() const throw() { return suspended; } | |||
| //============================================================================== | |||
| /** Creates the filter's UI. | |||
| This can return 0 if you want a UI-less filter, in which case the host may create | |||
| a generic UI that lets the user twiddle the parameters directly. | |||
| a generic UI that lets the user twiddle the parameters directly. | |||
| If you do want to pass back a component, the component should be created and set to | |||
| the correct size before returning it. | |||
| @@ -355,7 +299,7 @@ public: | |||
| - An editor object may be deleted and a replacement one created again at any time. | |||
| - It's safe to assume that an editor will be deleted before its filter. | |||
| */ | |||
| virtual AudioFilterEditor* JUCE_CALLTYPE createEditor() = 0; | |||
| virtual AudioProcessorEditor* createEditor() = 0; | |||
| //============================================================================== | |||
| /** Returns the active editor, if there is one. | |||
| @@ -363,22 +307,22 @@ public: | |||
| Bear in mind this can return 0, even if an editor has previously been | |||
| opened. | |||
| */ | |||
| AudioFilterEditor* JUCE_CALLTYPE getActiveEditor() const throw() { return activeEditor; } | |||
| AudioProcessorEditor* getActiveEditor() const throw() { return activeEditor; } | |||
| /** Returns the active editor, or if there isn't one, it will create one. | |||
| This may call createEditor() internally to create the component. | |||
| */ | |||
| AudioFilterEditor* JUCE_CALLTYPE createEditorIfNeeded(); | |||
| AudioProcessorEditor* createEditorIfNeeded(); | |||
| //============================================================================== | |||
| /** This must return the correct value immediately after the object has been | |||
| created, and mustn't change the number of parameters later. | |||
| */ | |||
| virtual int JUCE_CALLTYPE getNumParameters() = 0; | |||
| virtual int getNumParameters() = 0; | |||
| /** Returns the name of a particular parameter. */ | |||
| virtual const String JUCE_CALLTYPE getParameterName (int parameterIndex) = 0; | |||
| virtual const String getParameterName (int parameterIndex) = 0; | |||
| /** Called by the host to find out the value of one of the filter's parameters. | |||
| @@ -388,10 +332,10 @@ public: | |||
| It's also likely to be called by non-UI threads, so the code in here should | |||
| be thread-aware. | |||
| */ | |||
| virtual float JUCE_CALLTYPE getParameter (int parameterIndex) = 0; | |||
| virtual float getParameter (int parameterIndex) = 0; | |||
| /** Returns the value of a parameter as a text string. */ | |||
| virtual const String JUCE_CALLTYPE getParameterText (int parameterIndex) = 0; | |||
| virtual const String getParameterText (int parameterIndex) = 0; | |||
| /** The host will call this method to change the value of one of the filter's parameters. | |||
| @@ -406,8 +350,8 @@ public: | |||
| The value passed will be between 0 and 1.0. | |||
| */ | |||
| virtual void JUCE_CALLTYPE setParameter (int parameterIndex, | |||
| float newValue) = 0; | |||
| virtual void setParameter (int parameterIndex, | |||
| float newValue) = 0; | |||
| /** Your filter can call this when it needs to change one of its parameters. | |||
| @@ -415,12 +359,12 @@ public: | |||
| a parameter. This method will call the setParameter() method to change the | |||
| value, and will then send a message to the host telling it about the change. | |||
| Note that to make sure the host correctly handles automation, you should call | |||
| the beginParameterChangeGesture() and endParameterChangeGesture() methods to | |||
| Note that to make sure the host correctly handles automation, you should call | |||
| the beginParameterChangeGesture() and endParameterChangeGesture() methods to | |||
| tell the host when the user has started and stopped changing the parameter. | |||
| */ | |||
| void JUCE_CALLTYPE setParameterNotifyingHost (int parameterIndex, | |||
| float newValue); | |||
| void setParameterNotifyingHost (int parameterIndex, | |||
| float newValue); | |||
| /** Returns true if the host can automate this parameter. | |||
| @@ -452,7 +396,7 @@ public: | |||
| It sends a hint to the host that something like the program, number of parameters, | |||
| etc, has changed, and that it should update itself. | |||
| */ | |||
| void JUCE_CALLTYPE updateHostDisplay(); | |||
| void updateHostDisplay(); | |||
| //============================================================================== | |||
| /** Returns the number of preset programs the filter supports. | |||
| @@ -462,22 +406,22 @@ public: | |||
| This value shouldn't be less than 1. | |||
| */ | |||
| virtual int JUCE_CALLTYPE getNumPrograms() = 0; | |||
| virtual int getNumPrograms() = 0; | |||
| /** Returns the number of the currently active program. | |||
| */ | |||
| virtual int JUCE_CALLTYPE getCurrentProgram() = 0; | |||
| virtual int getCurrentProgram() = 0; | |||
| /** Called by the host to change the current program. | |||
| */ | |||
| virtual void JUCE_CALLTYPE setCurrentProgram (int index) = 0; | |||
| virtual void setCurrentProgram (int index) = 0; | |||
| /** Must return the name of a given program. */ | |||
| virtual const String JUCE_CALLTYPE getProgramName (int index) = 0; | |||
| virtual const String getProgramName (int index) = 0; | |||
| /** Called by the host to rename a program. | |||
| */ | |||
| virtual void JUCE_CALLTYPE changeProgramName (int index, const String& newName) = 0; | |||
| virtual void changeProgramName (int index, const String& newName) = 0; | |||
| //============================================================================== | |||
| /** The host will call this method when it wants to save the filter's internal state. | |||
| @@ -492,7 +436,7 @@ public: | |||
| @see getCurrentProgramStateInformation | |||
| */ | |||
| virtual void JUCE_CALLTYPE getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) = 0; | |||
| virtual void getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) = 0; | |||
| /** The host will call this method if it wants to save the state of just the filter's | |||
| current program. | |||
| @@ -505,7 +449,7 @@ public: | |||
| @see getStateInformation, setCurrentProgramStateInformation | |||
| */ | |||
| virtual void JUCE_CALLTYPE getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); | |||
| virtual void getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); | |||
| /** This must restore the filter's state from a block of data previously created | |||
| using getStateInformation(). | |||
| @@ -517,7 +461,7 @@ public: | |||
| @see setCurrentProgramStateInformation | |||
| */ | |||
| virtual void JUCE_CALLTYPE setStateInformation (const void* data, int sizeInBytes) = 0; | |||
| virtual void setStateInformation (const void* data, int sizeInBytes) = 0; | |||
| /** The host will call this method if it wants to restore the state of just the filter's | |||
| current program. | |||
| @@ -528,42 +472,25 @@ public: | |||
| @see setStateInformation, getCurrentProgramStateInformation | |||
| */ | |||
| virtual void JUCE_CALLTYPE setCurrentProgramStateInformation (const void* data, int sizeInBytes); | |||
| virtual void setCurrentProgramStateInformation (const void* data, int sizeInBytes); | |||
| //============================================================================== | |||
| /** @internal */ | |||
| class HostCallbacks | |||
| { | |||
| public: | |||
| virtual ~HostCallbacks() {} | |||
| virtual bool JUCE_CALLTYPE getCurrentPositionInfo (CurrentPositionInfo& info) = 0; | |||
| virtual void JUCE_CALLTYPE informHostOfParameterChange (int index, float newValue) = 0; | |||
| virtual void JUCE_CALLTYPE informHostOfParameterGestureBegin (int index) = 0; | |||
| virtual void JUCE_CALLTYPE informHostOfParameterGestureEnd (int index) = 0; | |||
| /** Callback to indicate that something (other than a parameter) has changed in the | |||
| filter, such as its current program, parameter list, etc. */ | |||
| virtual void JUCE_CALLTYPE informHostOfStateChange() = 0; | |||
| }; | |||
| /** Adds a listener that will be called when an aspect of this processor changes. */ | |||
| void addListener (AudioProcessorListener* const newListener) throw(); | |||
| /** Removes a previously added listener. */ | |||
| void removeListener (AudioProcessorListener* const listenerToRemove) throw(); | |||
| //============================================================================== | |||
| /** Not for public use - this is called by the wrapper code before deleting an | |||
| editor component. | |||
| */ | |||
| void JUCE_CALLTYPE editorBeingDeleted (AudioFilterEditor* const editor) throw(); | |||
| /** Not for public use - this is called before deleting an editor component. */ | |||
| void editorBeingDeleted (AudioProcessorEditor* const editor) throw(); | |||
| /** Not for public use - this is called by the wrapper code to initialise the | |||
| filter. | |||
| */ | |||
| void JUCE_CALLTYPE setHostCallbacks (HostCallbacks* const) throw(); | |||
| /** Not for public use - this is called to initialise the processor. */ | |||
| void setPlayHead (AudioPlayHead* const newPlayHead) throw(); | |||
| /** Not for public use - this is called by the wrapper code to initialise the | |||
| filter. | |||
| */ | |||
| void setPlayConfigDetails (const int numIns, const int numOuts, | |||
| /** Not for public use - this is called to initialise the processor before playing. */ | |||
| void setPlayConfigDetails (const int numIns, const int numOuts, | |||
| const double sampleRate, | |||
| const int blockSize) throw(); | |||
| @@ -580,37 +507,35 @@ protected: | |||
| Then use getXmlFromBinary() to reverse this operation and retrieve the XML | |||
| from a binary blob. | |||
| */ | |||
| static void JUCE_CALLTYPE copyXmlToBinary (const XmlElement& xml, | |||
| JUCE_NAMESPACE::MemoryBlock& destData); | |||
| static void copyXmlToBinary (const XmlElement& xml, | |||
| JUCE_NAMESPACE::MemoryBlock& destData); | |||
| /** Retrieves an XML element that was stored as binary with the copyXmlToBinary() method. | |||
| This might return 0 if the data's unsuitable or corrupted. Otherwise it will return | |||
| an XmlElement object that the caller must delete when no longer needed. | |||
| */ | |||
| static XmlElement* JUCE_CALLTYPE getXmlFromBinary (const void* data, | |||
| const int sizeInBytes); | |||
| static XmlElement* getXmlFromBinary (const void* data, | |||
| const int sizeInBytes); | |||
| /** @internal */ | |||
| AudioPlayHead* playHead; | |||
| /** @internal */ | |||
| HostCallbacks* callbacks; | |||
| void sendParamChangeMessageToListeners (const int parameterIndex, const float newValue); | |||
| private: | |||
| AudioFilterEditor* activeEditor; | |||
| VoidArray listeners; | |||
| AudioProcessorEditor* activeEditor; | |||
| double sampleRate; | |||
| int blockSize, numInputChannels, numOutputChannels, latencySamples; | |||
| bool suspended; | |||
| CriticalSection callbackLock; | |||
| CriticalSection callbackLock, listenerLock; | |||
| #ifdef JUCE_DEBUG | |||
| BitArray changingParams; | |||
| #endif | |||
| }; | |||
| //============================================================================== | |||
| /** Somewhere in the code for an actual plugin, you need to implement this function | |||
| and make it create an instance of the filter subclass that you're building. | |||
| */ | |||
| extern AudioFilterBase* JUCE_CALLTYPE createPluginFilter(); | |||
| #endif // __JUCE_AUDIOFILTERBASE_JUCEHEADER__ | |||
| #endif // __JUCE_AUDIOPROCESSOR_JUCEHEADER__ | |||
| @@ -29,21 +29,28 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "juce_AudioFilterEditor.h" | |||
| #include "juce_AudioFilterBase.h" | |||
| #include "../../../juce_core/basics/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "juce_AudioProcessorEditor.h" | |||
| #include "juce_AudioProcessor.h" | |||
| //============================================================================== | |||
| AudioFilterEditor::AudioFilterEditor (AudioFilterBase* const ownerFilter_) | |||
| AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const ownerFilter_) | |||
| : ownerFilter (ownerFilter_) | |||
| { | |||
| // the filter must be valid.. | |||
| jassert (ownerFilter != 0); | |||
| } | |||
| AudioFilterEditor::~AudioFilterEditor() | |||
| AudioProcessorEditor::~AudioProcessorEditor() | |||
| { | |||
| // if this fails, then the wrapper hasn't called editorBeingDeleted() on the | |||
| // filter for some reason.. | |||
| jassert (ownerFilter->getActiveEditor() != this); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -29,44 +29,46 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_AUDIOFILTEREDITOR_JUCEHEADER__ | |||
| #define __JUCE_AUDIOFILTEREDITOR_JUCEHEADER__ | |||
| #ifndef __JUCE_AUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #define __JUCE_AUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #include "../../../juce.h" | |||
| class AudioFilterBase; | |||
| #include "../../gui/components/juce_Component.h" | |||
| class AudioProcessor; | |||
| //============================================================================== | |||
| /** | |||
| Base class for the component that forms a filter's GUI. | |||
| Base class for the component that acts as the GUI for an AudioProcessor. | |||
| Derive your editor component from this class, and create an instance of it | |||
| by overriding the AudioFilterBase::createEditor() method. | |||
| by overriding the AudioProcessor::createEditor() method. | |||
| @see AudioProcessor, GenericAudioProcessorEditor | |||
| */ | |||
| class AudioFilterEditor : public Component | |||
| class AudioProcessorEditor : public Component | |||
| { | |||
| public: | |||
| protected: | |||
| //============================================================================== | |||
| /** Creates a filter editor. | |||
| /** Creates an editor for the specified processor. | |||
| You'll need to pass in the filter that's creating it. | |||
| */ | |||
| AudioFilterEditor (AudioFilterBase* const ownerFilter); | |||
| AudioProcessorEditor (AudioProcessor* const owner); | |||
| public: | |||
| /** Destructor. */ | |||
| ~AudioFilterEditor(); | |||
| ~AudioProcessorEditor(); | |||
| //============================================================================== | |||
| /** Returns a pointer to the filter that owns this editor. */ | |||
| AudioFilterBase* getOwnerFilter() const throw() { return ownerFilter; } | |||
| AudioProcessor* getOwnerFilter() const throw() { return ownerFilter; } | |||
| private: | |||
| //============================================================================== | |||
| AudioFilterBase* const ownerFilter; | |||
| AudioProcessor* const ownerFilter; | |||
| }; | |||
| #endif // __JUCE_AUDIOFILTEREDITOR_JUCEHEADER__ | |||
| #endif // __JUCE_AUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| @@ -0,0 +1,114 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | |||
| Copyright 2004-7 by Raw Material Software ltd. | |||
| ------------------------------------------------------------------------------ | |||
| JUCE can be redistributed and/or modified under the terms of the | |||
| GNU General Public License, as published by the Free Software Foundation; | |||
| either version 2 of the License, or (at your option) any later version. | |||
| JUCE is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with JUCE; if not, visit www.gnu.org/licenses or write to the | |||
| Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |||
| Boston, MA 02111-1307 USA | |||
| ------------------------------------------------------------------------------ | |||
| If you'd like to release a closed-source product which uses JUCE, commercial | |||
| licenses are also available: visit www.rawmaterialsoftware.com/juce for | |||
| more information. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_AUDIOPROCESSORLISTENER_JUCEHEADER__ | |||
| #define __JUCE_AUDIOPROCESSORLISTENER_JUCEHEADER__ | |||
| class AudioProcessor; | |||
| //============================================================================== | |||
| /** | |||
| Base class for listeners that want to know about changes to an AudioProcessor. | |||
| Use AudioProcessor::addListener() to register your listener with an AudioProcessor. | |||
| @see AudioProcessor | |||
| */ | |||
| class JUCE_API AudioProcessorListener | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| /** Destructor. */ | |||
| virtual ~AudioProcessorListener() {} | |||
| //============================================================================== | |||
| /** Receives a callback when a parameter is changed. | |||
| IMPORTANT NOTE: this will be called synchronously when a parameter changes, and | |||
| many audio processors will change their parameter during their audio callback. | |||
| This means that not only has your handler code got to be completely thread-safe, | |||
| but it's also got to be VERY fast, and avoid blocking. If you need to handle | |||
| this event on your message thread, use this callback to trigger an AsyncUpdater | |||
| or ChangeBroadcaster which you can respond to on the message thread. | |||
| */ | |||
| virtual void audioProcessorParameterChanged (AudioProcessor* processor, | |||
| int parameterIndex, | |||
| float newValue) = 0; | |||
| /** Called to indicate that something else in the plugin has changed, like its | |||
| program, number of parameters, etc. | |||
| IMPORTANT NOTE: this will be called synchronously, and many audio processors will | |||
| call it during their audio callback. This means that not only has your handler code | |||
| got to be completely thread-safe, but it's also got to be VERY fast, and avoid | |||
| blocking. If you need to handle this event on your message thread, use this callback | |||
| to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the | |||
| message thread. | |||
| */ | |||
| virtual void audioProcessorChanged (AudioProcessor* processor) = 0; | |||
| /** Indicates that a parameter change gesture has started. | |||
| E.g. if the user is dragging a slider, this would be called when they first | |||
| press the mouse button, and audioProcessorParameterChangeGestureEnd would be | |||
| called when they release it. | |||
| IMPORTANT NOTE: this will be called synchronously, and many audio processors will | |||
| call it during their audio callback. This means that not only has your handler code | |||
| got to be completely thread-safe, but it's also got to be VERY fast, and avoid | |||
| blocking. If you need to handle this event on your message thread, use this callback | |||
| to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the | |||
| message thread. | |||
| @see audioProcessorParameterChangeGestureEnd | |||
| */ | |||
| virtual void audioProcessorParameterChangeGestureBegin (AudioProcessor* processor, | |||
| int parameterIndex); | |||
| /** Indicates that a parameter change gesture has finished. | |||
| E.g. if the user is dragging a slider, this would be called when they release | |||
| the mouse button. | |||
| IMPORTANT NOTE: this will be called synchronously, and many audio processors will | |||
| call it during their audio callback. This means that not only has your handler code | |||
| got to be completely thread-safe, but it's also got to be VERY fast, and avoid | |||
| blocking. If you need to handle this event on your message thread, use this callback | |||
| to trigger an AsyncUpdater or ChangeBroadcaster which you can respond to later on the | |||
| message thread. | |||
| @see audioPluginParameterChangeGestureStart | |||
| */ | |||
| virtual void audioProcessorParameterChangeGestureEnd (AudioProcessor* processor, | |||
| int parameterIndex); | |||
| }; | |||
| #endif // __JUCE_AUDIOPROCESSORLISTENER_JUCEHEADER__ | |||
| @@ -29,62 +29,71 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../../juce.h" | |||
| #include "juce_GenericAudioFilterEditor.h" | |||
| #include "../../../juce_core/basics/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "juce_GenericAudioProcessorEditor.h" | |||
| #include "juce_AudioProcessor.h" | |||
| #include "../../gui/components/controls/juce_Slider.h" | |||
| //============================================================================== | |||
| class FilterParameterPropertyComp : public PropertyComponent, | |||
| public AudioPluginParameterListener | |||
| class ProcessorParameterPropertyComp : public PropertyComponent, | |||
| public AudioProcessorListener, | |||
| public AsyncUpdater | |||
| { | |||
| public: | |||
| FilterParameterPropertyComp (const String& name, | |||
| AudioPluginInstance* const filter_, | |||
| const int index_) | |||
| ProcessorParameterPropertyComp (const String& name, | |||
| AudioProcessor* const owner_, | |||
| const int index_) | |||
| : PropertyComponent (name), | |||
| filter (filter_), | |||
| owner (owner_), | |||
| index (index_) | |||
| { | |||
| addAndMakeVisible (slider = new PluginSlider (filter_, index_)); | |||
| filter->addListener (this); | |||
| addAndMakeVisible (slider = new ParamSlider (owner_, index_)); | |||
| owner_->addListener (this); | |||
| } | |||
| ~FilterParameterPropertyComp() | |||
| ~ProcessorParameterPropertyComp() | |||
| { | |||
| filter->removeListener (this); | |||
| owner->removeListener (this); | |||
| deleteAllChildren(); | |||
| } | |||
| void refresh() | |||
| { | |||
| slider->setValue (filter->getParameter (index), false); | |||
| slider->setValue (owner->getParameter (index), false); | |||
| } | |||
| void audioPluginChanged (AudioPluginInstance*) | |||
| void audioProcessorChanged (AudioProcessor*) {} | |||
| void audioProcessorParameterChanged (AudioProcessor*, int parameterIndex, float) | |||
| { | |||
| if (parameterIndex == index) | |||
| triggerAsyncUpdate(); | |||
| } | |||
| void audioPluginParameterChanged (AudioPluginInstance*, int parameterIndex, float) | |||
| void handleAsyncUpdate() | |||
| { | |||
| if (parameterIndex == index) | |||
| refresh(); | |||
| refresh(); | |||
| } | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| AudioPluginInstance* const filter; | |||
| AudioProcessor* const owner; | |||
| const int index; | |||
| Slider* slider; | |||
| //============================================================================== | |||
| class PluginSlider : public Slider | |||
| class ParamSlider : public Slider | |||
| { | |||
| public: | |||
| PluginSlider (AudioPluginInstance* const filter_, const int index_) | |||
| ParamSlider (AudioProcessor* const owner_, const int index_) | |||
| : Slider (String::empty), | |||
| filter (filter_), | |||
| owner (owner_), | |||
| index (index_) | |||
| { | |||
| setRange (0.0, 1.0, 0.0); | |||
| @@ -93,7 +102,7 @@ private: | |||
| setScrollWheelEnabled (false); | |||
| } | |||
| ~PluginSlider() | |||
| ~ParamSlider() | |||
| { | |||
| } | |||
| @@ -101,28 +110,28 @@ private: | |||
| { | |||
| const float newVal = (float) getValue(); | |||
| if (filter->getParameter (index) != newVal) | |||
| filter->setParameter (index, newVal); | |||
| if (owner->getParameter (index) != newVal) | |||
| owner->setParameter (index, newVal); | |||
| } | |||
| const String getTextFromValue (double /*value*/) | |||
| { | |||
| return filter->getParameterText (index); | |||
| return owner->getParameterText (index); | |||
| } | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| AudioPluginInstance* const filter; | |||
| AudioProcessor* const owner; | |||
| const int index; | |||
| }; | |||
| }; | |||
| //============================================================================== | |||
| GenericAudioFilterEditor::GenericAudioFilterEditor (AudioPluginInstance* const filter) | |||
| : AudioFilterEditor (filter) | |||
| GenericAudioProcessorEditor::GenericAudioProcessorEditor (AudioProcessor* const owner) | |||
| : AudioProcessorEditor (owner) | |||
| { | |||
| setOpaque (true); | |||
| @@ -130,16 +139,16 @@ GenericAudioFilterEditor::GenericAudioFilterEditor (AudioPluginInstance* const f | |||
| Array <PropertyComponent*> params; | |||
| const int numParams = filter->getNumParameters(); | |||
| const int numParams = owner->getNumParameters(); | |||
| int totalHeight = 0; | |||
| for (int i = 0; i < numParams; ++i) | |||
| { | |||
| String name (filter->getParameterName (i)); | |||
| String name (owner->getParameterName (i)); | |||
| if (name.trim().isEmpty()) | |||
| name = "Unnamed"; | |||
| FilterParameterPropertyComp* const pc = new FilterParameterPropertyComp (name, filter, i); | |||
| ProcessorParameterPropertyComp* const pc = new ProcessorParameterPropertyComp (name, owner, i); | |||
| params.add (pc); | |||
| totalHeight += pc->getPreferredHeight(); | |||
| } | |||
| @@ -149,17 +158,20 @@ GenericAudioFilterEditor::GenericAudioFilterEditor (AudioPluginInstance* const f | |||
| setSize (400, jlimit (25, 400, totalHeight)); | |||
| } | |||
| GenericAudioFilterEditor::~GenericAudioFilterEditor() | |||
| GenericAudioProcessorEditor::~GenericAudioProcessorEditor() | |||
| { | |||
| deleteAllChildren(); | |||
| } | |||
| void GenericAudioFilterEditor::paint (Graphics& g) | |||
| void GenericAudioProcessorEditor::paint (Graphics& g) | |||
| { | |||
| g.fillAll (Colours::white); | |||
| } | |||
| void GenericAudioFilterEditor::resized() | |||
| void GenericAudioProcessorEditor::resized() | |||
| { | |||
| panel->setSize (getWidth(), getHeight()); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -29,28 +29,29 @@ | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCE_GENERICFILTERUI_JUCEHEADER__ | |||
| #define __JUCE_GENERICFILTERUI_JUCEHEADER__ | |||
| #ifndef __JUCE_GENERICAUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #define __JUCE_GENERICAUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| #include "juce_AudioPluginInstance.h" | |||
| #include "juce_AudioProcessorEditor.h" | |||
| #include "../../gui/components/properties/juce_PropertyPanel.h" | |||
| //============================================================================== | |||
| /** | |||
| A type of UI component that displays the parameters of an AudioFilterInstance as | |||
| A type of UI component that displays the parameters of an AudioProcessor as | |||
| a simple list of sliders. | |||
| This can be used for showing an editor for plugins that don't supply their own | |||
| editor. | |||
| This can be used for showing an editor for a processor that doesn't supply | |||
| its own custom editor. | |||
| @see AudioFilterBase, AudioPluginFormat | |||
| @see AudioProcessor | |||
| */ | |||
| class GenericAudioFilterEditor : public AudioFilterEditor | |||
| class GenericAudioProcessorEditor : public AudioProcessorEditor | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| GenericAudioFilterEditor (AudioPluginInstance* const ownerFilter); | |||
| ~GenericAudioFilterEditor(); | |||
| GenericAudioProcessorEditor (AudioProcessor* const owner); | |||
| ~GenericAudioProcessorEditor(); | |||
| //============================================================================== | |||
| void paint (Graphics& g); | |||
| @@ -65,4 +66,4 @@ private: | |||
| }; | |||
| #endif | |||
| #endif // __JUCE_GENERICAUDIOPROCESSOREDITOR_JUCEHEADER__ | |||
| @@ -538,7 +538,7 @@ void Graphics::fillRoundedRectangle (const float x, | |||
| void Graphics::fillRoundedRectangle (const Rectangle& r, | |||
| const float cornerSize) const throw() | |||
| { | |||
| fillRoundedRectangle ((float) r.getX(), | |||
| fillRoundedRectangle ((float) r.getX(), | |||
| (float) r.getY(), | |||
| (float) r.getWidth(), | |||
| (float) r.getHeight(), | |||