Skip to content

Commit

Permalink
Version 1.0.1.
Browse files Browse the repository at this point in the history
Made macOS compilation target more compatible with older OS versions.
  • Loading branch information
gbevin committed Feb 26, 2017
1 parent 76ee526 commit b17515d
Show file tree
Hide file tree
Showing 364 changed files with 8,634 additions and 5,407 deletions.
4 changes: 2 additions & 2 deletions Builds/LinuxMakefile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH := -march=native
endif

JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa libcurl x11) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS)
JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DDEBUG=1 -D_DEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.1 -DJUCE_APP_VERSION_HEX=0x10001 $(shell pkg-config --cflags alsa libcurl x11) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS)
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 -mtune=core2 -march=core2 $(CFLAGS)
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS)
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa libcurl x11) -ldl -lpthread -lrt $(LDFLAGS)
Expand All @@ -53,7 +53,7 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH :=
endif

JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 $(shell pkg-config --cflags alsa libcurl x11) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS)
JUCE_CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.1 -DJUCE_APP_VERSION_HEX=0x10001 $(shell pkg-config --cflags alsa libcurl x11) -pthread -I../../JuceLibraryCode -I../../JuceLibraryCode/modules $(CPPFLAGS)
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 -mtune=core2 -march=core2 $(CFLAGS)
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++11 $(CXXFLAGS)
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) -fvisibility=hidden $(shell pkg-config --libs alsa libcurl x11) -ldl -lpthread -lrt $(LDFLAGS)
Expand Down
23 changes: 15 additions & 8 deletions Builds/MacOSX/receivemidi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
0984E9151968DD3D15D4D66D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_basics.h"; path = "../../JuceLibraryCode/modules/juce_audio_basics/juce_audio_basics.h"; sourceTree = "SOURCE_ROOT"; };
0A430FED3D18860724639861 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_LagrangeInterpolator.cpp"; path = "../../JuceLibraryCode/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp"; sourceTree = "SOURCE_ROOT"; };
0B2CDD5F49447564CA6ACD8E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_osx_MessageQueue.h"; path = "../../JuceLibraryCode/modules/juce_events/native/juce_osx_MessageQueue.h"; sourceTree = "SOURCE_ROOT"; };
0DCC1E46970E26E9F8168014 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_WebInputStream.cpp"; path = "../../JuceLibraryCode/modules/juce_core/network/juce_WebInputStream.cpp"; sourceTree = "SOURCE_ROOT"; };
0EC3BBA46FBCE6CF36BC704E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Memory.h"; path = "../../JuceLibraryCode/modules/juce_core/memory/juce_Memory.h"; sourceTree = "SOURCE_ROOT"; };
0F2BD0E98F61E66B4F2E1D7E = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ByteOrder.h"; path = "../../JuceLibraryCode/modules/juce_core/memory/juce_ByteOrder.h"; sourceTree = "SOURCE_ROOT"; };
0FE834A6FEE38AC96EB6EA52 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_audio_devices.h"; path = "../../../../JUCE/modules/juce_audio_devices/juce_audio_devices.h"; sourceTree = "SOURCE_ROOT"; };
Expand Down Expand Up @@ -134,6 +135,7 @@
48B706A7FCF2AC44DB9A79FA = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MidiBuffer.cpp"; path = "../../JuceLibraryCode/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp"; sourceTree = "SOURCE_ROOT"; };
49980552A58DEA10695E20DE = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_MPEZoneLayout.h"; path = "../../JuceLibraryCode/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h"; sourceTree = "SOURCE_ROOT"; };
49EA002D891EDD37CD00C7EC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = trees.h; path = "../../JuceLibraryCode/modules/juce_core/zip/zlib/trees.h"; sourceTree = "SOURCE_ROOT"; };
49FFFDD9B7CAD83DCD9FA752 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_WebInputStream.h"; path = "../../JuceLibraryCode/modules/juce_core/network/juce_WebInputStream.h"; sourceTree = "SOURCE_ROOT"; };
4A493557E4E9B062478677F0 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AudioIODeviceType.cpp"; path = "../../JuceLibraryCode/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp"; sourceTree = "SOURCE_ROOT"; };
4A5ADC33A9B73BF69AFDA5CC = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = inffast.c; path = "../../JuceLibraryCode/modules/juce_core/zip/zlib/inffast.c"; sourceTree = "SOURCE_ROOT"; };
4A909C0B2FEBE988375F32A9 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_SpinLock.h"; path = "../../JuceLibraryCode/modules/juce_core/threads/juce_SpinLock.h"; sourceTree = "SOURCE_ROOT"; };
Expand Down Expand Up @@ -352,6 +354,7 @@
D0995A54A5E36D0193039809 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MACAddress.cpp"; path = "../../JuceLibraryCode/modules/juce_core/network/juce_MACAddress.cpp"; sourceTree = "SOURCE_ROOT"; };
D17CFA3CE1EB726132610AD7 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_AsyncUpdater.cpp"; path = "../../JuceLibraryCode/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp"; sourceTree = "SOURCE_ROOT"; };
D238BA44FDD315CE130D4090 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ActionBroadcaster.h"; path = "../../JuceLibraryCode/modules/juce_events/broadcasters/juce_ActionBroadcaster.h"; sourceTree = "SOURCE_ROOT"; };
D28037E5364EDF0078DAAEE3 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ListenerList.cpp"; path = "../../JuceLibraryCode/modules/juce_core/containers/juce_ListenerList.cpp"; sourceTree = "SOURCE_ROOT"; };
D2A91ABFF0F5CBED94FE3FD1 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_CharPointer_UTF8.h"; path = "../../JuceLibraryCode/modules/juce_core/text/juce_CharPointer_UTF8.h"; sourceTree = "SOURCE_ROOT"; };
D2BC5390A6F33C796C125CA6 = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
D366008876860E5D1627164F = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_URL.cpp"; path = "../../JuceLibraryCode/modules/juce_core/network/juce_URL.cpp"; sourceTree = "SOURCE_ROOT"; };
Expand Down Expand Up @@ -569,6 +572,7 @@
3E06C8B124E326A4E2E5886C,
8157246B78DAE4856C643A07,
DD1D342CDFCAA568696E42B2,
D28037E5364EDF0078DAAEE3,
4AC24E89B00E2118737F3C02,
98C08EEF85D4A5506B00811C,
50C48125138F661974951B19,
Expand Down Expand Up @@ -683,7 +687,9 @@
604DA1E12738471D2A9B1965,
7BDEF020AD0DCF52058EC2ED,
D366008876860E5D1627164F,
58AF8922CEC3D25F52366E16, ); name = network; sourceTree = "<group>"; };
58AF8922CEC3D25F52366E16,
0DCC1E46970E26E9F8168014,
49FFFDD9B7CAD83DCD9FA752, ); name = network; sourceTree = "<group>"; };
4485A677C624D175B9A4AE0D = {isa = PBXGroup; children = (
DD4E907496590512B3F0FC4E,
85A9DB210E48347A27156ECB,
Expand Down Expand Up @@ -936,6 +942,7 @@
34074C549B134B42C03A1A7A,
CDAC0E7D477449C520CB95C6, ); name = Source; sourceTree = "<group>"; };
F65F2292588FF010F26B66CB = {isa = XCBuildConfiguration; buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
Expand All @@ -947,16 +954,17 @@
"_DEBUG=1",
"DEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
"JUCE_APP_VERSION_HEX=0x10000", );
"JUCE_APP_VERSION=1.0.1",
"JUCE_APP_VERSION_HEX=0x10001", );
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../JuceLibraryCode/modules", "$(inherited)");
INSTALL_PATH = "/usr/bin";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
PRODUCT_BUNDLE_IDENTIFIER = com.uwyn.receivemidi;
SDKROOT_ppc = macosx10.5; }; name = Debug; };
99DEB3BA267EFFBC73356EAB = {isa = XCBuildConfiguration; buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
Expand All @@ -968,13 +976,13 @@
"_NDEBUG=1",
"NDEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.0.0",
"JUCE_APP_VERSION_HEX=0x10000", );
"JUCE_APP_VERSION=1.0.1",
"JUCE_APP_VERSION_HEX=0x10001", );
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = ("../../JuceLibraryCode", "../../JuceLibraryCode/modules", "$(inherited)");
INSTALL_PATH = "/usr/bin";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
PRODUCT_BUNDLE_IDENTIFIER = com.uwyn.receivemidi;
SDKROOT_ppc = macosx10.5; }; name = Release; };
Expand All @@ -991,7 +999,6 @@
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "receivemidi";
WARNING_CFLAGS = -Wreorder;
ZERO_LINK = NO; }; name = Debug; };
Expand Down
11 changes: 9 additions & 2 deletions Builds/VisualStudio2015/receivemidi.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.1;JUCE_APP_VERSION_HEX=0x10001;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down Expand Up @@ -99,7 +99,7 @@
<ClCompile>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.1;JUCE_APP_VERSION_HEX=0x10001;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down Expand Up @@ -294,6 +294,9 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_DynamicObject.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_ListenerList.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_NamedValueSet.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
Expand Down Expand Up @@ -429,6 +432,9 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_URL.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_WebInputStream.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_BufferedInputStream.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
Expand Down Expand Up @@ -754,6 +760,7 @@
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_NamedPipe.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_Socket.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_URL.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_WebInputStream.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_BufferedInputStream.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_FileInputSource.h"/>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_InputSource.h"/>
Expand Down
9 changes: 9 additions & 0 deletions Builds/VisualStudio2015/receivemidi.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_DynamicObject.cpp">
<Filter>Juce Modules\juce_core\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_ListenerList.cpp">
<Filter>Juce Modules\juce_core\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\containers\juce_NamedValueSet.cpp">
<Filter>Juce Modules\juce_core\containers</Filter>
</ClCompile>
Expand Down Expand Up @@ -460,6 +463,9 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_URL.cpp">
<Filter>Juce Modules\juce_core\network</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_WebInputStream.cpp">
<Filter>Juce Modules\juce_core\network</Filter>
</ClCompile>
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_BufferedInputStream.cpp">
<Filter>Juce Modules\juce_core\streams</Filter>
</ClCompile>
Expand Down Expand Up @@ -1038,6 +1044,9 @@
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_URL.h">
<Filter>Juce Modules\juce_core\network</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\network\juce_WebInputStream.h">
<Filter>Juce Modules\juce_core\network</Filter>
</ClInclude>
<ClInclude Include="..\..\JuceLibraryCode\modules\juce_core\streams\juce_BufferedInputStream.h">
<Filter>Juce Modules\juce_core\streams</Filter>
</ClInclude>
Expand Down
6 changes: 3 additions & 3 deletions Builds/VisualStudio2015/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
#include <windows.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
FILEVERSION 1,0,1,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Uwyn\0"
VALUE "FileDescription", "receivemidi\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "FileVersion", "1.0.1\0"
VALUE "ProductName", "receivemidi\0"
VALUE "ProductVersion", "1.0.0\0"
VALUE "ProductVersion", "1.0.1\0"
END
END

Expand Down
4 changes: 2 additions & 2 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
namespace ProjectInfo
{
const char* const projectName = "receivemidi";
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
const char* const versionString = "1.0.1";
const int versionNumber = 0x10001;
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2015 - ROLI Ltd.
Copyright (c) 2016 - 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
Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/
Details of these licenses can be found at: www.gnu.org/licenses
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
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.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
------------------------------------------------------------------------------
-----------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.juce.com for more information.
To release a closed-source product which uses other parts of JUCE not
licensed under the ISC terms, commercial licenses are available: visit
www.juce.com for more information.
==============================================================================
*/
Expand Down Expand Up @@ -108,6 +114,43 @@ String AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelT
return "";
}

AudioChannelSet::ChannelType AudioChannelSet::getChannelTypeFromAbbreviation (const String& abbr)
{
if (abbr.length() > 0 && (abbr[0] >= '0' && abbr[0] <= '9'))
return static_cast<AudioChannelSet::ChannelType> (static_cast<int> (discreteChannel0)
+ abbr.getIntValue() + 1);

if (abbr == "L") return left;
else if (abbr == "R") return right;
else if (abbr == "C") return centre;
else if (abbr == "Lfe") return LFE;
else if (abbr == "Ls") return leftSurround;
else if (abbr == "Rs") return rightSurround;
else if (abbr == "Lc") return leftCentre;
else if (abbr == "Rc") return rightCentre;
else if (abbr == "Cs") return centreSurround;
else if (abbr == "Lrs") return leftSurroundRear;
else if (abbr == "Rrs") return rightSurroundRear;
else if (abbr == "Tm") return topMiddle;
else if (abbr == "Tfl") return topFrontLeft;
else if (abbr == "Tfc") return topFrontCentre;
else if (abbr == "Tfr") return topFrontRight;
else if (abbr == "Trl") return topRearLeft;
else if (abbr == "Trc") return topRearCentre;
else if (abbr == "Trr") return topRearRight;
else if (abbr == "Wl") return wideLeft;
else if (abbr == "Wr") return wideRight;
else if (abbr == "Lfe2") return LFE2;
else if (abbr == "Lss") return leftSurroundSide;
else if (abbr == "Rss") return rightSurroundSide;
else if (abbr == "W") return ambisonicW;
else if (abbr == "X") return ambisonicX;
else if (abbr == "Y") return ambisonicY;
else if (abbr == "Z") return ambisonicZ;

return unknown;
}

String AudioChannelSet::getSpeakerArrangementAsString() const
{
StringArray speakerTypes;
Expand All @@ -124,6 +167,22 @@ String AudioChannelSet::getSpeakerArrangementAsString() const
return speakerTypes.joinIntoString (" ");
}

AudioChannelSet AudioChannelSet::fromAbbreviatedString (const String& str)
{
StringArray abbr = StringArray::fromTokens(str, true);
AudioChannelSet set;

for (int i = 0; i < abbr.size(); ++i)
{
AudioChannelSet::ChannelType type = getChannelTypeFromAbbreviation (abbr[i]);

if (type != unknown)
set.addChannel (type);
}

return set;
}

String AudioChannelSet::getDescription() const
{
if (isDiscreteLayout()) return String ("Discrete #") + String (size());
Expand Down
Loading

0 comments on commit b17515d

Please sign in to comment.