| @@ -0,0 +1,160 @@ | |||
| # 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCMonitor | |||
| 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCMonitor | |||
| BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
| CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) | |||
| endif | |||
| OBJECTS := \ | |||
| $(OBJDIR)/Main_90ebc5c2.o \ | |||
| $(OBJDIR)/juce_audio_basics_399a455e.o \ | |||
| $(OBJDIR)/juce_audio_devices_c1c9ba9c.o \ | |||
| $(OBJDIR)/juce_audio_formats_f04b043c.o \ | |||
| $(OBJDIR)/juce_audio_processors_eb9ae116.o \ | |||
| $(OBJDIR)/juce_core_1ee54a40.o \ | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o \ | |||
| $(OBJDIR)/juce_data_structures_84790dfc.o \ | |||
| $(OBJDIR)/juce_events_584896b4.o \ | |||
| $(OBJDIR)/juce_graphics_f9afc18.o \ | |||
| $(OBJDIR)/juce_gui_basics_90929794.o \ | |||
| $(OBJDIR)/juce_gui_extra_b81d9e1c.o \ | |||
| $(OBJDIR)/juce_opengl_1890bee0.o \ | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o \ | |||
| $(OBJDIR)/juce_video_86a19d3c.o \ | |||
| .PHONY: clean | |||
| $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) | |||
| @echo Linking OSCMonitor | |||
| -@mkdir -p $(BINDIR) | |||
| -@mkdir -p $(LIBDIR) | |||
| -@mkdir -p $(OUTDIR) | |||
| @$(BLDCMD) | |||
| clean: | |||
| @echo Cleaning OSCMonitor | |||
| @$(CLEANCMD) | |||
| strip: | |||
| @echo Stripping OSCMonitor | |||
| -@strip --strip-unneeded $(OUTDIR)/$(TARGET) | |||
| $(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling Main.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_audio_basics_399a455e.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_c1c9ba9c.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_f04b043c.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_eb9ae116.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_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_core.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o: ../../../../modules/juce_cryptography/juce_cryptography.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_cryptography.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_data_structures_84790dfc.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_584896b4.o: ../../../../modules/juce_events/juce_events.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_events.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_graphics.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_gui_basics_90929794.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_b81d9e1c.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_1890bee0.o: ../../../../modules/juce_opengl/juce_opengl.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_opengl.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o: ../../../../modules/juce_osc/juce_osc.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_osc.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_video_86a19d3c.o: ../../../../modules/juce_video/juce_video.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_video.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| -include $(OBJECTS:%.o=%.d) | |||
| @@ -0,0 +1,27 @@ | |||
| <?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>com.rawmaterialsoftware.OSCMonitor</string> | |||
| <key>CFBundleName</key> | |||
| <string>OSCMonitor</string> | |||
| <key>CFBundlePackageType</key> | |||
| <string>APPL</string> | |||
| <key>CFBundleSignature</key> | |||
| <string>????</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/> | |||
| </dict> | |||
| </plist> | |||
| @@ -0,0 +1,19 @@ | |||
| Microsoft Visual Studio Solution File, Format Version 11.00 | |||
| # Visual Studio 2015 | |||
| Project("{3DD2BA40-00F8-EE08-8A77-AA2C799B45FD}") = "OSCMonitor", "OSCMonitor.vcxproj", "{A618CC48-937F-E23E-FBA6-0FBB024D4FD8}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Win32 = Debug|Win32 | |||
| Release|Win32 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {A618CC48-937F-E23E-FBA6-0FBB024D4FD8}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
| {A618CC48-937F-E23E-FBA6-0FBB024D4FD8}.Debug|Win32.Build.0 = Debug|Win32 | |||
| {A618CC48-937F-E23E-FBA6-0FBB024D4FD8}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {A618CC48-937F-E23E-FBA6-0FBB024D4FD8}.Release|Win32.Build.0 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -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", "OSCMonitor\0" | |||
| VALUE "FileVersion", "1.0.0\0" | |||
| VALUE "ProductName", "OSCMonitor\0" | |||
| VALUE "ProductVersion", "1.0.0\0" | |||
| END | |||
| END | |||
| BLOCK "VarFileInfo" | |||
| BEGIN | |||
| VALUE "Translation", 0x409, 65001 | |||
| END | |||
| END | |||
| #endif | |||
| @@ -0,0 +1,206 @@ | |||
| /* | |||
| 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_IHMIKJ__ | |||
| #define __JUCE_APPCONFIG_IHMIKJ__ | |||
| //============================================================================== | |||
| // [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_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_osc 1 | |||
| #define JUCE_MODULE_AVAILABLE_juce_video 1 | |||
| //============================================================================== | |||
| #ifndef JUCE_STANDALONE_APPLICATION | |||
| #define JUCE_STANDALONE_APPLICATION 1 | |||
| #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 | |||
| //============================================================================== | |||
| // 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 | |||
| #endif | |||
| #ifndef JUCE_USE_CAMERA | |||
| //#define JUCE_USE_CAMERA | |||
| #endif | |||
| #endif // __JUCE_APPCONFIG_IHMIKJ__ | |||
| @@ -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_IHMIKJ__ | |||
| #define __APPHEADERFILE_IHMIKJ__ | |||
| #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_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_osc/juce_osc.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 = "OSCMonitor"; | |||
| const char* const versionString = "1.0.0"; | |||
| const int versionNumber = 0x10000; | |||
| } | |||
| #endif | |||
| #endif // __APPHEADERFILE_IHMIKJ__ | |||
| @@ -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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_osc/juce_osc.h" | |||
| @@ -0,0 +1,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_video/juce_video.h" | |||
| @@ -0,0 +1,104 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <JUCERPROJECT id="IhmIkj" name="OSCMonitor" projectType="guiapp" version="1.0.0" | |||
| bundleIdentifier="com.rawmaterialsoftware.OSCMonitor" includeBinaryInAppConfig="1" | |||
| jucerVersion="3.2.0"> | |||
| <MAINGROUP id="N9NMMk" name="OSCMonitor"> | |||
| <GROUP id="{2B92546C-6B49-72D9-ACD0-0F2FCE9AD0D5}" name="Source"> | |||
| <FILE id="fqVB21" name="OSCLogListBox.h" compile="0" resource="0" file="Source/OSCLogListBox.h"/> | |||
| <FILE id="iHVgFL" name="MainComponent.h" compile="0" resource="0" file="Source/MainComponent.h"/> | |||
| <FILE id="yT5J1D" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/> | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="1" optimisation="1" targetName="OSCMonitor"/> | |||
| <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="0" optimisation="3" targetName="OSCMonitor"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </XCODE_MAC> | |||
| <LINUX_MAKE targetFolder="Builds/LinuxMakefile"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1" | |||
| targetName="OSCMonitor"/> | |||
| <CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3" | |||
| targetName="OSCMonitor"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_video" path="../../modules"/> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_opengl" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_extra" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_cryptography" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_processors" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_formats" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_devices" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_basics" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </LINUX_MAKE> | |||
| <VS2015 targetFolder="Builds/VisualStudio2015"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="1" optimisation="1" targetName="OSCMonitor"/> | |||
| <CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="0" optimisation="3" targetName="OSCMonitor"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_video" path="../../modules"/> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_opengl" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_extra" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_cryptography" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_processors" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_formats" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_devices" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_basics" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </VS2015> | |||
| </EXPORTFORMATS> | |||
| <MODULES> | |||
| <MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_core" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_cryptography" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_events" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_graphics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_opengl" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_osc" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_video" showAllCode="1" useLocalCopy="0"/> | |||
| </MODULES> | |||
| <JUCEOPTIONS/> | |||
| </JUCERPROJECT> | |||
| @@ -0,0 +1,103 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Introjucer! | |||
| It contains the basic startup code for a Juce application. | |||
| ============================================================================== | |||
| */ | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| #include "MainComponent.h" | |||
| //============================================================================== | |||
| class OSCMonitorApplication : public JUCEApplication | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| OSCMonitorApplication() {} | |||
| const String getApplicationName() override { return ProjectInfo::projectName; } | |||
| const String getApplicationVersion() override { return ProjectInfo::versionString; } | |||
| bool moreThanOneInstanceAllowed() override { return true; } | |||
| //============================================================================== | |||
| void initialise (const String& commandLine) override | |||
| { | |||
| // This method is where you should put your application's initialisation code.. | |||
| mainWindow = new MainWindow (getApplicationName()); | |||
| } | |||
| void shutdown() override | |||
| { | |||
| // Add your application's shutdown code here.. | |||
| mainWindow = nullptr; // (deletes our window) | |||
| } | |||
| //============================================================================== | |||
| void systemRequestedQuit() override | |||
| { | |||
| // This is called when the app is being asked to quit: you can ignore this | |||
| // request and let the app carry on running, or call quit() to allow the app to close. | |||
| quit(); | |||
| } | |||
| void anotherInstanceStarted (const String& commandLine) override | |||
| { | |||
| // When another instance of the app is launched while this one is running, | |||
| // this method is invoked, and the commandLine parameter tells you what | |||
| // the other instance's command-line arguments were. | |||
| } | |||
| //============================================================================== | |||
| /* | |||
| This class implements the desktop window that contains an instance of | |||
| our MainContentComponent class. | |||
| */ | |||
| class MainWindow : public DocumentWindow | |||
| { | |||
| public: | |||
| MainWindow (String name) : DocumentWindow (name, | |||
| Colours::lightgrey, | |||
| DocumentWindow::allButtons) | |||
| { | |||
| setUsingNativeTitleBar (true); | |||
| setContentOwned (new MainContentComponent(), true); | |||
| centreWithSize (getWidth(), getHeight()); | |||
| setVisible (true); | |||
| } | |||
| void closeButtonPressed() override | |||
| { | |||
| // This is called when the user tries to close this window. Here, we'll just | |||
| // ask the app to quit when this happens, but you can change this to do | |||
| // whatever you need. | |||
| JUCEApplication::getInstance()->systemRequestedQuit(); | |||
| } | |||
| /* Note: Be careful if you override any DocumentWindow methods - the base | |||
| class uses a lot of them, so by overriding you might break its functionality. | |||
| It's best to do all your work in your content component instead, but if | |||
| you really have to override any DocumentWindow methods, make sure your | |||
| subclass also calls the superclass's method. | |||
| */ | |||
| private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) | |||
| }; | |||
| private: | |||
| ScopedPointer<MainWindow> mainWindow; | |||
| }; | |||
| //============================================================================== | |||
| // This macro generates the main() routine that launches the app. | |||
| START_JUCE_APPLICATION (OSCMonitorApplication) | |||
| @@ -0,0 +1,219 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated! | |||
| ============================================================================== | |||
| */ | |||
| #ifndef MAINCOMPONENT_H_INCLUDED | |||
| #define MAINCOMPONENT_H_INCLUDED | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| #include "OSCLogListBox.h" | |||
| //============================================================================== | |||
| class MainContentComponent : public Component, | |||
| private Button::Listener, | |||
| private OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> | |||
| { | |||
| public: | |||
| //========================================================================== | |||
| MainContentComponent() | |||
| : portNumberLabel (new Label), | |||
| portNumberField (new Label), | |||
| connectButton (new TextButton ("Connect")), | |||
| clearButton (new TextButton ("Clear")), | |||
| connectionStatusLabel (new Label), | |||
| oscLogListBox (new OSCLogListBox), | |||
| oscReceiver (new OSCReceiver), | |||
| currentPortNumber (-1) | |||
| { | |||
| setSize (700, 400); | |||
| portNumberLabel->setText ("UDP Port Number: ", dontSendNotification); | |||
| portNumberLabel->setBounds (10, 18, 130, 25); | |||
| addAndMakeVisible (portNumberLabel); | |||
| portNumberField->setText ("9001", dontSendNotification); | |||
| portNumberField->setEditable (true, true, true); | |||
| portNumberField->setBounds (140, 18, 50, 25); | |||
| addAndMakeVisible (portNumberField); | |||
| connectButton->setBounds (210, 18, 100, 25); | |||
| addAndMakeVisible (connectButton); | |||
| connectButton->addListener (this); | |||
| clearButton->setBounds (320, 18, 60, 25); | |||
| addAndMakeVisible (clearButton); | |||
| clearButton->addListener (this); | |||
| connectionStatusLabel->setBounds (450, 18, 240, 25); | |||
| updateConnectionStatusLabel(); | |||
| addAndMakeVisible (connectionStatusLabel); | |||
| oscLogListBox->setBounds (0, 60, 700, 340); | |||
| addAndMakeVisible (oscLogListBox); | |||
| oscReceiver->addListener (this); | |||
| oscReceiver->registerFormatErrorHandler ( | |||
| [this] (const char* data, int dataSize) | |||
| { | |||
| oscLogListBox->addInvalidOSCPacket (data, dataSize); | |||
| } | |||
| ); | |||
| } | |||
| private: | |||
| //========================================================================== | |||
| ScopedPointer<Label> portNumberLabel; | |||
| ScopedPointer<Label> portNumberField; | |||
| ScopedPointer<TextButton> connectButton; | |||
| ScopedPointer<TextButton> clearButton; | |||
| ScopedPointer<Label> connectionStatusLabel; | |||
| ScopedPointer<OSCLogListBox> oscLogListBox; | |||
| ScopedPointer<OSCReceiver> oscReceiver; | |||
| int currentPortNumber; | |||
| //========================================================================== | |||
| void buttonClicked (Button* b) override | |||
| { | |||
| if (b == connectButton) | |||
| connectButtonClicked(); | |||
| else if (b == clearButton) | |||
| clearButtonClicked(); | |||
| } | |||
| //========================================================================== | |||
| void connectButtonClicked() | |||
| { | |||
| if (! isConnected()) | |||
| connect(); | |||
| else | |||
| disconnect(); | |||
| updateConnectionStatusLabel(); | |||
| } | |||
| //========================================================================== | |||
| void clearButtonClicked() | |||
| { | |||
| oscLogListBox->clear(); | |||
| } | |||
| //========================================================================== | |||
| void oscMessageReceived (const OSCMessage& message) override | |||
| { | |||
| oscLogListBox->addOSCMessage (message); | |||
| } | |||
| void oscBundleReceived (const OSCBundle& bundle) override | |||
| { | |||
| oscLogListBox->addOSCBundle (bundle); | |||
| } | |||
| //========================================================================== | |||
| void connect() | |||
| { | |||
| int portToConnect = portNumberField->getText().getIntValue(); | |||
| if (! isValidOscPort (portToConnect)) | |||
| { | |||
| handleInvalidPortNumberEntered(); | |||
| return; | |||
| } | |||
| if (oscReceiver->connect (portToConnect)) | |||
| { | |||
| currentPortNumber = portToConnect; | |||
| connectButton->setButtonText ("Disconnect"); | |||
| } | |||
| else | |||
| { | |||
| handleConnectError (portToConnect); | |||
| } | |||
| } | |||
| //========================================================================== | |||
| void disconnect() | |||
| { | |||
| if (oscReceiver->disconnect()) | |||
| { | |||
| currentPortNumber = -1; | |||
| connectButton->setButtonText ("Connect"); | |||
| } | |||
| else | |||
| { | |||
| handleDisconnectError(); | |||
| } | |||
| } | |||
| //========================================================================== | |||
| void handleConnectError (int failedPort) | |||
| { | |||
| AlertWindow::showMessageBoxAsync ( | |||
| AlertWindow::WarningIcon, | |||
| "OSC Connection error", | |||
| "Error: could not connect to port " + String (failedPort), | |||
| "OK"); | |||
| } | |||
| //========================================================================== | |||
| void handleDisconnectError() | |||
| { | |||
| AlertWindow::showMessageBoxAsync ( | |||
| AlertWindow::WarningIcon, | |||
| "Unknown error", | |||
| "An unknown error occured while trying to disconnect from UPD port.", | |||
| "OK"); | |||
| } | |||
| //========================================================================== | |||
| void handleInvalidPortNumberEntered() | |||
| { | |||
| AlertWindow::showMessageBoxAsync ( | |||
| AlertWindow::WarningIcon, | |||
| "Invalid port number", | |||
| "Error: you have entered an invalid UDP port number.", | |||
| "OK"); | |||
| } | |||
| //========================================================================== | |||
| bool isConnected() | |||
| { | |||
| return currentPortNumber != -1; | |||
| } | |||
| //========================================================================== | |||
| bool isValidOscPort (int port) | |||
| { | |||
| return port > 0 && port < 65536; | |||
| } | |||
| //========================================================================== | |||
| void updateConnectionStatusLabel() | |||
| { | |||
| String text = "Status: "; | |||
| if (isConnected()) | |||
| text += "Connected to UDP port " + String (currentPortNumber); | |||
| else | |||
| text += "Disconnected"; | |||
| Colour textColour = isConnected() ? Colours::green : Colours::red; | |||
| connectionStatusLabel->setText (text, dontSendNotification); | |||
| connectionStatusLabel->setFont (Font (15.00f, Font::bold)); | |||
| connectionStatusLabel->setColour (Label::textColourId, textColour); | |||
| connectionStatusLabel->setJustificationType (Justification::centredRight); | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) | |||
| }; | |||
| #endif // MAINCOMPONENT_H_INCLUDED | |||
| @@ -0,0 +1,163 @@ | |||
| /* | |||
| ============================================================================== | |||
| OSCLogListBox.h | |||
| Created: 13 Jun 2015 9:48:28pm | |||
| Author: Timur Doumler | |||
| ============================================================================== | |||
| */ | |||
| #ifndef OSCLOGLISTBOX_H_INCLUDED | |||
| #define OSCLOGLISTBOX_H_INCLUDED | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| //============================================================================== | |||
| class OSCLogListBox : public ListBox, private ListBoxModel, private AsyncUpdater | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| OSCLogListBox() | |||
| { | |||
| setModel (this); | |||
| } | |||
| //============================================================================== | |||
| ~OSCLogListBox() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| int getNumRows() override | |||
| { | |||
| return oscLogList.size(); | |||
| } | |||
| //============================================================================== | |||
| void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected) override | |||
| { | |||
| if (isPositiveAndBelow (row, oscLogList.size())) | |||
| { | |||
| g.setColour (Colours::black); | |||
| g.drawText (oscLogList[row], | |||
| Rectangle<int> (width, height).reduced (4, 0), | |||
| Justification::centredLeft, true); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| void addOSCMessage (const OSCMessage& message, int level = 0) | |||
| { | |||
| oscLogList.add (getIndentationString (level) | |||
| + "- osc message, address = '" | |||
| + message.getAddressPattern().toString() | |||
| + "', " | |||
| + String (message.size()) | |||
| + " argument(s)"); | |||
| if (! message.empty()) | |||
| { | |||
| for (OSCArgument* arg = message.begin(); arg != message.end(); ++arg) | |||
| addOSCMessageArgument (*arg, level + 1); | |||
| } | |||
| triggerAsyncUpdate(); | |||
| } | |||
| //============================================================================== | |||
| void addOSCBundle (const OSCBundle& bundle, int level = 0) | |||
| { | |||
| OSCTimeTag timeTag = bundle.getTimeTag(); | |||
| oscLogList.add (getIndentationString (level) | |||
| + "- osc bundle, time tag = " | |||
| + timeTag.toTime().toString (true, true, true, true)); | |||
| for (OSCBundle::Element* element = bundle.begin(); element != bundle.end(); ++element) | |||
| { | |||
| if (element->isMessage()) | |||
| addOSCMessage (element->getMessage(), level + 1); | |||
| else if (element->isBundle()) | |||
| addOSCBundle (element->getBundle(), level + 1); | |||
| } | |||
| triggerAsyncUpdate(); | |||
| } | |||
| //============================================================================== | |||
| void addOSCMessageArgument (const OSCArgument& arg, int level) | |||
| { | |||
| String typeAsString; | |||
| String valueAsString; | |||
| if (arg.isFloat32()) | |||
| { | |||
| typeAsString = "float32"; | |||
| valueAsString = String (arg.getFloat32()); | |||
| } | |||
| else if (arg.isInt32()) | |||
| { | |||
| typeAsString = "int32"; | |||
| valueAsString = String (arg.getInt32()); | |||
| } | |||
| else if (arg.isString()) | |||
| { | |||
| typeAsString = "string"; | |||
| valueAsString = arg.getString(); | |||
| } | |||
| else if (arg.isBlob()) | |||
| { | |||
| typeAsString = "blob"; | |||
| const MemoryBlock& blob = arg.getBlob(); | |||
| valueAsString = String::fromUTF8( (const char*)blob.getData(), blob.getSize()); | |||
| } | |||
| else | |||
| { | |||
| typeAsString = "(unknown)"; | |||
| valueAsString = ""; | |||
| } | |||
| oscLogList.add (getIndentationString (level + 1) + "- " + typeAsString.paddedRight(' ', 12) + valueAsString); | |||
| } | |||
| //============================================================================== | |||
| void addInvalidOSCPacket (const char* /* data */, int dataSize) | |||
| { | |||
| oscLogList.add ("- (" + String(dataSize) + "bytes with invalid format)"); | |||
| } | |||
| //============================================================================== | |||
| void clear() | |||
| { | |||
| oscLogList.clear(); | |||
| triggerAsyncUpdate(); | |||
| } | |||
| //============================================================================== | |||
| void handleAsyncUpdate() override | |||
| { | |||
| updateContent(); | |||
| scrollToEnsureRowIsOnscreen (oscLogList.size() - 1); | |||
| repaint(); | |||
| } | |||
| private: | |||
| //============================================================================== | |||
| String getIndentationString (int level) | |||
| { | |||
| return String().paddedRight (' ', 2 * level); | |||
| } | |||
| //============================================================================== | |||
| StringArray oscLogList; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OSCLogListBox) | |||
| }; | |||
| #endif // OSCLOGLISTBOX_H_INCLUDED | |||
| @@ -0,0 +1,124 @@ | |||
| # 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCReceiver | |||
| 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCReceiver | |||
| BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
| CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) | |||
| endif | |||
| OBJECTS := \ | |||
| $(OBJDIR)/Main_90ebc5c2.o \ | |||
| $(OBJDIR)/juce_core_1ee54a40.o \ | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o \ | |||
| $(OBJDIR)/juce_data_structures_84790dfc.o \ | |||
| $(OBJDIR)/juce_events_584896b4.o \ | |||
| $(OBJDIR)/juce_graphics_f9afc18.o \ | |||
| $(OBJDIR)/juce_gui_basics_90929794.o \ | |||
| $(OBJDIR)/juce_gui_extra_b81d9e1c.o \ | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o \ | |||
| .PHONY: clean | |||
| $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) | |||
| @echo Linking OSCReceiver | |||
| -@mkdir -p $(BINDIR) | |||
| -@mkdir -p $(LIBDIR) | |||
| -@mkdir -p $(OUTDIR) | |||
| @$(BLDCMD) | |||
| clean: | |||
| @echo Cleaning OSCReceiver | |||
| @$(CLEANCMD) | |||
| strip: | |||
| @echo Stripping OSCReceiver | |||
| -@strip --strip-unneeded $(OUTDIR)/$(TARGET) | |||
| $(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling Main.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_core.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o: ../../../../modules/juce_cryptography/juce_cryptography.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_cryptography.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_data_structures_84790dfc.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_584896b4.o: ../../../../modules/juce_events/juce_events.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_events.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_graphics.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_gui_basics_90929794.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_b81d9e1c.o: ../../../../modules/juce_gui_extra/juce_gui_extra.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_gui_extra.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o: ../../../../modules/juce_osc/juce_osc.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_osc.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| -include $(OBJECTS:%.o=%.d) | |||
| @@ -0,0 +1,27 @@ | |||
| <?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>com.yourcompany.OSCReceiver</string> | |||
| <key>CFBundleName</key> | |||
| <string>OSCReceiver</string> | |||
| <key>CFBundlePackageType</key> | |||
| <string>APPL</string> | |||
| <key>CFBundleSignature</key> | |||
| <string>????</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/> | |||
| </dict> | |||
| </plist> | |||
| @@ -0,0 +1,19 @@ | |||
| Microsoft Visual Studio Solution File, Format Version 11.00 | |||
| # Visual Studio 2015 | |||
| Project("{CA413D0D-499A-DC21-B43D-866389917603}") = "OSCReceiver", "OSCReceiver.vcxproj", "{2762823A-FE8D-4DB5-01CA-6BE498EE72E8}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Win32 = Debug|Win32 | |||
| Release|Win32 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {2762823A-FE8D-4DB5-01CA-6BE498EE72E8}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
| {2762823A-FE8D-4DB5-01CA-6BE498EE72E8}.Debug|Win32.Build.0 = Debug|Win32 | |||
| {2762823A-FE8D-4DB5-01CA-6BE498EE72E8}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {2762823A-FE8D-4DB5-01CA-6BE498EE72E8}.Release|Win32.Build.0 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -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", "OSCReceiver\0" | |||
| VALUE "FileVersion", "1.0.0\0" | |||
| VALUE "ProductName", "OSCReceiver\0" | |||
| VALUE "ProductVersion", "1.0.0\0" | |||
| END | |||
| END | |||
| BLOCK "VarFileInfo" | |||
| BEGIN | |||
| VALUE "Translation", 0x409, 65001 | |||
| END | |||
| END | |||
| #endif | |||
| @@ -0,0 +1,104 @@ | |||
| /* | |||
| 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_PDOCPT__ | |||
| #define __JUCE_APPCONFIG_PDOCPT__ | |||
| //============================================================================== | |||
| // [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_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_osc 1 | |||
| //============================================================================== | |||
| #ifndef JUCE_STANDALONE_APPLICATION | |||
| #define JUCE_STANDALONE_APPLICATION 1 | |||
| #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 | |||
| //============================================================================== | |||
| // 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 | |||
| #endif // __JUCE_APPCONFIG_PDOCPT__ | |||
| @@ -0,0 +1,41 @@ | |||
| /* | |||
| 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_PDOCPT__ | |||
| #define __APPHEADERFILE_PDOCPT__ | |||
| #include "AppConfig.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_osc/juce_osc.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 = "OSCReceiver"; | |||
| const char* const versionString = "1.0.0"; | |||
| const int versionNumber = 0x10000; | |||
| } | |||
| #endif | |||
| #endif // __APPHEADERFILE_PDOCPT__ | |||
| @@ -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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_osc/juce_osc.h" | |||
| @@ -0,0 +1,79 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <JUCERPROJECT id="pdocPt" name="OSCReceiver" projectType="guiapp" version="1.0.0" | |||
| bundleIdentifier="com.yourcompany.OSCReceiver" includeBinaryInAppConfig="1" | |||
| jucerVersion="3.2.0"> | |||
| <MAINGROUP id="Y6Q0O9" name="OSCReceiver"> | |||
| <GROUP id="{9F303ECD-83DE-CA91-97B4-C083DA897F49}" name="Source"> | |||
| <FILE id="HHuoMc" name="MainComponent.h" compile="0" resource="0" file="Source/MainComponent.h"/> | |||
| <FILE id="xL2IzY" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/> | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="1" optimisation="1" targetName="OSCReceiver"/> | |||
| <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="0" optimisation="3" targetName="OSCReceiver"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </XCODE_MAC> | |||
| <LINUX_MAKE targetFolder="Builds/LinuxMakefile"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1" | |||
| targetName="OSCReceiver"/> | |||
| <CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3" | |||
| targetName="OSCReceiver"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_extra" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_cryptography" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </LINUX_MAKE> | |||
| <VS2015 targetFolder="Builds/VisualStudio2015"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="1" optimisation="1" targetName="OSCReceiver"/> | |||
| <CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="0" optimisation="3" targetName="OSCReceiver"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_extra" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_cryptography" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </VS2015> | |||
| </EXPORTFORMATS> | |||
| <MODULES> | |||
| <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_osc" showAllCode="1" useLocalCopy="0"/> | |||
| </MODULES> | |||
| <JUCEOPTIONS/> | |||
| </JUCERPROJECT> | |||
| @@ -0,0 +1,100 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Introjucer! | |||
| It contains the basic startup code for a Juce application. | |||
| ============================================================================== | |||
| */ | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| #include "MainComponent.h" | |||
| //============================================================================== | |||
| class OSCReceiverApplication : public JUCEApplication | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| OSCReceiverApplication() {} | |||
| const String getApplicationName() override { return ProjectInfo::projectName; } | |||
| const String getApplicationVersion() override { return ProjectInfo::versionString; } | |||
| bool moreThanOneInstanceAllowed() override { return true; } | |||
| //============================================================================== | |||
| void initialise (const String& commandLine) override | |||
| { | |||
| // This method is where you should put your application's initialisation code.. | |||
| mainWindow = new MainWindow (getApplicationName()); | |||
| } | |||
| void shutdown() override | |||
| { | |||
| // Add your application's shutdown code here.. | |||
| mainWindow = nullptr; // (deletes our window) | |||
| } | |||
| //============================================================================== | |||
| void systemRequestedQuit() override | |||
| { | |||
| // This is called when the app is being asked to quit: you can ignore this | |||
| // request and let the app carry on running, or call quit() to allow the app to close. | |||
| quit(); | |||
| } | |||
| void anotherInstanceStarted (const String& commandLine) override | |||
| { | |||
| // When another instance of the app is launched while this one is running, | |||
| // this method is invoked, and the commandLine parameter tells you what | |||
| // the other instance's command-line arguments were. | |||
| } | |||
| //============================================================================== | |||
| /* | |||
| This class implements the desktop window that contains an instance of | |||
| our MainContentComponent class. | |||
| */ | |||
| class MainWindow : public DocumentWindow | |||
| { | |||
| public: | |||
| MainWindow (String name) : DocumentWindow (name, | |||
| Colours::lightgrey, | |||
| DocumentWindow::allButtons) | |||
| { | |||
| setUsingNativeTitleBar (true); | |||
| setContentOwned (new MainContentComponent(), true); | |||
| centreWithSize (getWidth(), getHeight()); | |||
| setVisible (true); | |||
| } | |||
| void closeButtonPressed() override | |||
| { | |||
| // This is called when the user tries to close this window. Here, we'll just | |||
| // ask the app to quit when this happens, but you can change this to do | |||
| // whatever you need. | |||
| JUCEApplication::getInstance()->systemRequestedQuit(); | |||
| } | |||
| /* Note: Be careful if you override any DocumentWindow methods - the base | |||
| class uses a lot of them, so by overriding you might break its functionality. | |||
| It's best to do all your work in your content component instead, but if | |||
| you really have to override any DocumentWindow methods, make sure your | |||
| subclass also calls the superclass's method. | |||
| */ | |||
| private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) | |||
| }; | |||
| private: | |||
| ScopedPointer<MainWindow> mainWindow; | |||
| }; | |||
| //============================================================================== | |||
| // This macro generates the main() routine that launches the app. | |||
| START_JUCE_APPLICATION (OSCReceiverApplication) | |||
| @@ -0,0 +1,70 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated! | |||
| ============================================================================== | |||
| */ | |||
| #ifndef MAINCOMPONENT_H_INCLUDED | |||
| #define MAINCOMPONENT_H_INCLUDED | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| //============================================================================== | |||
| /* | |||
| This component lives inside our window, and this is where you should put all | |||
| your controls and content. | |||
| */ | |||
| class MainContentComponent : public Component, | |||
| private OSCReceiver, | |||
| private OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback> | |||
| { | |||
| public: | |||
| //========================================================================== | |||
| MainContentComponent() | |||
| { | |||
| setSize (200, 200); | |||
| rotaryKnob.setRange (0.0, 1.0); | |||
| rotaryKnob.setSliderStyle (Slider::RotaryVerticalDrag); | |||
| rotaryKnob.setTextBoxStyle (Slider::TextBoxBelow, true, 150, 25); | |||
| rotaryKnob.setBounds (10, 10, 180, 180); | |||
| rotaryKnob.setInterceptsMouseClicks (false, false); | |||
| addAndMakeVisible (rotaryKnob); | |||
| // specify here on which UDP port number to receive incoming OSC messages | |||
| if (! connect (9001)) | |||
| showConnectionErrorMessage ("Error: could not connect to UDP port 9001."); | |||
| // tell the component to listen for OSC messages matching this address: | |||
| addListener (this, "/juce/rotaryknob"); | |||
| } | |||
| private: | |||
| //========================================================================== | |||
| void oscMessageReceived (const OSCMessage& message) override | |||
| { | |||
| if (message.size() == 1 && message[0].isFloat32()) | |||
| rotaryKnob.setValue (jlimit (0.0f, 10.0f, message[0].getFloat32())); | |||
| } | |||
| void showConnectionErrorMessage (const String& messageText) | |||
| { | |||
| AlertWindow::showMessageBoxAsync ( | |||
| AlertWindow::WarningIcon, | |||
| "Connection error", | |||
| messageText, | |||
| "OK"); | |||
| } | |||
| //========================================================================== | |||
| Slider rotaryKnob; | |||
| OSCSender sender; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) | |||
| }; | |||
| #endif // MAINCOMPONENT_H_INCLUDED | |||
| @@ -0,0 +1,112 @@ | |||
| # 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCSender | |||
| 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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | |||
| TARGET := OSCSender | |||
| BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
| CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) | |||
| endif | |||
| OBJECTS := \ | |||
| $(OBJDIR)/Main_90ebc5c2.o \ | |||
| $(OBJDIR)/juce_core_1ee54a40.o \ | |||
| $(OBJDIR)/juce_data_structures_84790dfc.o \ | |||
| $(OBJDIR)/juce_events_584896b4.o \ | |||
| $(OBJDIR)/juce_graphics_f9afc18.o \ | |||
| $(OBJDIR)/juce_gui_basics_90929794.o \ | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o \ | |||
| .PHONY: clean | |||
| $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) | |||
| @echo Linking OSCSender | |||
| -@mkdir -p $(BINDIR) | |||
| -@mkdir -p $(LIBDIR) | |||
| -@mkdir -p $(OUTDIR) | |||
| @$(BLDCMD) | |||
| clean: | |||
| @echo Cleaning OSCSender | |||
| @$(CLEANCMD) | |||
| strip: | |||
| @echo Stripping OSCSender | |||
| -@strip --strip-unneeded $(OUTDIR)/$(TARGET) | |||
| $(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling Main.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_core.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_data_structures_84790dfc.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_584896b4.o: ../../../../modules/juce_events/juce_events.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_events.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_graphics.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_gui_basics_90929794.o: ../../../../modules/juce_gui_basics/juce_gui_basics.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_gui_basics.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o: ../../../../modules/juce_osc/juce_osc.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_osc.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| -include $(OBJECTS:%.o=%.d) | |||
| @@ -0,0 +1,27 @@ | |||
| <?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>com.yourcompany.OSCSender</string> | |||
| <key>CFBundleName</key> | |||
| <string>OSCSender</string> | |||
| <key>CFBundlePackageType</key> | |||
| <string>APPL</string> | |||
| <key>CFBundleSignature</key> | |||
| <string>????</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/> | |||
| </dict> | |||
| </plist> | |||
| @@ -0,0 +1,19 @@ | |||
| Microsoft Visual Studio Solution File, Format Version 11.00 | |||
| # Visual Studio 2015 | |||
| Project("{69947305-5206-EC15-E3B8-BF4DAEEF42CC}") = "OSCSender", "OSCSender.vcxproj", "{2227B7BB-2DDA-8B39-5483-E9B28A360328}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Win32 = Debug|Win32 | |||
| Release|Win32 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {2227B7BB-2DDA-8B39-5483-E9B28A360328}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
| {2227B7BB-2DDA-8B39-5483-E9B28A360328}.Debug|Win32.Build.0 = Debug|Win32 | |||
| {2227B7BB-2DDA-8B39-5483-E9B28A360328}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {2227B7BB-2DDA-8B39-5483-E9B28A360328}.Release|Win32.Build.0 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -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", "OSCSender\0" | |||
| VALUE "FileVersion", "1.0.0\0" | |||
| VALUE "ProductName", "OSCSender\0" | |||
| VALUE "ProductVersion", "1.0.0\0" | |||
| END | |||
| END | |||
| BLOCK "VarFileInfo" | |||
| BEGIN | |||
| VALUE "Translation", 0x409, 65001 | |||
| END | |||
| END | |||
| #endif | |||
| @@ -0,0 +1,91 @@ | |||
| /* | |||
| 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_RYSVAR__ | |||
| #define __JUCE_APPCONFIG_RYSVAR__ | |||
| //============================================================================== | |||
| // [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_core 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_osc 1 | |||
| //============================================================================== | |||
| #ifndef JUCE_STANDALONE_APPLICATION | |||
| #define JUCE_STANDALONE_APPLICATION 1 | |||
| #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 | |||
| //============================================================================== | |||
| // 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 | |||
| #endif // __JUCE_APPCONFIG_RYSVAR__ | |||
| @@ -0,0 +1,39 @@ | |||
| /* | |||
| 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_RYSVAR__ | |||
| #define __APPHEADERFILE_RYSVAR__ | |||
| #include "AppConfig.h" | |||
| #include "modules/juce_core/juce_core.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_osc/juce_osc.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 = "OSCSender"; | |||
| const char* const versionString = "1.0.0"; | |||
| const int versionNumber = 0x10000; | |||
| } | |||
| #endif | |||
| #endif // __APPHEADERFILE_RYSVAR__ | |||
| @@ -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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_osc/juce_osc.h" | |||
| @@ -0,0 +1,71 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <JUCERPROJECT id="rysVAr" name="OSCSender" projectType="guiapp" version="1.0.0" | |||
| bundleIdentifier="com.yourcompany.OSCSender" includeBinaryInAppConfig="1" | |||
| jucerVersion="3.2.0"> | |||
| <MAINGROUP id="knnZZJ" name="OSCSender"> | |||
| <GROUP id="{F2A0007A-4D24-4DD6-DEC8-6428F36CE45D}" name="Source"> | |||
| <FILE id="ORaBHU" name="MainComponent.h" compile="0" resource="0" file="Source/MainComponent.h"/> | |||
| <FILE id="FqekDD" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/> | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="1" optimisation="1" targetName="OSCSender"/> | |||
| <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="0" optimisation="3" targetName="OSCSender"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </XCODE_MAC> | |||
| <LINUX_MAKE targetFolder="Builds/LinuxMakefile"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1" | |||
| targetName="OSCSender"/> | |||
| <CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3" | |||
| targetName="OSCSender"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </LINUX_MAKE> | |||
| <VS2015 targetFolder="Builds/VisualStudio2015"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="1" optimisation="1" targetName="OSCSender"/> | |||
| <CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="0" optimisation="3" targetName="OSCSender"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </VS2015> | |||
| </EXPORTFORMATS> | |||
| <MODULES> | |||
| <MODULES id="juce_core" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_events" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_graphics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_osc" showAllCode="1" useLocalCopy="0"/> | |||
| </MODULES> | |||
| <JUCEOPTIONS/> | |||
| </JUCERPROJECT> | |||
| @@ -0,0 +1,100 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Introjucer! | |||
| It contains the basic startup code for a Juce application. | |||
| ============================================================================== | |||
| */ | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| #include "MainComponent.h" | |||
| //============================================================================== | |||
| class OSCSenderApplication : public JUCEApplication | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| OSCSenderApplication() {} | |||
| const String getApplicationName() override { return ProjectInfo::projectName; } | |||
| const String getApplicationVersion() override { return ProjectInfo::versionString; } | |||
| bool moreThanOneInstanceAllowed() override { return true; } | |||
| //============================================================================== | |||
| void initialise (const String& /*commandLine*/) override | |||
| { | |||
| // This method is where you should put your application's initialisation code.. | |||
| mainWindow = new MainWindow (getApplicationName()); | |||
| } | |||
| void shutdown() override | |||
| { | |||
| // Add your application's shutdown code here.. | |||
| mainWindow = nullptr; // (deletes our window) | |||
| } | |||
| //============================================================================== | |||
| void systemRequestedQuit() override | |||
| { | |||
| // This is called when the app is being asked to quit: you can ignore this | |||
| // request and let the app carry on running, or call quit() to allow the app to close. | |||
| quit(); | |||
| } | |||
| void anotherInstanceStarted (const String& /*commandLine*/) override | |||
| { | |||
| // When another instance of the app is launched while this one is running, | |||
| // this method is invoked, and the commandLine parameter tells you what | |||
| // the other instance's command-line arguments were. | |||
| } | |||
| //============================================================================== | |||
| /* | |||
| This class implements the desktop window that contains an instance of | |||
| our MainContentComponent class. | |||
| */ | |||
| class MainWindow : public DocumentWindow | |||
| { | |||
| public: | |||
| MainWindow (String name) : DocumentWindow (name, | |||
| Colours::lightgrey, | |||
| DocumentWindow::allButtons) | |||
| { | |||
| setUsingNativeTitleBar (true); | |||
| setContentOwned (new MainContentComponent(), true); | |||
| centreWithSize (getWidth(), getHeight()); | |||
| setVisible (true); | |||
| } | |||
| void closeButtonPressed() override | |||
| { | |||
| // This is called when the user tries to close this window. Here, we'll just | |||
| // ask the app to quit when this happens, but you can change this to do | |||
| // whatever you need. | |||
| JUCEApplication::getInstance()->systemRequestedQuit(); | |||
| } | |||
| /* Note: Be careful if you override any DocumentWindow methods - the base | |||
| class uses a lot of them, so by overriding you might break its functionality. | |||
| It's best to do all your work in your content component instead, but if | |||
| you really have to override any DocumentWindow methods, make sure your | |||
| subclass also calls the superclass's method. | |||
| */ | |||
| private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) | |||
| }; | |||
| private: | |||
| ScopedPointer<MainWindow> mainWindow; | |||
| }; | |||
| //============================================================================== | |||
| // This macro generates the main() routine that launches the app. | |||
| START_JUCE_APPLICATION (OSCSenderApplication) | |||
| @@ -0,0 +1,71 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated! | |||
| ============================================================================== | |||
| */ | |||
| #ifndef MAINCOMPONENT_H_INCLUDED | |||
| #define MAINCOMPONENT_H_INCLUDED | |||
| #include "../JuceLibraryCode/JuceHeader.h" | |||
| //============================================================================== | |||
| /* | |||
| This component lives inside our window, and this is where you should put all | |||
| your controls and content. | |||
| */ | |||
| class MainContentComponent : public Component, private Slider::Listener | |||
| { | |||
| public: | |||
| //========================================================================== | |||
| MainContentComponent() | |||
| { | |||
| setSize (200, 200); | |||
| rotaryKnob.setRange (0.0, 1.0); | |||
| rotaryKnob.setSliderStyle (Slider::RotaryVerticalDrag); | |||
| rotaryKnob.setTextBoxStyle (Slider::TextBoxBelow, true, 150, 25); | |||
| rotaryKnob.setBounds (10, 10, 180, 180); | |||
| addAndMakeVisible (rotaryKnob); | |||
| rotaryKnob.addListener (this); | |||
| // specify here where to send OSC messages to: host URL and UDP port number | |||
| if (! sender.connect ("127.0.0.1", 9001)) | |||
| showConnectionErrorMessage ("Error: could not connect to UDP port 9001."); | |||
| } | |||
| private: | |||
| //========================================================================== | |||
| void sliderValueChanged (Slider* slider) override | |||
| { | |||
| if (slider == &rotaryKnob) | |||
| { | |||
| float valueToSend = (float) rotaryKnob.getValue(); | |||
| // create and send an OSC message with an address and a float value: | |||
| if (! sender.send ("/juce/rotaryknob", valueToSend)) | |||
| showConnectionErrorMessage ("Error: could not send OSC message."); | |||
| } | |||
| } | |||
| void showConnectionErrorMessage (const String& messageText) | |||
| { | |||
| AlertWindow::showMessageBoxAsync ( | |||
| AlertWindow::WarningIcon, | |||
| "Connection error", | |||
| messageText, | |||
| "OK"); | |||
| } | |||
| //========================================================================== | |||
| Slider rotaryKnob; | |||
| OSCSender sender; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) | |||
| }; | |||
| #endif // MAINCOMPONENT_H_INCLUDED | |||
| @@ -0,0 +1,160 @@ | |||
| # 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 "JUCE_UNIT_TESTS=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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt | |||
| TARGET := UnitTestRunner | |||
| 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 "JUCE_UNIT_TESTS=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 ../../JuceLibraryCode -I ../../../../modules | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
| CXXFLAGS += $(CFLAGS) -std=c++11 | |||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt | |||
| TARGET := UnitTestRunner | |||
| BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) | |||
| CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR) | |||
| endif | |||
| OBJECTS := \ | |||
| $(OBJDIR)/Main_90ebc5c2.o \ | |||
| $(OBJDIR)/juce_audio_basics_399a455e.o \ | |||
| $(OBJDIR)/juce_audio_devices_c1c9ba9c.o \ | |||
| $(OBJDIR)/juce_audio_formats_f04b043c.o \ | |||
| $(OBJDIR)/juce_audio_processors_eb9ae116.o \ | |||
| $(OBJDIR)/juce_core_1ee54a40.o \ | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o \ | |||
| $(OBJDIR)/juce_data_structures_84790dfc.o \ | |||
| $(OBJDIR)/juce_events_584896b4.o \ | |||
| $(OBJDIR)/juce_graphics_f9afc18.o \ | |||
| $(OBJDIR)/juce_gui_basics_90929794.o \ | |||
| $(OBJDIR)/juce_gui_extra_b81d9e1c.o \ | |||
| $(OBJDIR)/juce_opengl_1890bee0.o \ | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o \ | |||
| $(OBJDIR)/juce_video_86a19d3c.o \ | |||
| .PHONY: clean | |||
| $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) | |||
| @echo Linking UnitTestRunner | |||
| -@mkdir -p $(BINDIR) | |||
| -@mkdir -p $(LIBDIR) | |||
| -@mkdir -p $(OUTDIR) | |||
| @$(BLDCMD) | |||
| clean: | |||
| @echo Cleaning UnitTestRunner | |||
| @$(CLEANCMD) | |||
| strip: | |||
| @echo Stripping UnitTestRunner | |||
| -@strip --strip-unneeded $(OUTDIR)/$(TARGET) | |||
| $(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling Main.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_audio_basics_399a455e.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_c1c9ba9c.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_f04b043c.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_eb9ae116.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_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_core.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_cryptography_3b1f489a.o: ../../../../modules/juce_cryptography/juce_cryptography.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_cryptography.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_data_structures_84790dfc.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_584896b4.o: ../../../../modules/juce_events/juce_events.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_events.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_graphics.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_gui_basics_90929794.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_b81d9e1c.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_1890bee0.o: ../../../../modules/juce_opengl/juce_opengl.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_opengl.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_osc_72ef0f3c.o: ../../../../modules/juce_osc/juce_osc.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_osc.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| $(OBJDIR)/juce_video_86a19d3c.o: ../../../../modules/juce_video/juce_video.cpp | |||
| -@mkdir -p $(OBJDIR) | |||
| @echo "Compiling juce_video.cpp" | |||
| @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" | |||
| -include $(OBJECTS:%.o=%.d) | |||
| @@ -0,0 +1,19 @@ | |||
| Microsoft Visual Studio Solution File, Format Version 11.00 | |||
| # Visual Studio 2015 | |||
| Project("{7CB284D3-A406-8D00-8F8D-CFBF55471571}") = "UnitTestRunner", "UnitTestRunner.vcxproj", "{4600F893-701E-E6ED-9A30-5A8CEB85AC21}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Win32 = Debug|Win32 | |||
| Release|Win32 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {4600F893-701E-E6ED-9A30-5A8CEB85AC21}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
| {4600F893-701E-E6ED-9A30-5A8CEB85AC21}.Debug|Win32.Build.0 = Debug|Win32 | |||
| {4600F893-701E-E6ED-9A30-5A8CEB85AC21}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {4600F893-701E-E6ED-9A30-5A8CEB85AC21}.Release|Win32.Build.0 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -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", "UnitTestRunner\0" | |||
| VALUE "FileVersion", "1.0.0\0" | |||
| VALUE "ProductName", "UnitTestRunner\0" | |||
| VALUE "ProductVersion", "1.0.0\0" | |||
| END | |||
| END | |||
| BLOCK "VarFileInfo" | |||
| BEGIN | |||
| VALUE "Translation", 0x409, 65001 | |||
| END | |||
| END | |||
| #endif | |||
| @@ -0,0 +1,206 @@ | |||
| /* | |||
| 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_Z2XZCP__ | |||
| #define __JUCE_APPCONFIG_Z2XZCP__ | |||
| //============================================================================== | |||
| // [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_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_osc 1 | |||
| #define JUCE_MODULE_AVAILABLE_juce_video 1 | |||
| //============================================================================== | |||
| #ifndef JUCE_STANDALONE_APPLICATION | |||
| #define JUCE_STANDALONE_APPLICATION 1 | |||
| #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 | |||
| //============================================================================== | |||
| // 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 | |||
| #endif | |||
| #ifndef JUCE_USE_CAMERA | |||
| //#define JUCE_USE_CAMERA | |||
| #endif | |||
| #endif // __JUCE_APPCONFIG_Z2XZCP__ | |||
| @@ -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_Z2XZCP__ | |||
| #define __APPHEADERFILE_Z2XZCP__ | |||
| #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_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_osc/juce_osc.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 = "UnitTestRunner"; | |||
| const char* const versionString = "1.0.0"; | |||
| const int versionNumber = 0x10000; | |||
| } | |||
| #endif | |||
| #endif // __APPHEADERFILE_Z2XZCP__ | |||
| @@ -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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // 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,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_osc/juce_osc.h" | |||
| @@ -0,0 +1,5 @@ | |||
| // This is an auto-generated file to redirect any included | |||
| // module headers to the correct external folder. | |||
| #include "../../../../../modules/juce_video/juce_video.h" | |||
| @@ -0,0 +1,55 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2013 - Raw Material Software 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" | |||
| //============================================================================== | |||
| class ConsoleLogger : public Logger | |||
| { | |||
| void logMessage (const String& message) override | |||
| { | |||
| std::cout << message << std::endl; | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| class ConsoleUnitTestRunner : public UnitTestRunner | |||
| { | |||
| void logMessage (const String& message) override | |||
| { | |||
| Logger::writeToLog (message); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| int main (int argc, char* argv[]) | |||
| { | |||
| ScopedPointer<ConsoleLogger> logger; | |||
| Logger::setCurrentLogger (logger); | |||
| ConsoleUnitTestRunner runner; | |||
| runner.runAllTests(); | |||
| return 0; | |||
| } | |||
| @@ -0,0 +1,102 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <JUCERPROJECT id="Z2Xzcp" name="UnitTestRunner" projectType="consoleapp" version="1.0.0" | |||
| bundleIdentifier="com.yourcompany.UnitTestRunner" includeBinaryInAppConfig="1" | |||
| jucerVersion="3.2.0" defines="JUCE_UNIT_TESTS=1"> | |||
| <MAINGROUP id="GZdWCU" name="UnitTestRunner"> | |||
| <GROUP id="{22894462-E1A9-036F-ED94-B51A50C87552}" name="Source"> | |||
| <FILE id="ynaYaM" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/> | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="1" optimisation="1" targetName="UnitTestRunner"/> | |||
| <CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default" | |||
| isDebug="0" optimisation="3" targetName="UnitTestRunner"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </XCODE_MAC> | |||
| <LINUX_MAKE targetFolder="Builds/LinuxMakefile"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1" | |||
| targetName="UnitTestRunner"/> | |||
| <CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3" | |||
| targetName="UnitTestRunner"/> | |||
| </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_osc" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </LINUX_MAKE> | |||
| <VS2015 targetFolder="Builds/VisualStudio2015"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="1" optimisation="1" targetName="UnitTestRunner"/> | |||
| <CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit" | |||
| isDebug="0" optimisation="3" targetName="UnitTestRunner"/> | |||
| </CONFIGURATIONS> | |||
| <MODULEPATHS> | |||
| <MODULEPATH id="juce_video" path="../../modules"/> | |||
| <MODULEPATH id="juce_osc" path="../../modules"/> | |||
| <MODULEPATH id="juce_opengl" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_extra" path="../../modules"/> | |||
| <MODULEPATH id="juce_gui_basics" path="../../modules"/> | |||
| <MODULEPATH id="juce_graphics" path="../../modules"/> | |||
| <MODULEPATH id="juce_events" path="../../modules"/> | |||
| <MODULEPATH id="juce_data_structures" path="../../modules"/> | |||
| <MODULEPATH id="juce_cryptography" path="../../modules"/> | |||
| <MODULEPATH id="juce_core" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_processors" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_formats" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_devices" path="../../modules"/> | |||
| <MODULEPATH id="juce_audio_basics" path="../../modules"/> | |||
| </MODULEPATHS> | |||
| </VS2015> | |||
| </EXPORTFORMATS> | |||
| <MODULES> | |||
| <MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_core" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_cryptography" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_events" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_graphics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_opengl" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_osc" showAllCode="1" useLocalCopy="0"/> | |||
| <MODULES id="juce_video" showAllCode="1" useLocalCopy="0"/> | |||
| </MODULES> | |||
| <JUCEOPTIONS/> | |||
| </JUCERPROJECT> | |||
| @@ -216,13 +216,18 @@ public: | |||
| } | |||
| //============================================================================== | |||
| /** Returns the current number of elements in the array. | |||
| */ | |||
| /** Returns the current number of elements in the array. */ | |||
| inline int size() const noexcept | |||
| { | |||
| return numUsed; | |||
| } | |||
| /** Returns true if the array is empty, false otherwise. */ | |||
| inline bool empty() const noexcept | |||
| { | |||
| return size() == 0; | |||
| } | |||
| /** Returns one of the elements in the array. | |||
| If the index passed in is beyond the range of valid elements, this | |||
| will return a default value. | |||
| @@ -48,24 +48,54 @@ public: | |||
| static uint64 swap (uint64 value) noexcept; | |||
| //============================================================================== | |||
| /** Swaps the byte order of a 16-bit int if the CPU is big-endian */ | |||
| /** Swaps the byte order of a 16-bit unsigned int if the CPU is big-endian */ | |||
| static uint16 swapIfBigEndian (uint16 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit int if the CPU is big-endian */ | |||
| /** Swaps the byte order of a 32-bit unsigned int if the CPU is big-endian */ | |||
| static uint32 swapIfBigEndian (uint32 value) noexcept; | |||
| /** Swaps the byte order of a 64-bit int if the CPU is big-endian */ | |||
| /** Swaps the byte order of a 64-bit unsigned int if the CPU is big-endian */ | |||
| static uint64 swapIfBigEndian (uint64 value) noexcept; | |||
| /** Swaps the byte order of a 16-bit int if the CPU is little-endian */ | |||
| /** Swaps the byte order of a 16-bit signed int if the CPU is big-endian */ | |||
| static int16 swapIfBigEndian (int16 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit signed int if the CPU is big-endian */ | |||
| static int32 swapIfBigEndian (int32 value) noexcept; | |||
| /** Swaps the byte order of a 64-bit signed int if the CPU is big-endian */ | |||
| static int64 swapIfBigEndian (int64 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit float if the CPU is big-endian */ | |||
| static float swapIfBigEndian (float value) noexcept; | |||
| /** Swaps the byte order of a 64-bit float if the CPU is big-endian */ | |||
| static double swapIfBigEndian (double value) noexcept; | |||
| /** Swaps the byte order of a 16-bit unsigned int if the CPU is little-endian */ | |||
| static uint16 swapIfLittleEndian (uint16 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit int if the CPU is little-endian */ | |||
| /** Swaps the byte order of a 32-bit unsigned int if the CPU is little-endian */ | |||
| static uint32 swapIfLittleEndian (uint32 value) noexcept; | |||
| /** Swaps the byte order of a 64-bit int if the CPU is little-endian */ | |||
| /** Swaps the byte order of a 64-bit unsigned int if the CPU is little-endian */ | |||
| static uint64 swapIfLittleEndian (uint64 value) noexcept; | |||
| /** Swaps the byte order of a 16-bit signed int if the CPU is little-endian */ | |||
| static int16 swapIfLittleEndian (int16 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit signed int if the CPU is little-endian */ | |||
| static int32 swapIfLittleEndian (int32 value) noexcept; | |||
| /** Swaps the byte order of a 64-bit signed int if the CPU is little-endian */ | |||
| static int64 swapIfLittleEndian (int64 value) noexcept; | |||
| /** Swaps the byte order of a 32-bit float if the CPU is little-endian */ | |||
| static float swapIfLittleEndian (float value) noexcept; | |||
| /** Swaps the byte order of a 64-bit float if the CPU is little-endian */ | |||
| static double swapIfLittleEndian (double value) noexcept; | |||
| //============================================================================== | |||
| /** Turns 4 bytes into a little-endian integer. */ | |||
| static uint32 littleEndianInt (const void* bytes) noexcept; | |||
| @@ -161,9 +191,21 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept | |||
| inline uint16 ByteOrder::swapIfBigEndian (const uint16 v) noexcept { return v; } | |||
| inline uint32 ByteOrder::swapIfBigEndian (const uint32 v) noexcept { return v; } | |||
| inline uint64 ByteOrder::swapIfBigEndian (const uint64 v) noexcept { return v; } | |||
| inline int16 ByteOrder::swapIfBigEndian (const int16 v) noexcept { return v; } | |||
| inline int32 ByteOrder::swapIfBigEndian (const int32 v) noexcept { return v; } | |||
| inline int64 ByteOrder::swapIfBigEndian (const int64 v) noexcept { return v; } | |||
| inline float ByteOrder::swapIfBigEndian (const float v) noexcept { return v; } | |||
| inline double ByteOrder::swapIfBigEndian (const double v) noexcept { return v; } | |||
| inline uint16 ByteOrder::swapIfLittleEndian (const uint16 v) noexcept { return swap (v); } | |||
| inline uint32 ByteOrder::swapIfLittleEndian (const uint32 v) noexcept { return swap (v); } | |||
| inline uint64 ByteOrder::swapIfLittleEndian (const uint64 v) noexcept { return swap (v); } | |||
| inline int16 ByteOrder::swapIfLittleEndian (const int16 v) noexcept { return static_cast<int16> (swap (static_cast<uint16> (v))); } | |||
| inline int32 ByteOrder::swapIfLittleEndian (const int32 v) noexcept { return static_cast<int32> (swap (static_cast<uint32> (v))); } | |||
| inline int64 ByteOrder::swapIfLittleEndian (const int64 v) noexcept { return static_cast<int64> (swap (static_cast<uint64> (v))); } | |||
| inline float ByteOrder::swapIfLittleEndian (const float v) noexcept { union { uint32 asUInt; float asFloat; } n; n.asFloat = v; n.asUInt = ByteOrder::swap (n.asUInt); return n.asFloat; } | |||
| inline double ByteOrder::swapIfLittleEndian (const double v) noexcept { union { uint64 asUInt; double asFloat; } n; n.asFloat = v; n.asUInt = ByteOrder::swap (n.asUInt); return n.asFloat; } | |||
| inline uint32 ByteOrder::littleEndianInt (const void* const bytes) noexcept { return *static_cast<const uint32*> (bytes); } | |||
| inline uint64 ByteOrder::littleEndianInt64 (const void* const bytes) noexcept { return *static_cast<const uint64*> (bytes); } | |||
| inline uint16 ByteOrder::littleEndianShort (const void* const bytes) noexcept { return *static_cast<const uint16*> (bytes); } | |||
| @@ -175,9 +217,21 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept | |||
| inline uint16 ByteOrder::swapIfBigEndian (const uint16 v) noexcept { return swap (v); } | |||
| inline uint32 ByteOrder::swapIfBigEndian (const uint32 v) noexcept { return swap (v); } | |||
| inline uint64 ByteOrder::swapIfBigEndian (const uint64 v) noexcept { return swap (v); } | |||
| inline int16 ByteOrder::swapIfBigEndian (const int16 v) noexcept { return static_cast<int16> (swap (static_cast<uint16> (v))); } | |||
| inline int32 ByteOrder::swapIfBigEndian (const int32 v) noexcept { return static_cast<int16> (swap (static_cast<uint16> (v))); } | |||
| inline int64 ByteOrder::swapIfBigEndian (const int64 v) noexcept { return static_cast<int16> (swap (static_cast<uint16> (v))); } | |||
| inline float ByteOrder::swapIfBigEndian (const float v) noexcept { union { uint32 asUInt; float asFloat; } n; n.asFloat = v; n.asUInt = ByteOrder::swap (n.asUInt); return n.asFloat; } | |||
| inline double ByteOrder::swapIfBigEndian (const double v) noexcept { union { uint64 asUInt; double asFloat; } n; n.asFloat = v; n.asUInt = ByteOrder::swap (n.asUInt); return n.asFloat; } | |||
| inline uint16 ByteOrder::swapIfLittleEndian (const uint16 v) noexcept { return v; } | |||
| inline uint32 ByteOrder::swapIfLittleEndian (const uint32 v) noexcept { return v; } | |||
| inline uint64 ByteOrder::swapIfLittleEndian (const uint64 v) noexcept { return v; } | |||
| inline int16 ByteOrder::swapIfLittleEndian (const int16 v) noexcept { return v; } | |||
| inline int32 ByteOrder::swapIfLittleEndian (const int32 v) noexcept { return v; } | |||
| inline int64 ByteOrder::swapIfLittleEndian (const int64 v) noexcept { return v; } | |||
| inline float ByteOrder::swapIfLittleEndian (const float v) noexcept { return v; } | |||
| inline double ByteOrder::swapIfLittleEndian (const double v) noexcept { return v; } | |||
| inline uint32 ByteOrder::littleEndianInt (const void* const bytes) noexcept { return swap (*static_cast<const uint32*> (bytes)); } | |||
| inline uint64 ByteOrder::littleEndianInt64 (const void* const bytes) noexcept { return swap (*static_cast<const uint64*> (bytes)); } | |||
| inline uint16 ByteOrder::littleEndianShort (const void* const bytes) noexcept { return swap (*static_cast<const uint16*> (bytes)); } | |||
| @@ -108,6 +108,16 @@ bool CharacterFunctions::isLetterOrDigit (const juce_wchar character) noexcept | |||
| return iswalnum ((wint_t) character) != 0; | |||
| } | |||
| bool CharacterFunctions::isPrintable (const char character) noexcept | |||
| { | |||
| return (character >= ' ' && character <= '~'); | |||
| } | |||
| bool CharacterFunctions::isPrintable (const juce_wchar character) noexcept | |||
| { | |||
| return iswprint ((wint_t) character) != 0; | |||
| } | |||
| int CharacterFunctions::getHexDigitValue (const juce_wchar digit) noexcept | |||
| { | |||
| unsigned int d = (unsigned int) digit - '0'; | |||