mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix various multi-bus issues and add support for consistent surround channel ordering
This commit is contained in:
parent
71b62a8503
commit
a53eda27d4
40 changed files with 8807 additions and 61 deletions
|
|
@ -1,12 +1,26 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
Arpeggiator.cpp
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../JuceLibraryCode/JuceHeader.h"
|
#include "../JuceLibraryCode/JuceHeader.h"
|
||||||
#include "../../GenericEditor.h"
|
#include "../../GenericEditor.h"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
GainProcessor.cpp
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
GenericEditor.h
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
|
||||||
==============================================================================
|
Permission is granted to use this software under the terms of either:
|
||||||
*/
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
class GenericEditor : public AudioProcessorEditor,
|
class GenericEditor : public AudioProcessorEditor,
|
||||||
public SliderListener,
|
public SliderListener,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
MultiOutSynth.cpp
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
NoiseGate.cpp
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
|
||||||
==============================================================================
|
Permission is granted to use this software under the terms of either:
|
||||||
*/
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../JuceLibraryCode/JuceHeader.h"
|
#include "../JuceLibraryCode/JuceHeader.h"
|
||||||
#include "../../GenericEditor.h"
|
#include "../../GenericEditor.h"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
Spatializer.cpp
|
This file is part of the JUCE library.
|
||||||
Created: 23 Nov 2015 3:08:33pm
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
Author: Fabian Renn
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
172
examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile
Normal file
172
examples/PlugInSamples/Surround/Builds/LinuxMakefile/Makefile
Normal file
|
|
@ -0,0 +1,172 @@
|
||||||
|
# Automatically generated makefile, created by the Introjucer
|
||||||
|
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
|
||||||
|
|
||||||
|
# (this disables dependency generation if multiple architectures are set)
|
||||||
|
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
|
||||||
|
|
||||||
|
ifndef CONFIG
|
||||||
|
CONFIG=Debug
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG),Debug)
|
||||||
|
BINDIR := build
|
||||||
|
LIBDIR := build
|
||||||
|
OBJDIR := build/intermediate/Debug
|
||||||
|
OUTDIR := build
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH),)
|
||||||
|
TARGET_ARCH := -march=native
|
||||||
|
endif
|
||||||
|
|
||||||
|
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../../../../modules
|
||||||
|
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -fPIC -O0 -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion
|
||||||
|
CXXFLAGS += $(CFLAGS) -std=c++11
|
||||||
|
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -Wl,--no-undefined -shared -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
|
||||||
|
|
||||||
|
TARGET := Surround.so
|
||||||
|
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
|
||||||
|
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG),Release)
|
||||||
|
BINDIR := build
|
||||||
|
LIBDIR := build
|
||||||
|
OBJDIR := build/intermediate/Release
|
||||||
|
OUTDIR := build
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH),)
|
||||||
|
TARGET_ARCH := -march=native
|
||||||
|
endif
|
||||||
|
|
||||||
|
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../../../../modules
|
||||||
|
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -O3 -Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion
|
||||||
|
CXXFLAGS += $(CFLAGS) -std=c++11
|
||||||
|
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -Wl,--no-undefined -shared -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
|
||||||
|
|
||||||
|
TARGET := Surround.so
|
||||||
|
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
|
||||||
|
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
OBJECTS := \
|
||||||
|
$(OBJDIR)/SurroundProcessor_c7ed9c55.o \
|
||||||
|
$(OBJDIR)/juce_audio_basics_78a7818f.o \
|
||||||
|
$(OBJDIR)/juce_audio_devices_7278ae8d.o \
|
||||||
|
$(OBJDIR)/juce_audio_formats_a0f9f82d.o \
|
||||||
|
$(OBJDIR)/juce_audio_processors_38c55c47.o \
|
||||||
|
$(OBJDIR)/juce_core_4ab0871.o \
|
||||||
|
$(OBJDIR)/juce_cryptography_7a2c84cb.o \
|
||||||
|
$(OBJDIR)/juce_data_structures_9bbaa16d.o \
|
||||||
|
$(OBJDIR)/juce_events_4bb1d465.o \
|
||||||
|
$(OBJDIR)/juce_graphics_8bdbf949.o \
|
||||||
|
$(OBJDIR)/juce_gui_basics_dcbf9445.o \
|
||||||
|
$(OBJDIR)/juce_gui_extra_2814130d.o \
|
||||||
|
$(OBJDIR)/juce_opengl_bf9fc91.o \
|
||||||
|
$(OBJDIR)/juce_PluginUtilities_c8a83799.o \
|
||||||
|
$(OBJDIR)/juce_video_11f0932d.o \
|
||||||
|
$(OBJDIR)/juce_VST_Wrapper_371bbba2.o \
|
||||||
|
$(OBJDIR)/juce_VST3_Wrapper_e8b59460.o \
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
|
||||||
|
@echo Linking Surround
|
||||||
|
-@mkdir -p $(BINDIR)
|
||||||
|
-@mkdir -p $(LIBDIR)
|
||||||
|
-@mkdir -p $(OUTDIR)
|
||||||
|
@$(BLDCMD)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning Surround
|
||||||
|
@$(CLEANCMD)
|
||||||
|
|
||||||
|
strip:
|
||||||
|
@echo Stripping Surround
|
||||||
|
-@strip --strip-unneeded $(OUTDIR)/$(TARGET)
|
||||||
|
|
||||||
|
$(OBJDIR)/SurroundProcessor_c7ed9c55.o: ../../Source/SurroundProcessor.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling SurroundProcessor.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_audio_basics_78a7818f.o: ../../../../../modules/juce_audio_basics/juce_audio_basics.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_audio_basics.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_audio_devices_7278ae8d.o: ../../../../../modules/juce_audio_devices/juce_audio_devices.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_audio_devices.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_audio_formats_a0f9f82d.o: ../../../../../modules/juce_audio_formats/juce_audio_formats.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_audio_formats.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_audio_processors_38c55c47.o: ../../../../../modules/juce_audio_processors/juce_audio_processors.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_audio_processors.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_core_4ab0871.o: ../../../../../modules/juce_core/juce_core.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_core.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_cryptography_7a2c84cb.o: ../../../../../modules/juce_cryptography/juce_cryptography.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_cryptography.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_data_structures_9bbaa16d.o: ../../../../../modules/juce_data_structures/juce_data_structures.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_data_structures.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_events_4bb1d465.o: ../../../../../modules/juce_events/juce_events.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_events.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_graphics_8bdbf949.o: ../../../../../modules/juce_graphics/juce_graphics.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_graphics.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_gui_basics_dcbf9445.o: ../../../../../modules/juce_gui_basics/juce_gui_basics.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_gui_basics.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_gui_extra_2814130d.o: ../../../../../modules/juce_gui_extra/juce_gui_extra.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_gui_extra.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_opengl_bf9fc91.o: ../../../../../modules/juce_opengl/juce_opengl.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_opengl.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_PluginUtilities_c8a83799.o: ../../../../../modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_PluginUtilities.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_video_11f0932d.o: ../../../../../modules/juce_video/juce_video.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_video.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_VST_Wrapper_371bbba2.o: ../../../../../modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_VST_Wrapper.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
$(OBJDIR)/juce_VST3_Wrapper_e8b59460.o: ../../../../../modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
|
||||||
|
-@mkdir -p $(OBJDIR)
|
||||||
|
@echo "Compiling juce_VST3_Wrapper.cpp"
|
||||||
|
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
|
||||||
|
|
||||||
|
-include $(OBJECTS:%.o=%.d)
|
||||||
46
examples/PlugInSamples/Surround/Builds/MacOSX/Info.plist
Normal file
46
examples/PlugInSamples/Surround/Builds/MacOSX/Info.plist
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Surround</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>TDMw</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>PTul</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string></string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<true/>
|
||||||
|
<key>AudioComponents</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>ROLI Ltd.: Surround</string>
|
||||||
|
<key>description</key>
|
||||||
|
<string>Surround</string>
|
||||||
|
<key>factoryFunction</key>
|
||||||
|
<string>SurroundAUFactory</string>
|
||||||
|
<key>manufacturer</key>
|
||||||
|
<string>ROLI</string>
|
||||||
|
<key>type</key>
|
||||||
|
<string>aumu</string>
|
||||||
|
<key>subtype</key>
|
||||||
|
<string>Srrd</string>
|
||||||
|
<key>version</key>
|
||||||
|
<integer>65536</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
BIN
examples/PlugInSamples/Surround/Builds/MacOSX/RecentFilesMenuTemplate.nib
generated
Normal file
BIN
examples/PlugInSamples/Surround/Builds/MacOSX/RecentFilesMenuTemplate.nib
generated
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,19 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2015
|
||||||
|
Project("{F9FF67DA-4C83-1DEF-FCA5-8D74F96886D5}") = "Surround", "Surround.vcxproj", "{01DA4F69-1E8D-E195-1DB6-491234B0D5E3}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{01DA4F69-1E8D-E195-1DB6-491234B0D5E3}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{01DA4F69-1E8D-E195-1DB6-491234B0D5E3}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{01DA4F69-1E8D-E195-1DB6-491234B0D5E3}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{01DA4F69-1E8D-E195-1DB6-491234B0D5E3}.Release|x64.Build.0 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
||||||
|
#ifdef JUCE_USER_DEFINED_RC_FILE
|
||||||
|
#include JUCE_USER_DEFINED_RC_FILE
|
||||||
|
#else
|
||||||
|
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 1,0,0,0
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904E4"
|
||||||
|
BEGIN
|
||||||
|
VALUE "FileDescription", "Surround\0"
|
||||||
|
VALUE "FileVersion", "1.0.0\0"
|
||||||
|
VALUE "ProductName", "Surround\0"
|
||||||
|
VALUE "ProductVersion", "1.0.0\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1252
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif
|
||||||
334
examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h
Normal file
334
examples/PlugInSamples/Surround/JuceLibraryCode/AppConfig.h
Normal file
|
|
@ -0,0 +1,334 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
IMPORTANT! This file is auto-generated each time you save your
|
||||||
|
project - if you alter its contents, your changes may be overwritten!
|
||||||
|
|
||||||
|
There's a section below where you can add your own custom code safely, and the
|
||||||
|
Introjucer will preserve the contents of that block, but the best way to change
|
||||||
|
any of these definitions is by using the Introjucer's project settings.
|
||||||
|
|
||||||
|
Any commented-out settings will assume their default values.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __JUCE_APPCONFIG_S8Q71Q__
|
||||||
|
#define __JUCE_APPCONFIG_S8Q71Q__
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// [BEGIN_USER_CODE_SECTION]
|
||||||
|
|
||||||
|
// (You can add your own code in this section, and the Introjucer will not overwrite it)
|
||||||
|
|
||||||
|
// [END_USER_CODE_SECTION]
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_core 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_cryptography 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_events 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_graphics 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_opengl 1
|
||||||
|
#define JUCE_MODULE_AVAILABLE_juce_video 1
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
#ifndef JUCE_STANDALONE_APPLICATION
|
||||||
|
#define JUCE_STANDALONE_APPLICATION 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_audio_devices flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_ASIO
|
||||||
|
//#define JUCE_ASIO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_WASAPI
|
||||||
|
//#define JUCE_WASAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_WASAPI_EXCLUSIVE
|
||||||
|
//#define JUCE_WASAPI_EXCLUSIVE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_DIRECTSOUND
|
||||||
|
//#define JUCE_DIRECTSOUND
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_ALSA
|
||||||
|
//#define JUCE_ALSA
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_JACK
|
||||||
|
//#define JUCE_JACK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_ANDROID_OPENSLES
|
||||||
|
//#define JUCE_USE_ANDROID_OPENSLES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_CDREADER
|
||||||
|
//#define JUCE_USE_CDREADER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_CDBURNER
|
||||||
|
//#define JUCE_USE_CDBURNER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_audio_formats flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_FLAC
|
||||||
|
//#define JUCE_USE_FLAC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_OGGVORBIS
|
||||||
|
//#define JUCE_USE_OGGVORBIS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_MP3AUDIOFORMAT
|
||||||
|
//#define JUCE_USE_MP3AUDIOFORMAT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_LAME_AUDIO_FORMAT
|
||||||
|
//#define JUCE_USE_LAME_AUDIO_FORMAT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT
|
||||||
|
//#define JUCE_USE_WINDOWS_MEDIA_FORMAT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_audio_processors flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_PLUGINHOST_VST
|
||||||
|
//#define JUCE_PLUGINHOST_VST
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_PLUGINHOST_VST3
|
||||||
|
//#define JUCE_PLUGINHOST_VST3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_PLUGINHOST_AU
|
||||||
|
//#define JUCE_PLUGINHOST_AU
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_core flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_FORCE_DEBUG
|
||||||
|
//#define JUCE_FORCE_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_LOG_ASSERTIONS
|
||||||
|
//#define JUCE_LOG_ASSERTIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_CHECK_MEMORY_LEAKS
|
||||||
|
//#define JUCE_CHECK_MEMORY_LEAKS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||||
|
//#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_INCLUDE_ZLIB_CODE
|
||||||
|
//#define JUCE_INCLUDE_ZLIB_CODE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_CURL
|
||||||
|
//#define JUCE_USE_CURL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_graphics flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_COREIMAGE_LOADER
|
||||||
|
//#define JUCE_USE_COREIMAGE_LOADER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_DIRECTWRITE
|
||||||
|
//#define JUCE_USE_DIRECTWRITE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_gui_basics flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
|
||||||
|
//#define JUCE_ENABLE_REPAINT_DEBUGGING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_XSHM
|
||||||
|
//#define JUCE_USE_XSHM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_XRENDER
|
||||||
|
//#define JUCE_USE_XRENDER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_XCURSOR
|
||||||
|
//#define JUCE_USE_XCURSOR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_gui_extra flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_WEB_BROWSER
|
||||||
|
//#define JUCE_WEB_BROWSER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR
|
||||||
|
//#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// juce_video flags:
|
||||||
|
|
||||||
|
#ifndef JUCE_DIRECTSHOW
|
||||||
|
//#define JUCE_DIRECTSHOW
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_MEDIAFOUNDATION
|
||||||
|
//#define JUCE_MEDIAFOUNDATION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_QUICKTIME
|
||||||
|
#define JUCE_QUICKTIME 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef JUCE_USE_CAMERA
|
||||||
|
//#define JUCE_USE_CAMERA
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// Audio plugin settings..
|
||||||
|
|
||||||
|
#ifndef JucePlugin_Build_VST
|
||||||
|
#define JucePlugin_Build_VST 1
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Build_VST3
|
||||||
|
#define JucePlugin_Build_VST3 1
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Build_AU
|
||||||
|
#define JucePlugin_Build_AU 1
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Build_RTAS
|
||||||
|
#define JucePlugin_Build_RTAS 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Build_AAX
|
||||||
|
#define JucePlugin_Build_AAX 1
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Name
|
||||||
|
#define JucePlugin_Name "Surround"
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Desc
|
||||||
|
#define JucePlugin_Desc "Surround"
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Manufacturer
|
||||||
|
#define JucePlugin_Manufacturer "ROLI Ltd."
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_ManufacturerWebsite
|
||||||
|
#define JucePlugin_ManufacturerWebsite ""
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_ManufacturerEmail
|
||||||
|
#define JucePlugin_ManufacturerEmail ""
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_ManufacturerCode
|
||||||
|
#define JucePlugin_ManufacturerCode 'ROLI'
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_PluginCode
|
||||||
|
#define JucePlugin_PluginCode 'Srrd'
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_IsSynth
|
||||||
|
#define JucePlugin_IsSynth 1
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_WantsMidiInput
|
||||||
|
#define JucePlugin_WantsMidiInput 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_ProducesMidiOutput
|
||||||
|
#define JucePlugin_ProducesMidiOutput 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_IsMidiEffect
|
||||||
|
#define JucePlugin_IsMidiEffect 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_SilenceInProducesSilenceOut
|
||||||
|
#define JucePlugin_SilenceInProducesSilenceOut 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_EditorRequiresKeyboardFocus
|
||||||
|
#define JucePlugin_EditorRequiresKeyboardFocus 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_Version
|
||||||
|
#define JucePlugin_Version 1.0.0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_VersionCode
|
||||||
|
#define JucePlugin_VersionCode 0x10000
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_VersionString
|
||||||
|
#define JucePlugin_VersionString "1.0.0"
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_VSTUniqueID
|
||||||
|
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_VSTCategory
|
||||||
|
#define JucePlugin_VSTCategory kPlugCategSynth
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AUMainType
|
||||||
|
#define JucePlugin_AUMainType kAudioUnitType_MusicDevice
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AUSubType
|
||||||
|
#define JucePlugin_AUSubType JucePlugin_PluginCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AUExportPrefix
|
||||||
|
#define JucePlugin_AUExportPrefix SurroundAU
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AUExportPrefixQuoted
|
||||||
|
#define JucePlugin_AUExportPrefixQuoted "SurroundAU"
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AUManufacturerCode
|
||||||
|
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_CFBundleIdentifier
|
||||||
|
#define JucePlugin_CFBundleIdentifier com.ROLI.Surround
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_RTASCategory
|
||||||
|
#define JucePlugin_RTASCategory ePlugInCategory_SWGenerators
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_RTASManufacturerCode
|
||||||
|
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_RTASProductId
|
||||||
|
#define JucePlugin_RTASProductId JucePlugin_PluginCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_RTASDisableBypass
|
||||||
|
#define JucePlugin_RTASDisableBypass 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_RTASDisableMultiMono
|
||||||
|
#define JucePlugin_RTASDisableMultiMono 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXIdentifier
|
||||||
|
#define JucePlugin_AAXIdentifier com.ROLI.Surround
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXManufacturerCode
|
||||||
|
#define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXProductId
|
||||||
|
#define JucePlugin_AAXProductId JucePlugin_PluginCode
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXCategory
|
||||||
|
#define JucePlugin_AAXCategory AAX_ePlugInCategory_Dynamics
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXDisableBypass
|
||||||
|
#define JucePlugin_AAXDisableBypass 0
|
||||||
|
#endif
|
||||||
|
#ifndef JucePlugin_AAXDisableMultiMono
|
||||||
|
#define JucePlugin_AAXDisableMultiMono 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __JUCE_APPCONFIG_S8Q71Q__
|
||||||
47
examples/PlugInSamples/Surround/JuceLibraryCode/JuceHeader.h
Normal file
47
examples/PlugInSamples/Surround/JuceLibraryCode/JuceHeader.h
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
IMPORTANT! This file is auto-generated each time you save your
|
||||||
|
project - if you alter its contents, your changes may be overwritten!
|
||||||
|
|
||||||
|
This is the header file that your files should include in order to get all the
|
||||||
|
JUCE library headers. You should avoid including the JUCE headers directly in
|
||||||
|
your own source files, because that wouldn't pick up the correct configuration
|
||||||
|
options for your app.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __APPHEADERFILE_S8Q71Q__
|
||||||
|
#define __APPHEADERFILE_S8Q71Q__
|
||||||
|
|
||||||
|
#include "AppConfig.h"
|
||||||
|
#include "modules/juce_audio_basics/juce_audio_basics.h"
|
||||||
|
#include "modules/juce_audio_devices/juce_audio_devices.h"
|
||||||
|
#include "modules/juce_audio_formats/juce_audio_formats.h"
|
||||||
|
#include "modules/juce_audio_plugin_client/juce_audio_plugin_client.h"
|
||||||
|
#include "modules/juce_audio_processors/juce_audio_processors.h"
|
||||||
|
#include "modules/juce_core/juce_core.h"
|
||||||
|
#include "modules/juce_cryptography/juce_cryptography.h"
|
||||||
|
#include "modules/juce_data_structures/juce_data_structures.h"
|
||||||
|
#include "modules/juce_events/juce_events.h"
|
||||||
|
#include "modules/juce_graphics/juce_graphics.h"
|
||||||
|
#include "modules/juce_gui_basics/juce_gui_basics.h"
|
||||||
|
#include "modules/juce_gui_extra/juce_gui_extra.h"
|
||||||
|
#include "modules/juce_opengl/juce_opengl.h"
|
||||||
|
#include "modules/juce_video/juce_video.h"
|
||||||
|
|
||||||
|
#if ! DONT_SET_USING_JUCE_NAMESPACE
|
||||||
|
// If your code uses a lot of JUCE classes, then this will obviously save you
|
||||||
|
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
|
||||||
|
using namespace juce;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ! JUCE_DONT_DECLARE_PROJECTINFO
|
||||||
|
namespace ProjectInfo
|
||||||
|
{
|
||||||
|
const char* const projectName = "Surround";
|
||||||
|
const char* const versionString = "1.0.0";
|
||||||
|
const int versionNumber = 0x10000;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __APPHEADERFILE_S8Q71Q__
|
||||||
12
examples/PlugInSamples/Surround/JuceLibraryCode/ReadMe.txt
Normal file
12
examples/PlugInSamples/Surround/JuceLibraryCode/ReadMe.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
Important Note!!
|
||||||
|
================
|
||||||
|
|
||||||
|
The purpose of this folder is to contain files that are auto-generated by the Introjucer,
|
||||||
|
and ALL files in this folder will be mercilessly DELETED and completely re-written whenever
|
||||||
|
the Introjucer saves your project.
|
||||||
|
|
||||||
|
Therefore, it's a bad idea to make any manual changes to the files in here, or to
|
||||||
|
put any of your own files in here if you don't want to lose them. (Of course you may choose
|
||||||
|
to add the folder's contents to your version-control system so that you can re-merge your own
|
||||||
|
modifications after the Introjucer has saved its changes).
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_audio_basics/juce_audio_basics.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_audio_devices/juce_audio_devices.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_audio_formats/juce_audio_formats.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_audio_plugin_client/juce_audio_plugin_client.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_audio_processors/juce_audio_processors.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_core/juce_core.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_cryptography/juce_cryptography.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_data_structures/juce_data_structures.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_events/juce_events.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_graphics/juce_graphics.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_gui_basics/juce_gui_basics.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_gui_extra/juce_gui_extra.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_opengl/juce_opengl.h"
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
// This is an auto-generated file to redirect any included
|
||||||
|
// module headers to the correct external folder.
|
||||||
|
|
||||||
|
#include "../../../../../../modules/juce_video/juce_video.h"
|
||||||
123
examples/PlugInSamples/Surround/Source/SurroundEditor.h
Normal file
123
examples/PlugInSamples/Surround/Source/SurroundEditor.h
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
This file is part of the JUCE library.
|
||||||
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ChannelClickListener
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~ChannelClickListener() {}
|
||||||
|
virtual void channelButtonClicked (int channelIndex) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SurroundEditor : public AudioProcessorEditor,
|
||||||
|
public ButtonListener,
|
||||||
|
private Timer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SurroundEditor (AudioProcessor& parent)
|
||||||
|
: AudioProcessorEditor (parent),
|
||||||
|
currentChannelLayout (AudioChannelSet::disabled()),
|
||||||
|
noChannelsLabel ("noChannelsLabel", "Input disabled")
|
||||||
|
{
|
||||||
|
addAndMakeVisible (noChannelsLabel);
|
||||||
|
setSize (640, 64);
|
||||||
|
|
||||||
|
timerCallback();
|
||||||
|
startTimer (500);
|
||||||
|
}
|
||||||
|
|
||||||
|
~SurroundEditor()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void resized() override
|
||||||
|
{
|
||||||
|
Rectangle<int> r = getLocalBounds();
|
||||||
|
|
||||||
|
noChannelsLabel.setBounds (r);
|
||||||
|
|
||||||
|
if (channelButtons.size() > 0)
|
||||||
|
{
|
||||||
|
const int buttonWidth = r.getWidth() / channelButtons.size();
|
||||||
|
for (int i = 0; i < channelButtons.size(); ++i)
|
||||||
|
channelButtons[i]->setBounds (r.removeFromLeft (buttonWidth));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void paint (Graphics& g) override
|
||||||
|
{
|
||||||
|
g.fillAll (Colours::white);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buttonClicked (Button* btn) override
|
||||||
|
{
|
||||||
|
if (TextButton* textButton = dynamic_cast<TextButton*> (btn))
|
||||||
|
{
|
||||||
|
const int channelIndex = channelButtons.indexOf (textButton);
|
||||||
|
|
||||||
|
|
||||||
|
if (ChannelClickListener* listener = dynamic_cast<ChannelClickListener*> (getAudioProcessor()))
|
||||||
|
listener->channelButtonClicked (channelIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void timerCallback() override
|
||||||
|
{
|
||||||
|
const AudioChannelSet& channelSet = getAudioProcessor()->busArrangement.outputBuses.getReference (0).channels;
|
||||||
|
|
||||||
|
if (channelSet != currentChannelLayout)
|
||||||
|
{
|
||||||
|
currentChannelLayout = channelSet;
|
||||||
|
channelButtons.clear();
|
||||||
|
|
||||||
|
if (currentChannelLayout == AudioChannelSet::disabled())
|
||||||
|
{
|
||||||
|
noChannelsLabel.setVisible (true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const int numChannels = currentChannelLayout.size();
|
||||||
|
|
||||||
|
for (int i = 0; i < numChannels; ++i)
|
||||||
|
{
|
||||||
|
const String channelName =
|
||||||
|
AudioChannelSet::getAbbreviatedChannelTypeName (currentChannelLayout.getTypeOfChannel (i));
|
||||||
|
|
||||||
|
TextButton* newButton;
|
||||||
|
channelButtons.add (newButton = new TextButton (channelName, channelName));
|
||||||
|
|
||||||
|
newButton->addListener (this);
|
||||||
|
addAndMakeVisible (newButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
noChannelsLabel.setVisible (false);
|
||||||
|
resized();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioChannelSet currentChannelLayout;
|
||||||
|
Label noChannelsLabel;
|
||||||
|
OwnedArray<TextButton> channelButtons;
|
||||||
|
};
|
||||||
133
examples/PlugInSamples/Surround/Source/SurroundProcessor.cpp
Normal file
133
examples/PlugInSamples/Surround/Source/SurroundProcessor.cpp
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
/*
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
This file is part of the JUCE library.
|
||||||
|
Copyright (c) 2015 - ROLI Ltd.
|
||||||
|
|
||||||
|
Permission is granted to use this software under the terms of either:
|
||||||
|
a) the GPL v2 (or any later version)
|
||||||
|
b) the Affero GPL v3
|
||||||
|
|
||||||
|
Details of these licenses can be found at: www.gnu.org/licenses
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
To release a closed-source product which uses JUCE, commercial licenses are
|
||||||
|
available: visit www.juce.com for more information.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../JuceLibraryCode/JuceHeader.h"
|
||||||
|
#include "SurroundEditor.h"
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
class SurroundProcessor : public AudioProcessor, public ChannelClickListener
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
SurroundProcessor()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
~SurroundProcessor() {}
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
void prepareToPlay (double sampleRate, int samplesPerBlock) override
|
||||||
|
{
|
||||||
|
channelClicked = 0;
|
||||||
|
sampleOffset = static_cast<int> (std::ceil (sampleRate));
|
||||||
|
|
||||||
|
ignoreUnused (samplesPerBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void releaseResources() override {}
|
||||||
|
|
||||||
|
void processBlock (AudioSampleBuffer& buffer, MidiBuffer&) override
|
||||||
|
{
|
||||||
|
buffer.clear();
|
||||||
|
|
||||||
|
const int fillSamples
|
||||||
|
= jmin (static_cast<int> (std::ceil (getSampleRate())) - sampleOffset, buffer.getNumSamples());
|
||||||
|
|
||||||
|
float* channelBuffer = buffer.getWritePointer (channelClicked);
|
||||||
|
const float freq = 440.f / static_cast<float> (getSampleRate());
|
||||||
|
|
||||||
|
for (int i = 0; i < fillSamples; ++i)
|
||||||
|
channelBuffer[i] = std::sin (2.0f * static_cast<float> (M_PI) * freq * static_cast<float> (sampleOffset++));
|
||||||
|
}
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
AudioProcessorEditor* createEditor() override { return new SurroundEditor (*this); }
|
||||||
|
bool hasEditor() const override { return true; }
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
bool setPreferredBusArrangement (bool isInputBus, int busIndex,
|
||||||
|
const AudioChannelSet& preferred) override
|
||||||
|
{
|
||||||
|
if ( preferred == AudioChannelSet::mono()
|
||||||
|
|| preferred == AudioChannelSet::stereo()
|
||||||
|
|| preferred == AudioChannelSet::createLCR()
|
||||||
|
|| preferred == AudioChannelSet::createLCRS()
|
||||||
|
|| preferred == AudioChannelSet::quadraphonic()
|
||||||
|
|| preferred == AudioChannelSet::pentagonal()
|
||||||
|
|| preferred == AudioChannelSet::hexagonal()
|
||||||
|
|| preferred == AudioChannelSet::octagonal()
|
||||||
|
|| preferred == AudioChannelSet::ambisonic()
|
||||||
|
|| preferred == AudioChannelSet::create5point0()
|
||||||
|
|| preferred == AudioChannelSet::create5point1()
|
||||||
|
|| preferred == AudioChannelSet::create6point0()
|
||||||
|
|| preferred == AudioChannelSet::create6point1()
|
||||||
|
|| preferred == AudioChannelSet::create7point0()
|
||||||
|
|| preferred == AudioChannelSet::create7point1()
|
||||||
|
|| preferred == AudioChannelSet::createFront7point0()
|
||||||
|
|| preferred == AudioChannelSet::createFront7point1())
|
||||||
|
return AudioProcessor::setPreferredBusArrangement (isInputBus, busIndex, preferred);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
const String getName() const override { return "Surround PlugIn"; }
|
||||||
|
bool acceptsMidi() const override { return false; }
|
||||||
|
bool producesMidi() const override { return false; }
|
||||||
|
bool silenceInProducesSilenceOut() const override { return true; }
|
||||||
|
double getTailLengthSeconds() const override { return 0; }
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
int getNumPrograms() override { return 1; }
|
||||||
|
int getCurrentProgram() override { return 0; }
|
||||||
|
void setCurrentProgram (int) override {}
|
||||||
|
const String getProgramName (int) override { return String(); }
|
||||||
|
void changeProgramName (int , const String& ) override { }
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
void getStateInformation (MemoryBlock&) override {}
|
||||||
|
void setStateInformation (const void* , int) override {}
|
||||||
|
|
||||||
|
void channelButtonClicked (int channelIndex) override
|
||||||
|
{
|
||||||
|
channelClicked = channelIndex;
|
||||||
|
sampleOffset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
int channelClicked;
|
||||||
|
int sampleOffset;
|
||||||
|
//==============================================================================
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SurroundProcessor)
|
||||||
|
};
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// This creates new instances of the plugin..
|
||||||
|
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
||||||
|
{
|
||||||
|
return new SurroundProcessor();
|
||||||
|
}
|
||||||
115
examples/PlugInSamples/Surround/Surround.jucer
Normal file
115
examples/PlugInSamples/Surround/Surround.jucer
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<JUCERPROJECT id="S8q71q" name="Surround" projectType="audioplug" version="1.0.0"
|
||||||
|
bundleIdentifier="com.ROLI.Surround" includeBinaryInAppConfig="1"
|
||||||
|
buildVST="1" buildVST3="1" buildAU="1" buildRTAS="0" buildAAX="1"
|
||||||
|
pluginName="Surround" pluginDesc="Surround" pluginManufacturer="ROLI Ltd."
|
||||||
|
pluginManufacturerCode="ROLI" pluginCode="Srrd" pluginChannelConfigs=""
|
||||||
|
pluginIsSynth="1" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
||||||
|
pluginIsMidiEffectPlugin="0" pluginSilenceInIsSilenceOut="0"
|
||||||
|
pluginEditorRequiresKeys="0" pluginAUExportPrefix="SurroundAU"
|
||||||
|
pluginRTASCategory="" aaxIdentifier="com.ROLI.Surround" pluginAAXCategory="AAX_ePlugInCategory_Dynamics"
|
||||||
|
jucerVersion="4.1.0">
|
||||||
|
<MAINGROUP id="dEAH7t" name="Surround">
|
||||||
|
<GROUP id="{1CB41212-BD0E-AC71-15E8-C40AD59BD2EE}" name="Source">
|
||||||
|
<FILE id="sLk2ic" name="SurroundProcessor.cpp" compile="1" resource="0"
|
||||||
|
file="Source/SurroundProcessor.cpp"/>
|
||||||
|
<FILE id="oVnvtx" name="SurroundEditor.h" compile="0" resource="0"
|
||||||
|
file="Source/SurroundEditor.h"/>
|
||||||
|
</GROUP>
|
||||||
|
</MAINGROUP>
|
||||||
|
<EXPORTFORMATS>
|
||||||
|
<XCODE_MAC targetFolder="Builds/MacOSX" postbuildCommand=" # This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on # which plugin types you've built original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME # this looks inside the binary to detect which platforms are needed.. copyAU=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'AudioUnit' | wc -l` copyVST=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'VSTPlugin' | wc -l` copyVST3=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'GetPluginFactory' | wc -l` copyRTAS=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'CProcess' | wc -l` copyAAX=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'ACFStartup' | wc -l` if [ $copyAU -gt 0 ]; then echo "Copying to AudioUnit folder..." AUDir=~/Library/Audio/Plug-Ins/Components mkdir -p "$AUDir" AU=$AUDir/$PRODUCT_NAME.component if [ -d "$AU" ]; then rm -r "$AU" fi cp -r "$original" "$AU" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE" fi if [ $copyVST -gt 0 ]; then echo "Copying to VST folder..." VSTDir=~/Library/Audio/Plug-Ins/VST mkdir -p "$VSTDir" VST=$VSTDir/$PRODUCT_NAME.vst if [ -d "$VST" ]; then rm -r "$VST" fi cp -r "$original" "$VST" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE" fi if [ $copyVST3 -gt 0 ]; then echo "Copying to VST3 folder..." VST3Dir=~/Library/Audio/Plug-Ins/VST3 mkdir -p "$VST3Dir" VST3=$VST3Dir/$PRODUCT_NAME.vst3 if [ -d "$VST3" ]; then rm -r "$VST3" fi cp -r "$original" "$VST3" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE" fi if [ $copyRTAS -gt 0 ]; then echo "Copying to RTAS folder..." RTASDir=/Library/Application\ Support/Digidesign/Plug-Ins if [ -d "$RTASDir" ]; then RTAS=$RTASDir/$PRODUCT_NAME.dpm if [ -d "$RTAS" ]; then rm -r "$RTAS" fi cp -r "$original" "$RTAS" fi fi if [ $copyAAX -gt 0 ]; then echo "Copying to AAX folder..." if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX1" ]; then rm -r "$AAX1" fi cp -R -H "$original" "$AAX1" fi if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX2" ]; then rm -r "$AAX2" fi cp -R -H "$original" "$AAX2" fi fi "
|
||||||
|
vstFolder="" vst3Folder="" aaxFolder="" extraDefs="" extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion">
|
||||||
|
<CONFIGURATIONS>
|
||||||
|
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
|
||||||
|
isDebug="1" optimisation="1" targetName="Surround" cppLibType="libstdc++"/>
|
||||||
|
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
|
||||||
|
isDebug="0" optimisation="3" targetName="Surround" cppLibType="libstdc++"/>
|
||||||
|
</CONFIGURATIONS>
|
||||||
|
<MODULEPATHS>
|
||||||
|
<MODULEPATH id="juce_core" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_events" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_graphics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_data_structures" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_extra" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_cryptography" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_video" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_opengl" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_devices" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_formats" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_processors" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_plugin_client" path="../../../modules"/>
|
||||||
|
</MODULEPATHS>
|
||||||
|
</XCODE_MAC>
|
||||||
|
<VS2015 targetFolder="Builds/VisualStudio2015" vstFolder="" vst3Folder=""
|
||||||
|
aaxFolder="" toolset="v140_xp">
|
||||||
|
<CONFIGURATIONS>
|
||||||
|
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
|
||||||
|
isDebug="1" optimisation="1" targetName="Surround" useRuntimeLibDLL="0"/>
|
||||||
|
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
|
||||||
|
isDebug="0" optimisation="3" targetName="Surround" useRuntimeLibDLL="0"/>
|
||||||
|
</CONFIGURATIONS>
|
||||||
|
<MODULEPATHS>
|
||||||
|
<MODULEPATH id="juce_core" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_events" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_graphics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_data_structures" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_extra" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_cryptography" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_video" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_opengl" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_devices" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_formats" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_processors" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_plugin_client" path="../../../modules"/>
|
||||||
|
</MODULEPATHS>
|
||||||
|
</VS2015>
|
||||||
|
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" vstFolder="" vst3Folder=""
|
||||||
|
extraDefs="" extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion">
|
||||||
|
<CONFIGURATIONS>
|
||||||
|
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"
|
||||||
|
targetName="Surround"/>
|
||||||
|
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3"
|
||||||
|
targetName="Surround"/>
|
||||||
|
</CONFIGURATIONS>
|
||||||
|
<MODULEPATHS>
|
||||||
|
<MODULEPATH id="juce_core" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_events" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_graphics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_data_structures" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_gui_extra" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_cryptography" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_video" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_opengl" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_basics" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_devices" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_formats" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_processors" path="../../../modules"/>
|
||||||
|
<MODULEPATH id="juce_audio_plugin_client" path="../../../modules"/>
|
||||||
|
</MODULEPATHS>
|
||||||
|
</LINUX_MAKE>
|
||||||
|
</EXPORTFORMATS>
|
||||||
|
<MODULES>
|
||||||
|
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_cryptography" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_opengl" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
<MODULE id="juce_video" showAllCode="1" useLocalCopy="0"/>
|
||||||
|
</MODULES>
|
||||||
|
<JUCEOPTIONS JUCE_QUICKTIME="disabled"/>
|
||||||
|
</JUCERPROJECT>
|
||||||
|
|
@ -113,6 +113,15 @@ struct AAXClasses
|
||||||
return AAX::IsParameterIDEqual (paramID, cDefaultMasterBypassID) != 0;
|
return AAX::IsParameterIDEqual (paramID, cDefaultMasterBypassID) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// maps a channel index of an AAX format to an index of a juce format
|
||||||
|
struct AAXChannelStreamOrder
|
||||||
|
{
|
||||||
|
AAX_EStemFormat aaxStemFormat;
|
||||||
|
AudioChannelSet::ChannelType speakerOrder[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
static AAXChannelStreamOrder aaxChannelOrder[];
|
||||||
|
|
||||||
static AAX_EStemFormat getFormatForAudioChannelSet (const AudioChannelSet& set, bool ignoreLayout) noexcept
|
static AAX_EStemFormat getFormatForAudioChannelSet (const AudioChannelSet& set, bool ignoreLayout) noexcept
|
||||||
{
|
{
|
||||||
// if the plug-in ignores layout, it is ok to convert between formats only by their numchannnels
|
// if the plug-in ignores layout, it is ok to convert between formats only by their numchannnels
|
||||||
|
|
@ -221,6 +230,24 @@ struct AAXClasses
|
||||||
return Colours::black;
|
return Colours::black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int juceChannelIndexToAax (int juceIndex, const AudioChannelSet& channelSet)
|
||||||
|
{
|
||||||
|
AAX_EStemFormat currentLayout = getFormatForAudioChannelSet (channelSet, false);
|
||||||
|
|
||||||
|
int layoutIndex;
|
||||||
|
for (layoutIndex = 0; aaxChannelOrder[layoutIndex].aaxStemFormat != currentLayout; ++layoutIndex)
|
||||||
|
if (aaxChannelOrder[layoutIndex].aaxStemFormat == 0) return juceIndex;
|
||||||
|
|
||||||
|
const AAXChannelStreamOrder& channelOrder = aaxChannelOrder[layoutIndex];
|
||||||
|
const AudioChannelSet::ChannelType channelType = channelSet.getTypeOfChannel (static_cast<int> (juceIndex));
|
||||||
|
|
||||||
|
for (int i = 0; i < 8 && channelOrder.speakerOrder[i] != 0; ++i)
|
||||||
|
if (channelOrder.speakerOrder[i] == channelType)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return juceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
class JuceAAX_Processor;
|
class JuceAAX_Processor;
|
||||||
|
|
||||||
|
|
@ -841,7 +868,7 @@ struct AAXClasses
|
||||||
jassert (idx < (mainNumIns + 1));
|
jassert (idx < (mainNumIns + 1));
|
||||||
|
|
||||||
if (idx < mainNumIns)
|
if (idx < mainNumIns)
|
||||||
return inputs[idx];
|
return inputs[inputLayoutMap[idx]];
|
||||||
|
|
||||||
return (sidechain != -1 ? inputs[sidechain] : sideChainBuffer.getData());
|
return (sidechain != -1 ? inputs[sidechain] : sideChainBuffer.getData());
|
||||||
}
|
}
|
||||||
|
|
@ -862,26 +889,32 @@ struct AAXClasses
|
||||||
{
|
{
|
||||||
const int mainNumIns = numIns > 0 ? pluginInstance->busArrangement.inputBuses.getReference (0).channels.size() : 0;
|
const int mainNumIns = numIns > 0 ? pluginInstance->busArrangement.inputBuses.getReference (0).channels.size() : 0;
|
||||||
const int sidechain = busUtils.getNumEnabledBuses (true) >= 2 ? sideChainBufferIdx : -1;
|
const int sidechain = busUtils.getNumEnabledBuses (true) >= 2 ? sideChainBufferIdx : -1;
|
||||||
|
const int numChans = jmax (numIns, numOuts);
|
||||||
|
|
||||||
|
if (numChans == 0) return;
|
||||||
|
|
||||||
|
if (channelList.size() <= numChans)
|
||||||
|
channelList.insertMultiple (-1, nullptr, 1 + numChans - channelList.size());
|
||||||
|
|
||||||
|
float** channels = channelList.getRawDataPointer();
|
||||||
|
|
||||||
if (numOuts >= numIns)
|
if (numOuts >= numIns)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < numIns; ++i)
|
for (int i = 0; i < numOuts; ++i)
|
||||||
memcpy (outputs[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
|
channels[i] = outputs[outputLayoutMap[i]];
|
||||||
|
|
||||||
process (outputs, numOuts, bufferSize, bypass, midiNodeIn, midiNodesOut);
|
for (int i = 0; i < numIns; ++i)
|
||||||
|
memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
|
||||||
|
|
||||||
|
process (channels, numOuts, bufferSize, bypass, midiNodeIn, midiNodesOut);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (channelList.size() <= numIns)
|
for (int i = 0; i < numOuts; ++i)
|
||||||
channelList.insertMultiple (-1, nullptr, 1 + numIns - channelList.size());
|
channels[i] = outputs[outputLayoutMap[i]];
|
||||||
|
|
||||||
float** channels = channelList.getRawDataPointer();
|
|
||||||
|
|
||||||
for (int i = 0; i < numOuts; ++i)
|
for (int i = 0; i < numOuts; ++i)
|
||||||
{
|
memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
|
||||||
memcpy (outputs[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
|
|
||||||
channels[i] = outputs[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = numOuts; i < numIns; ++i)
|
for (int i = numOuts; i < numIns; ++i)
|
||||||
channels[i] = const_cast<float*> (getAudioBufferForInput (inputs, sidechain, mainNumIns, i));
|
channels[i] = const_cast<float*> (getAudioBufferForInput (inputs, sidechain, mainNumIns, i));
|
||||||
|
|
@ -1062,6 +1095,9 @@ struct AAXClasses
|
||||||
|| (busUtils.getBusCount (false) > 0 && busUtils.getChannelSet (false, 0) != outputSet)
|
|| (busUtils.getBusCount (false) > 0 && busUtils.getChannelSet (false, 0) != outputSet)
|
||||||
|| (hasSidechain && busUtils.getNumChannels(true, 1) != 1))
|
|| (hasSidechain && busUtils.getNumChannels(true, 1) != 1))
|
||||||
return AAX_ERROR_UNIMPLEMENTED;
|
return AAX_ERROR_UNIMPLEMENTED;
|
||||||
|
|
||||||
|
rebuildChannelMapArrays (true);
|
||||||
|
rebuildChannelMapArrays (false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
audioProcessor.setRateAndBufferSizeDetails (sampleRate, maxBufferSize);
|
audioProcessor.setRateAndBufferSizeDetails (sampleRate, maxBufferSize);
|
||||||
|
|
@ -1073,6 +1109,30 @@ struct AAXClasses
|
||||||
return AAX_SUCCESS;
|
return AAX_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rebuildChannelMapArrays (bool isInput)
|
||||||
|
{
|
||||||
|
Array<int>& layoutMap = isInput ? inputLayoutMap : outputLayoutMap;
|
||||||
|
layoutMap.clear();
|
||||||
|
|
||||||
|
const int n = isInput ? jmin (busUtils.getBusCount (true), 1) : busUtils.getBusCount (false);
|
||||||
|
|
||||||
|
int chOffset = 0;
|
||||||
|
for (int busIdx = 0; busIdx < n; ++busIdx)
|
||||||
|
{
|
||||||
|
const AudioChannelSet channelFormat = busUtils.getChannelSet (isInput, busIdx);
|
||||||
|
|
||||||
|
if (channelFormat != AudioChannelSet::disabled())
|
||||||
|
{
|
||||||
|
const int numChannels = channelFormat.size();
|
||||||
|
|
||||||
|
for (int ch = 0; ch < numChannels; ++ch)
|
||||||
|
layoutMap.add (juceChannelIndexToAax (ch, channelFormat) + chOffset);
|
||||||
|
|
||||||
|
chOffset += numChannels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScopedJuceInitialiser_GUI libraryInitialiser;
|
ScopedJuceInitialiser_GUI libraryInitialiser;
|
||||||
|
|
||||||
ScopedPointer<AudioProcessor> pluginInstance;
|
ScopedPointer<AudioProcessor> pluginInstance;
|
||||||
|
|
@ -1084,6 +1144,7 @@ struct AAXClasses
|
||||||
int lastBufferSize, maxBufferSize;
|
int lastBufferSize, maxBufferSize;
|
||||||
bool hasSidechain;
|
bool hasSidechain;
|
||||||
HeapBlock<float> sideChainBuffer;
|
HeapBlock<float> sideChainBuffer;
|
||||||
|
Array<int> inputLayoutMap, outputLayoutMap;
|
||||||
|
|
||||||
struct ChunkMemoryBlock : public ReferenceCountedObject
|
struct ChunkMemoryBlock : public ReferenceCountedObject
|
||||||
{
|
{
|
||||||
|
|
@ -1448,6 +1509,25 @@ struct AAXClasses
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
AAXClasses::AAXChannelStreamOrder AAXClasses::aaxChannelOrder[] =
|
||||||
|
{
|
||||||
|
{AAX_eStemFormat_Mono, {AudioChannelSet::centre, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_Stereo, {AudioChannelSet::left, AudioChannelSet::right, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_LCR, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_LCRS, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::surround, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_Quad, {AudioChannelSet::left, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_5_0, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_5_1, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::subbass, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_6_0, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surround, AudioChannelSet::surroundRight, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_6_1, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surround, AudioChannelSet::surroundRight, AudioChannelSet::subbass, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_7_0_SDDS, {AudioChannelSet::left, AudioChannelSet::centreLeft, AudioChannelSet::centre, AudioChannelSet::centreRight, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_7_0_DTS, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::sideLeft, AudioChannelSet::sideRight, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::unknown}},
|
||||||
|
{AAX_eStemFormat_7_1_SDDS, {AudioChannelSet::left, AudioChannelSet::centreLeft, AudioChannelSet::centre, AudioChannelSet::centreRight, AudioChannelSet::right, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::subbass}},
|
||||||
|
{AAX_eStemFormat_7_1_DTS, {AudioChannelSet::left, AudioChannelSet::centre, AudioChannelSet::right, AudioChannelSet::sideLeft, AudioChannelSet::sideRight, AudioChannelSet::surroundLeft, AudioChannelSet::surroundRight, AudioChannelSet::subbass}},
|
||||||
|
{AAX_eStemFormat_None, {AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown, AudioChannelSet::unknown}},
|
||||||
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection*);
|
AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection*);
|
||||||
AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection* collection)
|
AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection* collection)
|
||||||
|
|
|
||||||
|
|
@ -1007,20 +1007,23 @@ public:
|
||||||
|
|
||||||
for (unsigned int chIdx = 0; chIdx < numOutChannels; ++chIdx)
|
for (unsigned int chIdx = 0; chIdx < numOutChannels; ++chIdx)
|
||||||
{
|
{
|
||||||
|
int mappedInChIdx = numInChannels > 0 ? inputLayoutMap.getReference (static_cast<int> (busIdx))[static_cast<int> (chIdx)] : 0;
|
||||||
|
int mappedOutChIdx = outputLayoutMap.getReference (static_cast<int> (busIdx))[static_cast<int> (chIdx)];
|
||||||
|
|
||||||
const bool isOutputInterleaved = (numOutChannels > 1) && (outBuffer.mNumberBuffers == 1);
|
const bool isOutputInterleaved = (numOutChannels > 1) && (outBuffer.mNumberBuffers == 1);
|
||||||
float* outData = isOutputInterleaved ? scratchBuffers[scratchIdx++] : static_cast<float*> (outBuffer.mBuffers[chIdx].mData);
|
float* outData = isOutputInterleaved ? scratchBuffers[scratchIdx++] : static_cast<float*> (outBuffer.mBuffers[mappedOutChIdx].mData);
|
||||||
|
|
||||||
if (chIdx < numInChannels)
|
if (chIdx < numInChannels)
|
||||||
{
|
{
|
||||||
const AudioBufferList& inBuffer = input->GetBufferList();
|
const AudioBufferList& inBuffer = input->GetBufferList();
|
||||||
const bool isInputInterleaved = (numInChannels > 1) && (inBuffer.mNumberBuffers == 1);
|
const bool isInputInterleaved = (numInChannels > 1) && (inBuffer.mNumberBuffers == 1);
|
||||||
const float* inData = static_cast<float*> (inBuffer.mBuffers[isInputInterleaved ? 0 : chIdx].mData);
|
const float* inData = static_cast<float*> (inBuffer.mBuffers[isInputInterleaved ? 0 : mappedInChIdx].mData);
|
||||||
|
|
||||||
if (isInputInterleaved)
|
if (isInputInterleaved)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < nFrames; ++i)
|
for (unsigned int i = 0; i < nFrames; ++i)
|
||||||
{
|
{
|
||||||
outData [i] = inData[chIdx];
|
outData [i] = inData[mappedInChIdx];
|
||||||
inData += numInChannels;
|
inData += numInChannels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1038,15 +1041,17 @@ public:
|
||||||
|
|
||||||
for (unsigned int chIdx = 0; chIdx < numInChannels; ++chIdx)
|
for (unsigned int chIdx = 0; chIdx < numInChannels; ++chIdx)
|
||||||
{
|
{
|
||||||
|
int mappedInChIdx = inputLayoutMap.getReference (static_cast<int> (busIdx))[static_cast<int> (chIdx)];
|
||||||
|
|
||||||
float* buffer = isInputInterleaved ? scratchBuffers[scratchIdx++]
|
float* buffer = isInputInterleaved ? scratchBuffers[scratchIdx++]
|
||||||
: static_cast<float*> (inBuffer.mBuffers[chIdx].mData);
|
: static_cast<float*> (inBuffer.mBuffers[mappedInChIdx].mData);
|
||||||
|
|
||||||
if (isInputInterleaved)
|
if (isInputInterleaved)
|
||||||
{
|
{
|
||||||
const float* inData = static_cast<float*> (inBuffer.mBuffers[0].mData);
|
const float* inData = static_cast<float*> (inBuffer.mBuffers[0].mData);
|
||||||
for (unsigned int i = 0; i < nFrames; ++i)
|
for (unsigned int i = 0; i < nFrames; ++i)
|
||||||
{
|
{
|
||||||
buffer [i] = inData [chIdx];
|
buffer [i] = inData [mappedInChIdx];
|
||||||
inData += numInChannels;
|
inData += numInChannels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1107,14 +1112,16 @@ public:
|
||||||
|
|
||||||
for (unsigned int chIdx = 0; chIdx < numOutChannels; ++chIdx)
|
for (unsigned int chIdx = 0; chIdx < numOutChannels; ++chIdx)
|
||||||
{
|
{
|
||||||
float* outData = static_cast<float*> (outBuffer.mBuffers[isOutputInterleaved ? 0 : chIdx].mData);
|
int mappedOutChIdx = outputLayoutMap.getReference (static_cast<int> (busIdx))[static_cast<int> (chIdx)];
|
||||||
|
|
||||||
|
float* outData = static_cast<float*> (outBuffer.mBuffers[isOutputInterleaved ? 0 : mappedOutChIdx].mData);
|
||||||
const float* buffer = static_cast<float*> (channels [idx++]);
|
const float* buffer = static_cast<float*> (channels [idx++]);
|
||||||
|
|
||||||
if (isOutputInterleaved)
|
if (isOutputInterleaved)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < nFrames; ++i)
|
for (unsigned int i = 0; i < nFrames; ++i)
|
||||||
{
|
{
|
||||||
outData [chIdx] = buffer[i];
|
outData [mappedOutChIdx] = buffer[i];
|
||||||
outData += numOutChannels;
|
outData += numOutChannels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1521,6 +1528,7 @@ private:
|
||||||
Array<AUChannelInfo> channelInfo;
|
Array<AUChannelInfo> channelInfo;
|
||||||
Array<Array<AudioChannelLayoutTag> > supportedInputLayouts, supportedOutputLayouts;
|
Array<Array<AudioChannelLayoutTag> > supportedInputLayouts, supportedOutputLayouts;
|
||||||
Array<AudioChannelLayoutTag> currentInputLayout, currentOutputLayout;
|
Array<AudioChannelLayoutTag> currentInputLayout, currentOutputLayout;
|
||||||
|
Array<Array<int> > inputLayoutMap, outputLayoutMap;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
static OSStatus scopeToDirection (AudioUnitScope scope, bool& isInput) noexcept
|
static OSStatus scopeToDirection (AudioUnitScope scope, bool& isInput) noexcept
|
||||||
|
|
@ -1580,6 +1588,12 @@ private:
|
||||||
const int numInputElements = static_cast<int> (GetScope(kAudioUnitScope_Input). GetNumberOfElements());
|
const int numInputElements = static_cast<int> (GetScope(kAudioUnitScope_Input). GetNumberOfElements());
|
||||||
const int numOutputElements = static_cast<int> (GetScope(kAudioUnitScope_Output).GetNumberOfElements());
|
const int numOutputElements = static_cast<int> (GetScope(kAudioUnitScope_Output).GetNumberOfElements());
|
||||||
|
|
||||||
|
inputLayoutMap. clear();
|
||||||
|
outputLayoutMap.clear();
|
||||||
|
|
||||||
|
inputLayoutMap. resize (numInputElements);
|
||||||
|
outputLayoutMap.resize (numOutputElements);
|
||||||
|
|
||||||
for (int i = 0; i < numInputElements; ++i)
|
for (int i = 0; i < numInputElements; ++i)
|
||||||
if ((err = syncProcessorWithAudioUnitForBus (true, i)) != noErr) return err;
|
if ((err = syncProcessorWithAudioUnitForBus (true, i)) != noErr) return err;
|
||||||
|
|
||||||
|
|
@ -1612,8 +1626,17 @@ private:
|
||||||
if (numChannels != tagNumChannels)
|
if (numChannels != tagNumChannels)
|
||||||
return kAudioUnitErr_FormatNotSupported;
|
return kAudioUnitErr_FormatNotSupported;
|
||||||
|
|
||||||
if (juceFilter->setPreferredBusArrangement (isInput, busNr, CALayoutTagToChannelSet(currentLayoutTag)))
|
const AudioChannelSet channelFormat = CALayoutTagToChannelSet(currentLayoutTag);
|
||||||
return noErr;
|
|
||||||
|
if (! juceFilter->setPreferredBusArrangement (isInput, busNr, channelFormat))
|
||||||
|
return kAudioUnitErr_FormatNotSupported;
|
||||||
|
|
||||||
|
Array<int>& layoutMap = (isInput ? inputLayoutMap : outputLayoutMap).getReference (busNr);
|
||||||
|
|
||||||
|
for (int i = 0; i < numChannels; ++i)
|
||||||
|
layoutMap.add (auChannelIndexToJuce (i, channelFormat));
|
||||||
|
|
||||||
|
return noErr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
jassertfalse;
|
jassertfalse;
|
||||||
|
|
@ -1853,6 +1876,50 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
// maps a channel index into an AU format to an index of a juce format
|
||||||
|
struct AUChannelStreamOrder
|
||||||
|
{
|
||||||
|
AudioChannelLayoutTag auLayoutTag;
|
||||||
|
AudioChannelLabel speakerOrder[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
static AUChannelStreamOrder auChannelStreamOrder[];
|
||||||
|
|
||||||
|
static int auChannelIndexToJuce (int auIndex, const AudioChannelSet& channelSet)
|
||||||
|
{
|
||||||
|
if (auIndex >= 8) return auIndex;
|
||||||
|
|
||||||
|
AudioChannelLayoutTag currentLayout = ChannelSetToCALayoutTag (channelSet);
|
||||||
|
|
||||||
|
int layoutIndex;
|
||||||
|
for (layoutIndex = 0; auChannelStreamOrder[layoutIndex].auLayoutTag != currentLayout; ++layoutIndex)
|
||||||
|
if (auChannelStreamOrder[layoutIndex].auLayoutTag == 0) return auIndex;
|
||||||
|
|
||||||
|
const AudioChannelSet::ChannelType channelType
|
||||||
|
= CoreAudioChannelLabelToJuceType (auChannelStreamOrder[layoutIndex].speakerOrder[auIndex]);
|
||||||
|
|
||||||
|
const int juceIndex = channelSet.getChannelTypes().indexOf (channelType);
|
||||||
|
return juceIndex >= 0 ? juceIndex : auIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int juceChannelIndexToAu (int juceIndex, const AudioChannelSet& channelSet)
|
||||||
|
{
|
||||||
|
AudioChannelLayoutTag currentLayout = ChannelSetToCALayoutTag (channelSet);
|
||||||
|
|
||||||
|
int layoutIndex;
|
||||||
|
for (layoutIndex = 0; auChannelStreamOrder[layoutIndex].auLayoutTag != currentLayout; ++layoutIndex)
|
||||||
|
if (auChannelStreamOrder[layoutIndex].auLayoutTag == 0) return juceIndex;
|
||||||
|
|
||||||
|
const AUChannelStreamOrder& channelOrder = auChannelStreamOrder[layoutIndex];
|
||||||
|
const AudioChannelSet::ChannelType channelType = channelSet.getTypeOfChannel (juceIndex);
|
||||||
|
|
||||||
|
for (int i = 0; i < 8 && channelOrder.speakerOrder[i] != 0; ++i)
|
||||||
|
if (CoreAudioChannelLabelToJuceType (channelOrder.speakerOrder[i]) == channelType)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return juceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
static AudioChannelSet::ChannelType CoreAudioChannelLabelToJuceType (AudioChannelLabel label) noexcept
|
static AudioChannelSet::ChannelType CoreAudioChannelLabelToJuceType (AudioChannelLabel label) noexcept
|
||||||
{
|
{
|
||||||
if (label >= kAudioChannelLabel_Discrete_0 && label <= kAudioChannelLabel_Discrete_65535)
|
if (label >= kAudioChannelLabel_Discrete_0 && label <= kAudioChannelLabel_Discrete_65535)
|
||||||
|
|
@ -1887,10 +1954,58 @@ private:
|
||||||
case kAudioChannelLabel_RearSurroundRight: return AudioChannelSet::topRearRight;
|
case kAudioChannelLabel_RearSurroundRight: return AudioChannelSet::topRearRight;
|
||||||
case kAudioChannelLabel_TopBackCenter: return AudioChannelSet::topRearCentre;
|
case kAudioChannelLabel_TopBackCenter: return AudioChannelSet::topRearCentre;
|
||||||
case kAudioChannelLabel_LFE2: return AudioChannelSet::subbass2;
|
case kAudioChannelLabel_LFE2: return AudioChannelSet::subbass2;
|
||||||
|
case kAudioChannelLabel_LeftWide: return AudioChannelSet::wideLeft;
|
||||||
|
case kAudioChannelLabel_RightWide: return AudioChannelSet::wideRight;
|
||||||
|
case kAudioChannelLabel_Ambisonic_W: return AudioChannelSet::ambisonicW;
|
||||||
|
case kAudioChannelLabel_Ambisonic_X: return AudioChannelSet::ambisonicX;
|
||||||
|
case kAudioChannelLabel_Ambisonic_Y: return AudioChannelSet::ambisonicY;
|
||||||
|
case kAudioChannelLabel_Ambisonic_Z: return AudioChannelSet::ambisonicZ;
|
||||||
default: return AudioChannelSet::unknown;
|
default: return AudioChannelSet::unknown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static AudioChannelLabel JuceChannelTypeToCoreAudioLabel (const AudioChannelSet::ChannelType& label) noexcept
|
||||||
|
{
|
||||||
|
if (label >= AudioChannelSet::discreteChannel0)
|
||||||
|
{
|
||||||
|
const unsigned int discreteChannelNum = label - AudioChannelSet::discreteChannel0;;
|
||||||
|
return static_cast<AudioChannelLabel> (kAudioChannelLabel_Discrete_0 + discreteChannelNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (label)
|
||||||
|
{
|
||||||
|
case AudioChannelSet::centre: return kAudioChannelLabel_Center;
|
||||||
|
case AudioChannelSet::left: return kAudioChannelLabel_Left;
|
||||||
|
case AudioChannelSet::right: return kAudioChannelLabel_Right;
|
||||||
|
case AudioChannelSet::subbass: return kAudioChannelLabel_LFEScreen;
|
||||||
|
case AudioChannelSet::surroundLeft: return kAudioChannelLabel_LeftSurround;
|
||||||
|
case AudioChannelSet::surroundRight: return kAudioChannelLabel_RightSurround;
|
||||||
|
case AudioChannelSet::centreLeft: return kAudioChannelLabel_LeftCenter;
|
||||||
|
case AudioChannelSet::centreRight: return kAudioChannelLabel_RightCenter;
|
||||||
|
case AudioChannelSet::surround: return kAudioChannelLabel_CenterSurround;
|
||||||
|
case AudioChannelSet::sideLeft: return kAudioChannelLabel_LeftSurroundDirect;
|
||||||
|
case AudioChannelSet::sideRight: return kAudioChannelLabel_RightSurroundDirect;
|
||||||
|
case AudioChannelSet::topMiddle: return kAudioChannelLabel_TopCenterSurround;
|
||||||
|
case AudioChannelSet::topFrontLeft: return kAudioChannelLabel_VerticalHeightLeft;
|
||||||
|
case AudioChannelSet::topFrontRight: return kAudioChannelLabel_VerticalHeightRight;
|
||||||
|
case AudioChannelSet::topFrontCentre: return kAudioChannelLabel_VerticalHeightCenter;
|
||||||
|
case AudioChannelSet::topRearLeft: return kAudioChannelLabel_RearSurroundLeft;
|
||||||
|
case AudioChannelSet::topRearRight: return kAudioChannelLabel_RearSurroundRight;
|
||||||
|
case AudioChannelSet::topRearCentre: return kAudioChannelLabel_TopBackCenter;
|
||||||
|
case AudioChannelSet::subbass2: return kAudioChannelLabel_LFE2;
|
||||||
|
case AudioChannelSet::wideLeft: return kAudioChannelLabel_LeftWide;
|
||||||
|
case AudioChannelSet::wideRight: return kAudioChannelLabel_RightWide;
|
||||||
|
case AudioChannelSet::ambisonicW: return kAudioChannelLabel_Ambisonic_W;
|
||||||
|
case AudioChannelSet::ambisonicX: return kAudioChannelLabel_Ambisonic_X;
|
||||||
|
case AudioChannelSet::ambisonicY: return kAudioChannelLabel_Ambisonic_Y;
|
||||||
|
case AudioChannelSet::ambisonicZ: return kAudioChannelLabel_Ambisonic_Z;
|
||||||
|
case AudioChannelSet::unknown: return kAudioChannelLabel_Unknown;
|
||||||
|
case AudioChannelSet::discreteChannel0: return kAudioChannelLabel_Discrete_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return kAudioChannelLabel_Unknown;
|
||||||
|
}
|
||||||
|
|
||||||
static AudioChannelSet CoreAudioChannelBitmapToJuceType (UInt32 bitmap) noexcept
|
static AudioChannelSet CoreAudioChannelBitmapToJuceType (UInt32 bitmap) noexcept
|
||||||
{
|
{
|
||||||
AudioChannelSet set;
|
AudioChannelSet set;
|
||||||
|
|
@ -1955,6 +2070,10 @@ private:
|
||||||
case kAudioChannelLayoutTag_MPEG_7_1_C: return AudioChannelSet::create7point1();
|
case kAudioChannelLayoutTag_MPEG_7_1_C: return AudioChannelSet::create7point1();
|
||||||
case kAudioChannelLayoutTag_AudioUnit_7_0_Front: return AudioChannelSet::createFront7point0();
|
case kAudioChannelLayoutTag_AudioUnit_7_0_Front: return AudioChannelSet::createFront7point0();
|
||||||
case kAudioChannelLayoutTag_AudioUnit_7_1_Front: return AudioChannelSet::createFront7point1();
|
case kAudioChannelLayoutTag_AudioUnit_7_1_Front: return AudioChannelSet::createFront7point1();
|
||||||
|
case kAudioChannelLayoutTag_MPEG_3_0_A:
|
||||||
|
case kAudioChannelLayoutTag_MPEG_3_0_B: return AudioChannelSet::createLCR();
|
||||||
|
case kAudioChannelLayoutTag_MPEG_4_0_A:
|
||||||
|
case kAudioChannelLayoutTag_MPEG_4_0_B: return AudioChannelSet::createLCRS();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int numChannels = static_cast<int> (tag) & 0xffff)
|
if (int numChannels = static_cast<int> (tag) & 0xffff)
|
||||||
|
|
@ -1969,6 +2088,8 @@ private:
|
||||||
{
|
{
|
||||||
if (set == AudioChannelSet::mono()) return kAudioChannelLayoutTag_Mono;
|
if (set == AudioChannelSet::mono()) return kAudioChannelLayoutTag_Mono;
|
||||||
if (set == AudioChannelSet::stereo()) return kAudioChannelLayoutTag_Stereo;
|
if (set == AudioChannelSet::stereo()) return kAudioChannelLayoutTag_Stereo;
|
||||||
|
if (set == AudioChannelSet::createLCR()) return kAudioChannelLayoutTag_MPEG_3_0_A;
|
||||||
|
if (set == AudioChannelSet::createLCRS()) return kAudioChannelLayoutTag_MPEG_4_0_A;
|
||||||
if (set == AudioChannelSet::quadraphonic()) return kAudioChannelLayoutTag_Quadraphonic;
|
if (set == AudioChannelSet::quadraphonic()) return kAudioChannelLayoutTag_Quadraphonic;
|
||||||
if (set == AudioChannelSet::pentagonal()) return kAudioChannelLayoutTag_Pentagonal;
|
if (set == AudioChannelSet::pentagonal()) return kAudioChannelLayoutTag_Pentagonal;
|
||||||
if (set == AudioChannelSet::hexagonal()) return kAudioChannelLayoutTag_Hexagonal;
|
if (set == AudioChannelSet::hexagonal()) return kAudioChannelLayoutTag_Hexagonal;
|
||||||
|
|
@ -2024,6 +2145,31 @@ private:
|
||||||
JUCE_DECLARE_NON_COPYABLE (JuceAU)
|
JUCE_DECLARE_NON_COPYABLE (JuceAU)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
JuceAU::AUChannelStreamOrder JuceAU::auChannelStreamOrder[] =
|
||||||
|
{
|
||||||
|
{kAudioChannelLayoutTag_Mono, {kAudioChannelLabel_Center, 0, 0, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Stereo, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, 0, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_StereoHeadphones, {kAudioChannelLabel_HeadphonesLeft, kAudioChannelLabel_HeadphonesRight, 0, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Binaural, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, 0, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Quadraphonic, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Pentagonal, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Hexagonal, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, kAudioChannelLabel_CenterSurround, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_Octagonal, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, kAudioChannelLabel_CenterSurround, kAudioChannelLabel_LeftWide, kAudioChannelLabel_RightWide}},
|
||||||
|
{kAudioChannelLayoutTag_Ambisonic_B_Format, {kAudioChannelLabel_Ambisonic_W, kAudioChannelLabel_Ambisonic_X, kAudioChannelLabel_Ambisonic_Y, kAudioChannelLabel_Ambisonic_Z, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_5_0_B, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_5_1_A, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, kAudioChannelLabel_LFEScreen, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_AudioUnit_6_0, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, kAudioChannelLabel_CenterSurround, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_6_1_A, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, kAudioChannelLabel_LFEScreen, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_CenterSurround, 0}},
|
||||||
|
{kAudioChannelLayoutTag_AudioUnit_7_0, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, kAudioChannelLabel_RearSurroundLeft, kAudioChannelLabel_RearSurroundRight, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_7_1_C, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, kAudioChannelLabel_LFEScreen, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_RearSurroundLeft, kAudioChannelLabel_RearSurroundRight}},
|
||||||
|
{kAudioChannelLayoutTag_AudioUnit_7_0_Front,{kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_Center, kAudioChannelLabel_LeftCenter, kAudioChannelLabel_RightCenter, 0}},
|
||||||
|
{kAudioChannelLayoutTag_AudioUnit_7_1_Front,{kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, kAudioChannelLabel_LFEScreen, kAudioChannelLabel_LeftSurround, kAudioChannelLabel_RightSurround, kAudioChannelLabel_LeftCenter, kAudioChannelLabel_RightCenter}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_3_0_A, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_3_0_B, {kAudioChannelLabel_Center, kAudioChannelLabel_Left, kAudioChannelLabel_Right, 0, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_4_0_A, {kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_Center, kAudioChannelLabel_CenterSurround, 0, 0, 0, 0}},
|
||||||
|
{kAudioChannelLayoutTag_MPEG_4_0_B, {kAudioChannelLabel_Center, kAudioChannelLabel_Left, kAudioChannelLabel_Right, kAudioChannelLabel_CenterSurround, 0, 0, 0, 0}},
|
||||||
|
{0, {0,0,0,0,0,0,0,0}}
|
||||||
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#if BUILD_AU_CARBON_UI
|
#if BUILD_AU_CARBON_UI
|
||||||
|
|
|
||||||
|
|
@ -287,8 +287,14 @@ public:
|
||||||
{
|
{
|
||||||
PluginBusUtilities::ScopedBusRestorer busRestorer (busUtils);
|
PluginBusUtilities::ScopedBusRestorer busRestorer (busUtils);
|
||||||
|
|
||||||
maxNumInChannels = jmin (busUtils.getBusCount (true) > 0 ? busUtils.getSupportedBusLayouts (true, 0).maxNumberOfChannels() : 0, hostOnlySupportsStereo() ? 2 : 8);
|
maxNumInChannels = busUtils.getBusCount (true) > 0 ? busUtils.getSupportedBusLayouts (true, 0).maxNumberOfChannels() : 0;
|
||||||
maxNumOutChannels = jmin (busUtils.getBusCount (false) > 0 ? busUtils.getSupportedBusLayouts (false, 0).maxNumberOfChannels() : 0, hostOnlySupportsStereo() ? 2 : 8);
|
maxNumOutChannels = busUtils.getBusCount (false) > 0 ? busUtils.getSupportedBusLayouts (false, 0).maxNumberOfChannels() : 0;
|
||||||
|
|
||||||
|
if (hostOnlySupportsStereo())
|
||||||
|
{
|
||||||
|
maxNumInChannels = jmin (maxNumInChannels, 2);
|
||||||
|
maxNumOutChannels = jmin (maxNumOutChannels, 2);
|
||||||
|
}
|
||||||
|
|
||||||
// try setting the number of channels
|
// try setting the number of channels
|
||||||
if (maxNumInChannels > 0)
|
if (maxNumInChannels > 0)
|
||||||
|
|
@ -302,6 +308,10 @@ public:
|
||||||
|
|
||||||
maxNumInChannels = busUtils.findTotalNumChannels (true);
|
maxNumInChannels = busUtils.findTotalNumChannels (true);
|
||||||
maxNumOutChannels = busUtils.findTotalNumChannels (false);
|
maxNumOutChannels = busUtils.findTotalNumChannels (false);
|
||||||
|
|
||||||
|
if ((busUtils.getBusCount (true) > 0 && busUtils.getDefaultLayoutForBus (true, 0) .size() > maxNumInChannels)
|
||||||
|
|| (busUtils.getBusCount (false) > 0 && busUtils.getDefaultLayoutForBus (false, 0).size() > maxNumOutChannels))
|
||||||
|
busRestorer.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
filter->setRateAndBufferSizeDetails (0, 0);
|
filter->setRateAndBufferSizeDetails (0, 0);
|
||||||
|
|
@ -1067,8 +1077,13 @@ public:
|
||||||
|
|
||||||
const AudioProcessor::AudioProcessorBus& busInfo = busUtils.getFilterBus (direction).getReference (busIdx);
|
const AudioProcessor::AudioProcessorBus& busInfo = busUtils.getFilterBus (direction).getReference (busIdx);
|
||||||
|
|
||||||
busInfo.name.copyToUTF8 (properties.label, (size_t) (kVstMaxLabelLen - 1));
|
String channelName = busInfo.name;
|
||||||
busInfo.name.copyToUTF8 (properties.shortLabel, (size_t) (kVstMaxShortLabelLen - 1));
|
|
||||||
|
channelName +=
|
||||||
|
String (" ") + AudioChannelSet::getAbbreviatedChannelTypeName (busInfo.channels.getTypeOfChannel(index));
|
||||||
|
|
||||||
|
channelName.copyToUTF8 (properties.label, (size_t) (kVstMaxLabelLen - 1));
|
||||||
|
channelName.copyToUTF8 (properties.shortLabel, (size_t) (kVstMaxShortLabelLen - 1));
|
||||||
|
|
||||||
properties.flags = kVstPinUseSpeaker | kVstPinIsActive;
|
properties.flags = kVstPinUseSpeaker | kVstPinIsActive;
|
||||||
properties.arrangementType = SpeakerMappings::channelSetToVstArrangementType (busInfo.channels);
|
properties.arrangementType = SpeakerMappings::channelSetToVstArrangementType (busInfo.channels);
|
||||||
|
|
@ -1767,7 +1782,7 @@ private:
|
||||||
const PluginHostType host (getHostType ());
|
const PluginHostType host (getHostType ());
|
||||||
|
|
||||||
// there are probably more hosts that need listing here
|
// there are probably more hosts that need listing here
|
||||||
return host.isAbletonLive() || host.isReaper();
|
return host.isAbletonLive();
|
||||||
}
|
}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper)
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,11 @@ private:
|
||||||
case 2:
|
case 2:
|
||||||
sets.add (AudioChannelSet::stereo());
|
sets.add (AudioChannelSet::stereo());
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
sets.add (AudioChannelSet::createLCR());
|
||||||
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
sets.add (AudioChannelSet::createLCRS());
|
||||||
sets.add (AudioChannelSet::quadraphonic());
|
sets.add (AudioChannelSet::quadraphonic());
|
||||||
sets.add (AudioChannelSet::ambisonic());
|
sets.add (AudioChannelSet::ambisonic());
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,11 @@ bool AudioChannelSet::operator== (const AudioChannelSet& other) const noexcept
|
||||||
bool AudioChannelSet::operator!= (const AudioChannelSet& other) const noexcept { return channels != other.channels; }
|
bool AudioChannelSet::operator!= (const AudioChannelSet& other) const noexcept { return channels != other.channels; }
|
||||||
bool AudioChannelSet::operator< (const AudioChannelSet& other) const noexcept { return channels < other.channels; }
|
bool AudioChannelSet::operator< (const AudioChannelSet& other) const noexcept { return channels < other.channels; }
|
||||||
|
|
||||||
const char* AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type) noexcept
|
String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type)
|
||||||
{
|
{
|
||||||
|
if (type >= discreteChannel0)
|
||||||
|
return String ("Discrete ") + String (type - discreteChannel0 + 1);
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case left: return NEEDS_TRANS("Left");
|
case left: return NEEDS_TRANS("Left");
|
||||||
|
|
@ -63,8 +66,11 @@ const char* AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType ty
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelType type) noexcept
|
String AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelType type)
|
||||||
{
|
{
|
||||||
|
if (type >= discreteChannel0)
|
||||||
|
return String (type - discreteChannel0 + 1);
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case left: return "L";
|
case left: return "L";
|
||||||
|
|
@ -151,17 +157,17 @@ AudioChannelSet AudioChannelSet::mono() { return AudioChannelSet (
|
||||||
AudioChannelSet AudioChannelSet::stereo() { return AudioChannelSet ((1u << left) | (1u << right)); }
|
AudioChannelSet AudioChannelSet::stereo() { return AudioChannelSet ((1u << left) | (1u << right)); }
|
||||||
AudioChannelSet AudioChannelSet::createLCR() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre)); }
|
AudioChannelSet AudioChannelSet::createLCR() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre)); }
|
||||||
AudioChannelSet AudioChannelSet::createLCRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surround)); }
|
AudioChannelSet AudioChannelSet::createLCRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surround)); }
|
||||||
AudioChannelSet AudioChannelSet::quadraphonic() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << sideLeft) | (1u << sideRight)); }
|
AudioChannelSet AudioChannelSet::quadraphonic() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surroundLeft) | (1u << surroundRight)); }
|
||||||
AudioChannelSet AudioChannelSet::pentagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << sideLeft) | (1u << sideRight) | (1u << centre)); }
|
AudioChannelSet AudioChannelSet::pentagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centre)); }
|
||||||
AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << sideLeft) | (1u << sideRight) | (1u << centre) | (1u << surround)); }
|
AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centre) | (1u << surround)); }
|
||||||
AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << sideLeft) | (1u << sideRight) | (1u << centre) | (1u << surround) | (1u << wideLeft) | (1u << wideRight)); }
|
AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centre) | (1u << surround) | (1u << wideLeft) | (1u << wideRight)); }
|
||||||
AudioChannelSet AudioChannelSet::ambisonic() { return AudioChannelSet ((1u << ambisonicW) | (1u << ambisonicX) | (1u << ambisonicY) | (1u << ambisonicZ)); }
|
AudioChannelSet AudioChannelSet::ambisonic() { return AudioChannelSet ((1u << ambisonicW) | (1u << ambisonicX) | (1u << ambisonicY) | (1u << ambisonicZ)); }
|
||||||
AudioChannelSet AudioChannelSet::create5point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight)); }
|
AudioChannelSet AudioChannelSet::create5point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight)); }
|
||||||
AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight)); }
|
AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight)); }
|
||||||
AudioChannelSet AudioChannelSet::create6point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << surround)); }
|
AudioChannelSet AudioChannelSet::create6point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << surround)); }
|
||||||
AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << surround)); }
|
AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << surround)); }
|
||||||
AudioChannelSet AudioChannelSet::create7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << topRearLeft) | (1u << topRearRight)); }
|
AudioChannelSet AudioChannelSet::create7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << sideLeft) | (1u << sideRight)); }
|
||||||
AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << topRearLeft) | (1u << topRearRight)); }
|
AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << sideLeft) | (1u << sideRight)); }
|
||||||
AudioChannelSet AudioChannelSet::createFront7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centreLeft) | (1u << centreRight)); }
|
AudioChannelSet AudioChannelSet::createFront7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centreLeft) | (1u << centreRight)); }
|
||||||
AudioChannelSet AudioChannelSet::createFront7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centreLeft) | (1u << centreRight)); }
|
AudioChannelSet AudioChannelSet::createFront7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << subbass) | (1u << surroundLeft) | (1u << surroundRight) | (1u << centreLeft) | (1u << centreRight)); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,10 +145,10 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Returns the name of a given channel type. For example, this method may return "Surround Left". */
|
/** Returns the name of a given channel type. For example, this method may return "Surround Left". */
|
||||||
static const char* getChannelTypeName (ChannelType) noexcept;
|
static String getChannelTypeName (ChannelType);
|
||||||
|
|
||||||
/** Returns the abbreviated name of a channel type. For example, this method may return "Ls". */
|
/** Returns the abbreviated name of a channel type. For example, this method may return "Ls". */
|
||||||
static const char* getAbbreviatedChannelTypeName (ChannelType) noexcept;
|
static String getAbbreviatedChannelTypeName (ChannelType);
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Adds a channel to the set. */
|
/** Adds a channel to the set. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue