migrating to the latest JUCE version
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 30
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "CMakeLists.txt"
|
||||
@ -20,7 +20,7 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "com.juce.networkgraphicsdemo"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
targetSdkVersion 30
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-16", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DCMAKE_CXX_STANDARD=14", "-DCMAKE_CXX_EXTENSIONS=OFF"
|
||||
@ -47,7 +47,7 @@ android {
|
||||
productFlavors {
|
||||
debug_ {
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0.0"
|
||||
package="com.juce.NetworkGraphicsDemo">
|
||||
package="com.juce.networkgraphicsdemo">
|
||||
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"
|
||||
android:xlargeScreens="true"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||
@ -14,7 +15,8 @@
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
|
||||
<application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:icon="@drawable/icon" android:hardwareAccelerated="false">
|
||||
<activity android:name="com.rmsl.juce.JuceActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true">
|
||||
android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
@ -11,6 +11,10 @@ endif
|
||||
# (this disables dependency generation if multiple architectures are set)
|
||||
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
|
||||
|
||||
ifndef PKG_CONFIG
|
||||
PKG_CONFIG=pkg-config
|
||||
endif
|
||||
|
||||
ifndef STRIP
|
||||
STRIP=strip
|
||||
endif
|
||||
@ -35,13 +39,13 @@ ifeq ($(CONFIG),Debug)
|
||||
TARGET_ARCH :=
|
||||
endif
|
||||
|
||||
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60102" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
|
||||
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
|
||||
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70002" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell $(PKG_CONFIG) --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
|
||||
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
|
||||
JUCE_TARGET_APP := JUCE\ Network\ Graphics\ Demo
|
||||
|
||||
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS)
|
||||
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
|
||||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
|
||||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell $(PKG_CONFIG) --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
|
||||
|
||||
CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR)
|
||||
endif
|
||||
@ -56,13 +60,13 @@ ifeq ($(CONFIG),Release)
|
||||
TARGET_ARCH :=
|
||||
endif
|
||||
|
||||
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60102" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
|
||||
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
|
||||
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70002" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell $(PKG_CONFIG) --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
|
||||
JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
|
||||
JUCE_TARGET_APP := JUCE\ Network\ Graphics\ Demo
|
||||
|
||||
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS)
|
||||
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
|
||||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
|
||||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell $(PKG_CONFIG) --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
|
||||
|
||||
CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR)
|
||||
endif
|
||||
@ -74,6 +78,8 @@ OBJECTS_APP := \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_processors_ara_2a4c6ef7.o \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_processors_lv2_libs_12bdca08.o \
|
||||
$(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o \
|
||||
$(JUCE_OBJDIR)/include_juce_core_f26d17db.o \
|
||||
$(JUCE_OBJDIR)/include_juce_cryptography_8cb807a8.o \
|
||||
@ -90,8 +96,8 @@ OBJECTS_APP := \
|
||||
all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP)
|
||||
|
||||
$(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES)
|
||||
@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; }
|
||||
@pkg-config --print-errors alsa freetype2 libcurl
|
||||
@command -v $(PKG_CONFIG) >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; }
|
||||
@$(PKG_CONFIG) --print-errors alsa freetype2 libcurl
|
||||
@echo Linking "NetworkGraphicsDemo - App"
|
||||
-$(V_AT)mkdir -p $(JUCE_BINDIR)
|
||||
-$(V_AT)mkdir -p $(JUCE_LIBDIR)
|
||||
@ -128,6 +134,16 @@ $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o: ../../JuceLibraryCode/i
|
||||
@echo "Compiling include_juce_audio_processors.cpp"
|
||||
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
|
||||
|
||||
$(JUCE_OBJDIR)/include_juce_audio_processors_ara_2a4c6ef7.o: ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp
|
||||
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
|
||||
@echo "Compiling include_juce_audio_processors_ara.cpp"
|
||||
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
|
||||
|
||||
$(JUCE_OBJDIR)/include_juce_audio_processors_lv2_libs_12bdca08.o: ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp
|
||||
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
|
||||
@echo "Compiling include_juce_audio_processors_lv2_libs.cpp"
|
||||
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
|
||||
|
||||
$(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o: ../../JuceLibraryCode/include_juce_audio_utils.cpp
|
||||
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
|
||||
@echo "Compiling include_juce_audio_utils.cpp"
|
||||
|
@ -9,6 +9,7 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
006DF460F8DF66EFFA80D968 /* Icon.icns */ = {isa = PBXBuildFile; fileRef = 70F1CAF3C4C561DD81E6AFC1; };
|
||||
0977FEC02DAF29438583198A /* include_juce_core.mm */ = {isa = PBXBuildFile; fileRef = 01E0EEF68A11C1CAF180E173; };
|
||||
0E39AB2B15DCE39E1055A646 /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXBuildFile; fileRef = AB2DE62887E2F58D821F3217; };
|
||||
0FA2A3321630EBE83E439D99 /* include_juce_cryptography.mm */ = {isa = PBXBuildFile; fileRef = AFF729977947528F3E4AAA96; };
|
||||
2E28F61A64DEF942FE7B94C4 /* include_juce_audio_processors.mm */ = {isa = PBXBuildFile; fileRef = AED58461CE961C62A0E0A552; };
|
||||
3717B9F9A0F7C9CB95F1BE7F /* include_juce_gui_extra.mm */ = {isa = PBXBuildFile; fileRef = 7BE6330821794919A88ED8ED; };
|
||||
@ -22,13 +23,13 @@
|
||||
80B9F7ED2009922C693B7DD4 /* DiscRecording.framework */ = {isa = PBXBuildFile; fileRef = CB82A14817C3E2ABBBBC3864; };
|
||||
80EE2C27B466BAFD83881D3F /* Accelerate.framework */ = {isa = PBXBuildFile; fileRef = 2E13A899F4E3C99054A3656F; };
|
||||
8ECB0767EE340DD83869E37D /* WebKit.framework */ = {isa = PBXBuildFile; fileRef = EC794872987FEA2E129C589A; };
|
||||
95C7D26CC68839FC6BF90AC3 /* include_juce_audio_processors_ara.cpp */ = {isa = PBXBuildFile; fileRef = 52EF9BE720EFF47106DB0351; };
|
||||
987CBD5330E76B404F0D966C /* Main.cpp */ = {isa = PBXBuildFile; fileRef = 77C0AC21C1028911123844FC; };
|
||||
9EFD2AA2FFF3C125FDAA4279 /* include_juce_data_structures.mm */ = {isa = PBXBuildFile; fileRef = 7525879E73E8AF32FFA0CDDE; };
|
||||
9F618C008A503063D10076C4 /* BinaryData.cpp */ = {isa = PBXBuildFile; fileRef = 74711D7544168CCAC4969A07; };
|
||||
A1F34D09F4E4338775917ED1 /* include_juce_audio_formats.mm */ = {isa = PBXBuildFile; fileRef = C6E2284D86D93F1D9D5C7666; };
|
||||
B323E5E5FBD5663B21A8E623 /* OpenGL.framework */ = {isa = PBXBuildFile; fileRef = 996E743A20FC78671766BF59; };
|
||||
BB9A9692D99DD0DDB1047B60 /* include_juce_audio_basics.mm */ = {isa = PBXBuildFile; fileRef = 6D1F9E505D20C09647124F0A; };
|
||||
BED88ADEA4DC91AA8C810FA8 /* Carbon.framework */ = {isa = PBXBuildFile; fileRef = 398A945EFD9ED923162982B1; };
|
||||
C4D6C466C41173D6970553D2 /* AudioToolbox.framework */ = {isa = PBXBuildFile; fileRef = 9E8129263CD42C6029FC2CAD; };
|
||||
C5E7BAD864E02CF37F7BD707 /* include_juce_events.mm */ = {isa = PBXBuildFile; fileRef = 33AA348465F512DBA8778DAF; };
|
||||
C6348C6B1D0312580E97EA19 /* include_juce_osc.cpp */ = {isa = PBXBuildFile; fileRef = 3BF06B70407FFDBE9534F942; };
|
||||
@ -49,11 +50,11 @@
|
||||
25DEDA8C9F94A6C8DFC8E53E /* SharedCanvas.h */ /* SharedCanvas.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SharedCanvas.h; path = ../../Source/SharedCanvas.h; sourceTree = SOURCE_ROOT; };
|
||||
2E13A899F4E3C99054A3656F /* Accelerate.framework */ /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
|
||||
33AA348465F512DBA8778DAF /* include_juce_events.mm */ /* include_juce_events.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_events.mm; path = ../../JuceLibraryCode/include_juce_events.mm; sourceTree = SOURCE_ROOT; };
|
||||
398A945EFD9ED923162982B1 /* Carbon.framework */ /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
||||
3BF06B70407FFDBE9534F942 /* include_juce_osc.cpp */ /* include_juce_osc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_osc.cpp; path = ../../JuceLibraryCode/include_juce_osc.cpp; sourceTree = SOURCE_ROOT; };
|
||||
448838BE6E937D450A3C84CE /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
|
||||
4D1DB6D77B6F3DE7A569780B /* CoreAudioKit.framework */ /* CoreAudioKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
|
||||
4FF648D72D6F1A78956CDA1B /* Demos.h */ /* Demos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Demos.h; path = ../../Source/Demos.h; sourceTree = SOURCE_ROOT; };
|
||||
52EF9BE720EFF47106DB0351 /* include_juce_audio_processors_ara.cpp */ /* include_juce_audio_processors_ara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_ara.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp; sourceTree = SOURCE_ROOT; };
|
||||
55CB060922ABCBC105FE38D2 /* juce_osc */ /* juce_osc */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_osc; path = ../../../../modules/juce_osc; sourceTree = SOURCE_ROOT; };
|
||||
660F1970CF687A7AE8371C6D /* include_juce_opengl.mm */ /* include_juce_opengl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_opengl.mm; path = ../../JuceLibraryCode/include_juce_opengl.mm; sourceTree = SOURCE_ROOT; };
|
||||
6799B056504F9F017998B9E2 /* CoreAudio.framework */ /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
@ -67,7 +68,6 @@
|
||||
7BE6330821794919A88ED8ED /* include_juce_gui_extra.mm */ /* include_juce_gui_extra.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_extra.mm; path = ../../JuceLibraryCode/include_juce_gui_extra.mm; sourceTree = SOURCE_ROOT; };
|
||||
84B287BB2AD252B7D69AC47E /* include_juce_gui_basics.mm */ /* include_juce_gui_basics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_basics.mm; path = ../../JuceLibraryCode/include_juce_gui_basics.mm; sourceTree = SOURCE_ROOT; };
|
||||
89583CD42AD218E9753DF11C /* juce_audio_devices */ /* juce_audio_devices */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_devices; path = ../../../../modules/juce_audio_devices; sourceTree = SOURCE_ROOT; };
|
||||
8E2F72AFA0CDA64F0C07F105 /* SlaveComponent.h */ /* SlaveComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SlaveComponent.h; path = ../../Source/SlaveComponent.h; sourceTree = SOURCE_ROOT; };
|
||||
8EACAADD3A23DED3E252C92F /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; };
|
||||
92800676AF753D1A60108F11 /* BinaryData.h */ /* BinaryData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = SOURCE_ROOT; };
|
||||
935CA85EF98714D3A17AE737 /* QuartzCore.framework */ /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
@ -78,11 +78,13 @@
|
||||
9E8129263CD42C6029FC2CAD /* AudioToolbox.framework */ /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
A505E1DABB2ED630EFBA96DB /* juce_audio_processors */ /* juce_audio_processors */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_processors; path = ../../../../modules/juce_audio_processors; sourceTree = SOURCE_ROOT; };
|
||||
A7FF2B353C8568B5A7A80117 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; };
|
||||
AB2DE62887E2F58D821F3217 /* include_juce_audio_processors_lv2_libs.cpp */ /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_lv2_libs.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp; sourceTree = SOURCE_ROOT; };
|
||||
AED58461CE961C62A0E0A552 /* include_juce_audio_processors.mm */ /* include_juce_audio_processors.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_processors.mm; path = ../../JuceLibraryCode/include_juce_audio_processors.mm; sourceTree = SOURCE_ROOT; };
|
||||
AF330F41D1A4865108690E3C /* include_juce_audio_devices.mm */ /* include_juce_audio_devices.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_devices.mm; path = ../../JuceLibraryCode/include_juce_audio_devices.mm; sourceTree = SOURCE_ROOT; };
|
||||
AFF729977947528F3E4AAA96 /* include_juce_cryptography.mm */ /* include_juce_cryptography.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_cryptography.mm; path = ../../JuceLibraryCode/include_juce_cryptography.mm; sourceTree = SOURCE_ROOT; };
|
||||
B5433B00F012AD87AADBFCD6 /* juce_cryptography */ /* juce_cryptography */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_cryptography; path = ../../../../modules/juce_cryptography; sourceTree = SOURCE_ROOT; };
|
||||
B76F10A7778664E164A01934 /* juce_audio_basics */ /* juce_audio_basics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_basics; path = ../../../../modules/juce_audio_basics; sourceTree = SOURCE_ROOT; };
|
||||
B9B80E3572715F63FFC3678B /* ClientComponent.h */ /* ClientComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClientComponent.h; path = ../../Source/ClientComponent.h; sourceTree = SOURCE_ROOT; };
|
||||
BA2E40409255F1B078406221 /* juce_data_structures */ /* juce_data_structures */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_data_structures; path = ../../../../modules/juce_data_structures; sourceTree = SOURCE_ROOT; };
|
||||
C6E2284D86D93F1D9D5C7666 /* include_juce_audio_formats.mm */ /* include_juce_audio_formats.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_formats.mm; path = ../../JuceLibraryCode/include_juce_audio_formats.mm; sourceTree = SOURCE_ROOT; };
|
||||
C78806A6727F44EACFDED4A5 /* Cocoa.framework */ /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
@ -105,7 +107,6 @@
|
||||
files = (
|
||||
80EE2C27B466BAFD83881D3F,
|
||||
C4D6C466C41173D6970553D2,
|
||||
BED88ADEA4DC91AA8C810FA8,
|
||||
3C30D7C28C86F4054257DCD5,
|
||||
67DF295E93E54432043126DF,
|
||||
770AB74B1D3A0108F764DD47,
|
||||
@ -138,7 +139,7 @@
|
||||
4FF648D72D6F1A78956CDA1B,
|
||||
77C0AC21C1028911123844FC,
|
||||
9982F39121710EFFD5FEEAEF,
|
||||
8E2F72AFA0CDA64F0C07F105,
|
||||
B9B80E3572715F63FFC3678B,
|
||||
25DEDA8C9F94A6C8DFC8E53E,
|
||||
);
|
||||
name = Source;
|
||||
@ -149,7 +150,6 @@
|
||||
children = (
|
||||
2E13A899F4E3C99054A3656F,
|
||||
9E8129263CD42C6029FC2CAD,
|
||||
398A945EFD9ED923162982B1,
|
||||
C78806A6727F44EACFDED4A5,
|
||||
6799B056504F9F017998B9E2,
|
||||
4D1DB6D77B6F3DE7A569780B,
|
||||
@ -190,6 +190,8 @@
|
||||
AF330F41D1A4865108690E3C,
|
||||
C6E2284D86D93F1D9D5C7666,
|
||||
AED58461CE961C62A0E0A552,
|
||||
52EF9BE720EFF47106DB0351,
|
||||
AB2DE62887E2F58D821F3217,
|
||||
FCEBB157FB526741DB6791D1,
|
||||
01E0EEF68A11C1CAF180E173,
|
||||
AFF729977947528F3E4AAA96,
|
||||
@ -265,7 +267,7 @@
|
||||
A5398ADB6F5B128C00EB935C = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1340;
|
||||
ORGANIZATIONNAME = "Raw Material Software Limited";
|
||||
TargetAttributes = {
|
||||
4311FBCBD02948A0ED96C7DD = {
|
||||
@ -331,6 +333,8 @@
|
||||
6C2200C52B65E1BE80544E50,
|
||||
A1F34D09F4E4338775917ED1,
|
||||
2E28F61A64DEF942FE7B94C4,
|
||||
95C7D26CC68839FC6BF90AC3,
|
||||
0E39AB2B15DCE39E1055A646,
|
||||
EA487FA4116517A8DFEE85B0,
|
||||
0977FEC02DAF29438583198A,
|
||||
0FA2A3321630EBE83E439D99,
|
||||
@ -357,6 +361,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
EXCLUDED_ARCHS = "";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 3;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
@ -364,7 +369,7 @@
|
||||
"NDEBUG=1",
|
||||
"JUCE_DISPLAY_SPLASH_SCREEN=0",
|
||||
"JUCE_USE_DARK_SPLASH_SCREEN=1",
|
||||
"JUCE_PROJUCER_VERSION=0x60102",
|
||||
"JUCE_PROJUCER_VERSION=0x70002",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_formats=1",
|
||||
@ -388,10 +393,10 @@
|
||||
"JucePlugin_Build_VST3=0",
|
||||
"JucePlugin_Build_AU=0",
|
||||
"JucePlugin_Build_AUv3=0",
|
||||
"JucePlugin_Build_RTAS=0",
|
||||
"JucePlugin_Build_AAX=0",
|
||||
"JucePlugin_Build_Standalone=0",
|
||||
"JucePlugin_Build_Unity=0",
|
||||
"JucePlugin_Build_LV2=0",
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -405,6 +410,7 @@
|
||||
LLVM_LTO = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
|
||||
OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo;
|
||||
PRODUCT_NAME = "JUCE Network Graphics Demo";
|
||||
USE_HEADERMAP = NO;
|
||||
@ -520,6 +526,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
EXCLUDED_ARCHS = "";
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
@ -527,7 +534,7 @@
|
||||
"DEBUG=1",
|
||||
"JUCE_DISPLAY_SPLASH_SCREEN=0",
|
||||
"JUCE_USE_DARK_SPLASH_SCREEN=1",
|
||||
"JUCE_PROJUCER_VERSION=0x60102",
|
||||
"JUCE_PROJUCER_VERSION=0x70002",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_formats=1",
|
||||
@ -551,10 +558,10 @@
|
||||
"JucePlugin_Build_VST3=0",
|
||||
"JucePlugin_Build_AU=0",
|
||||
"JucePlugin_Build_AUv3=0",
|
||||
"JucePlugin_Build_RTAS=0",
|
||||
"JucePlugin_Build_AAX=0",
|
||||
"JucePlugin_Build_Standalone=0",
|
||||
"JucePlugin_Build_Unity=0",
|
||||
"JucePlugin_Build_LV2=0",
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -567,6 +574,7 @@
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
|
||||
OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo;
|
||||
PRODUCT_NAME = "JUCE Network Graphics Demo";
|
||||
USE_HEADERMAP = NO;
|
||||
|
@ -1,20 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2019
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkGraphicsDemo - App", "NetworkGraphicsDemo_App.vcxproj", "{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.Build.0 = Debug|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.ActiveCfg = Release|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio Version 17
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkGraphicsDemo - App", "NetworkGraphicsDemo_App.vcxproj", "{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Debug|x64.Build.0 = Debug|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.ActiveCfg = Release|x64
|
||||
{2F8ABED0-7428-13A5-07CD-EF1F3B43B926}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,33 +1,33 @@
|
||||
#pragma code_page(65001)
|
||||
|
||||
#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 "CompanyName", "Raw Material Software Limited\0"
|
||||
VALUE "LegalCopyright", "Raw Material Software Limited\0"
|
||||
VALUE "FileDescription", "NetworkGraphicsDemo\0"
|
||||
VALUE "FileVersion", "1.0.0\0"
|
||||
VALUE "ProductName", "NetworkGraphicsDemo\0"
|
||||
VALUE "ProductVersion", "1.0.0\0"
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
#endif
|
||||
#pragma code_page(65001)
|
||||
|
||||
#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 "CompanyName", "Raw Material Software Limited\0"
|
||||
VALUE "LegalCopyright", "Raw Material Software Limited\0"
|
||||
VALUE "FileDescription", "NetworkGraphicsDemo\0"
|
||||
VALUE "FileVersion", "1.0.0\0"
|
||||
VALUE "ProductName", "NetworkGraphicsDemo\0"
|
||||
VALUE "ProductVersion", "1.0.0\0"
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
#endif
|
@ -9,6 +9,7 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
006DF460F8DF66EFFA80D968 /* Icon.icns */ = {isa = PBXBuildFile; fileRef = 70F1CAF3C4C561DD81E6AFC1; };
|
||||
0977FEC02DAF29438583198A /* include_juce_core.mm */ = {isa = PBXBuildFile; fileRef = 01E0EEF68A11C1CAF180E173; };
|
||||
0E39AB2B15DCE39E1055A646 /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXBuildFile; fileRef = AB2DE62887E2F58D821F3217; };
|
||||
0FA2A3321630EBE83E439D99 /* include_juce_cryptography.mm */ = {isa = PBXBuildFile; fileRef = AFF729977947528F3E4AAA96; };
|
||||
1282A62308CD1AC3F88A5D03 /* Images.xcassets */ = {isa = PBXBuildFile; fileRef = 5273768FBB55D0DD57A5E70C; };
|
||||
1F7A8BD2B43B3D191132301D /* CoreImage.framework */ = {isa = PBXBuildFile; fileRef = E51ABCA80B75F33848F28184; };
|
||||
@ -23,6 +24,7 @@
|
||||
770AB74B1D3A0108F764DD47 /* CoreAudioKit.framework */ = {isa = PBXBuildFile; fileRef = 4D1DB6D77B6F3DE7A569780B; };
|
||||
80EE2C27B466BAFD83881D3F /* Accelerate.framework */ = {isa = PBXBuildFile; fileRef = 2E13A899F4E3C99054A3656F; };
|
||||
8ECB0767EE340DD83869E37D /* WebKit.framework */ = {isa = PBXBuildFile; fileRef = EC794872987FEA2E129C589A; };
|
||||
95C7D26CC68839FC6BF90AC3 /* include_juce_audio_processors_ara.cpp */ = {isa = PBXBuildFile; fileRef = 52EF9BE720EFF47106DB0351; };
|
||||
987CBD5330E76B404F0D966C /* Main.cpp */ = {isa = PBXBuildFile; fileRef = 77C0AC21C1028911123844FC; };
|
||||
9EFD2AA2FFF3C125FDAA4279 /* include_juce_data_structures.mm */ = {isa = PBXBuildFile; fileRef = 7525879E73E8AF32FFA0CDDE; };
|
||||
9F618C008A503063D10076C4 /* BinaryData.cpp */ = {isa = PBXBuildFile; fileRef = 74711D7544168CCAC4969A07; };
|
||||
@ -59,6 +61,7 @@
|
||||
4D1DB6D77B6F3DE7A569780B /* CoreAudioKit.framework */ /* CoreAudioKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioKit.framework; path = System/Library/Frameworks/CoreAudioKit.framework; sourceTree = SDKROOT; };
|
||||
4FF648D72D6F1A78956CDA1B /* Demos.h */ /* Demos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Demos.h; path = ../../Source/Demos.h; sourceTree = SOURCE_ROOT; };
|
||||
5273768FBB55D0DD57A5E70C /* Images.xcassets */ /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = NetworkGraphicsDemo/Images.xcassets; sourceTree = SOURCE_ROOT; };
|
||||
52EF9BE720EFF47106DB0351 /* include_juce_audio_processors_ara.cpp */ /* include_juce_audio_processors_ara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_ara.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp; sourceTree = SOURCE_ROOT; };
|
||||
55CB060922ABCBC105FE38D2 /* juce_osc */ /* juce_osc */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_osc; path = ../../../../modules/juce_osc; sourceTree = SOURCE_ROOT; };
|
||||
660F1970CF687A7AE8371C6D /* include_juce_opengl.mm */ /* include_juce_opengl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_opengl.mm; path = ../../JuceLibraryCode/include_juce_opengl.mm; sourceTree = SOURCE_ROOT; };
|
||||
6799B056504F9F017998B9E2 /* CoreAudio.framework */ /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
@ -71,7 +74,6 @@
|
||||
7BE6330821794919A88ED8ED /* include_juce_gui_extra.mm */ /* include_juce_gui_extra.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_extra.mm; path = ../../JuceLibraryCode/include_juce_gui_extra.mm; sourceTree = SOURCE_ROOT; };
|
||||
84B287BB2AD252B7D69AC47E /* include_juce_gui_basics.mm */ /* include_juce_gui_basics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_basics.mm; path = ../../JuceLibraryCode/include_juce_gui_basics.mm; sourceTree = SOURCE_ROOT; };
|
||||
89583CD42AD218E9753DF11C /* juce_audio_devices */ /* juce_audio_devices */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_devices; path = ../../../../modules/juce_audio_devices; sourceTree = SOURCE_ROOT; };
|
||||
8E2F72AFA0CDA64F0C07F105 /* SlaveComponent.h */ /* SlaveComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SlaveComponent.h; path = ../../Source/SlaveComponent.h; sourceTree = SOURCE_ROOT; };
|
||||
8EACAADD3A23DED3E252C92F /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; };
|
||||
9193D2A3C463BEAA07FD424D /* CoreText.framework */ /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
|
||||
92800676AF753D1A60108F11 /* BinaryData.h */ /* BinaryData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../JuceLibraryCode/BinaryData.h; sourceTree = SOURCE_ROOT; };
|
||||
@ -83,11 +85,13 @@
|
||||
9E8129263CD42C6029FC2CAD /* AudioToolbox.framework */ /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
A505E1DABB2ED630EFBA96DB /* juce_audio_processors */ /* juce_audio_processors */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_processors; path = ../../../../modules/juce_audio_processors; sourceTree = SOURCE_ROOT; };
|
||||
A7FF2B353C8568B5A7A80117 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; };
|
||||
AB2DE62887E2F58D821F3217 /* include_juce_audio_processors_lv2_libs.cpp */ /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_lv2_libs.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp; sourceTree = SOURCE_ROOT; };
|
||||
AED58461CE961C62A0E0A552 /* include_juce_audio_processors.mm */ /* include_juce_audio_processors.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_processors.mm; path = ../../JuceLibraryCode/include_juce_audio_processors.mm; sourceTree = SOURCE_ROOT; };
|
||||
AF330F41D1A4865108690E3C /* include_juce_audio_devices.mm */ /* include_juce_audio_devices.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_devices.mm; path = ../../JuceLibraryCode/include_juce_audio_devices.mm; sourceTree = SOURCE_ROOT; };
|
||||
AFF729977947528F3E4AAA96 /* include_juce_cryptography.mm */ /* include_juce_cryptography.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_cryptography.mm; path = ../../JuceLibraryCode/include_juce_cryptography.mm; sourceTree = SOURCE_ROOT; };
|
||||
B5433B00F012AD87AADBFCD6 /* juce_cryptography */ /* juce_cryptography */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_cryptography; path = ../../../../modules/juce_cryptography; sourceTree = SOURCE_ROOT; };
|
||||
B76F10A7778664E164A01934 /* juce_audio_basics */ /* juce_audio_basics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_basics; path = ../../../../modules/juce_audio_basics; sourceTree = SOURCE_ROOT; };
|
||||
B9B80E3572715F63FFC3678B /* ClientComponent.h */ /* ClientComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClientComponent.h; path = ../../Source/ClientComponent.h; sourceTree = SOURCE_ROOT; };
|
||||
BA2E40409255F1B078406221 /* juce_data_structures */ /* juce_data_structures */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_data_structures; path = ../../../../modules/juce_data_structures; sourceTree = SOURCE_ROOT; };
|
||||
C6E2284D86D93F1D9D5C7666 /* include_juce_audio_formats.mm */ /* include_juce_audio_formats.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_audio_formats.mm; path = ../../JuceLibraryCode/include_juce_audio_formats.mm; sourceTree = SOURCE_ROOT; };
|
||||
C821C5805007FFDC2636BBE6 /* OpenGLES.framework */ /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
@ -147,7 +151,7 @@
|
||||
4FF648D72D6F1A78956CDA1B,
|
||||
77C0AC21C1028911123844FC,
|
||||
9982F39121710EFFD5FEEAEF,
|
||||
8E2F72AFA0CDA64F0C07F105,
|
||||
B9B80E3572715F63FFC3678B,
|
||||
25DEDA8C9F94A6C8DFC8E53E,
|
||||
);
|
||||
name = Source;
|
||||
@ -201,6 +205,8 @@
|
||||
AF330F41D1A4865108690E3C,
|
||||
C6E2284D86D93F1D9D5C7666,
|
||||
AED58461CE961C62A0E0A552,
|
||||
52EF9BE720EFF47106DB0351,
|
||||
AB2DE62887E2F58D821F3217,
|
||||
FCEBB157FB526741DB6791D1,
|
||||
01E0EEF68A11C1CAF180E173,
|
||||
AFF729977947528F3E4AAA96,
|
||||
@ -276,7 +282,7 @@
|
||||
A5398ADB6F5B128C00EB935C = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1340;
|
||||
ORGANIZATIONNAME = "Raw Material Software Limited";
|
||||
TargetAttributes = {
|
||||
4311FBCBD02948A0ED96C7DD = {
|
||||
@ -343,6 +349,8 @@
|
||||
6C2200C52B65E1BE80544E50,
|
||||
A1F34D09F4E4338775917ED1,
|
||||
2E28F61A64DEF942FE7B94C4,
|
||||
95C7D26CC68839FC6BF90AC3,
|
||||
0E39AB2B15DCE39E1055A646,
|
||||
EA487FA4116517A8DFEE85B0,
|
||||
0977FEC02DAF29438583198A,
|
||||
0FA2A3321630EBE83E439D99,
|
||||
@ -378,7 +386,7 @@
|
||||
"JUCE_CONTENT_SHARING=1",
|
||||
"JUCE_DISPLAY_SPLASH_SCREEN=0",
|
||||
"JUCE_USE_DARK_SPLASH_SCREEN=1",
|
||||
"JUCE_PROJUCER_VERSION=0x60102",
|
||||
"JUCE_PROJUCER_VERSION=0x70002",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_formats=1",
|
||||
@ -402,10 +410,10 @@
|
||||
"JucePlugin_Build_VST3=0",
|
||||
"JucePlugin_Build_AU=0",
|
||||
"JucePlugin_Build_AUv3=0",
|
||||
"JucePlugin_Build_RTAS=0",
|
||||
"JucePlugin_Build_AAX=0",
|
||||
"JucePlugin_Build_Standalone=0",
|
||||
"JucePlugin_Build_Unity=0",
|
||||
"JucePlugin_Build_LV2=0",
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -418,6 +426,7 @@
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LLVM_LTO = YES;
|
||||
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
|
||||
OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit -weak_framework UserNotifications";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo;
|
||||
PRODUCT_NAME = "JUCE Network Graphics Demo";
|
||||
USE_HEADERMAP = NO;
|
||||
@ -545,7 +554,7 @@
|
||||
"JUCE_CONTENT_SHARING=1",
|
||||
"JUCE_DISPLAY_SPLASH_SCREEN=0",
|
||||
"JUCE_USE_DARK_SPLASH_SCREEN=1",
|
||||
"JUCE_PROJUCER_VERSION=0x60102",
|
||||
"JUCE_PROJUCER_VERSION=0x70002",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
|
||||
"JUCE_MODULE_AVAILABLE_juce_audio_formats=1",
|
||||
@ -569,10 +578,10 @@
|
||||
"JucePlugin_Build_VST3=0",
|
||||
"JucePlugin_Build_AU=0",
|
||||
"JucePlugin_Build_AUv3=0",
|
||||
"JucePlugin_Build_RTAS=0",
|
||||
"JucePlugin_Build_AAX=0",
|
||||
"JucePlugin_Build_Standalone=0",
|
||||
"JucePlugin_Build_Unity=0",
|
||||
"JucePlugin_Build_LV2=0",
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -584,6 +593,7 @@
|
||||
INFOPLIST_PREPROCESS = NO;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
|
||||
OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit -weak_framework UserNotifications";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.juce.NetworkGraphicsDemo;
|
||||
PRODUCT_NAME = "JUCE Network Graphics Demo";
|
||||
USE_HEADERMAP = NO;
|
||||
|
@ -42,18 +42,6 @@
|
||||
"filename": "Icon-Spotlight-40@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone",
|
||||
"size": "57x57",
|
||||
"filename": "Icon.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone",
|
||||
"size": "57x57",
|
||||
"filename": "Icon@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone",
|
||||
"size": "60x60",
|
||||
@ -102,30 +90,6 @@
|
||||
"filename": "Icon-Spotlight-40@2x-1.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad",
|
||||
"size": "50x50",
|
||||
"filename": "Icon-Small-50.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad",
|
||||
"size": "50x50",
|
||||
"filename": "Icon-Small-50@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad",
|
||||
"size": "72x72",
|
||||
"filename": "Icon-72.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad",
|
||||
"size": "72x72",
|
||||
"filename": "Icon-72@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad",
|
||||
"size": "76x76",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB |
@ -1,15 +1,15 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2020 - Raw Material Software Limited
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-6-licence
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,30 @@
|
||||
/* =========================================================================================
|
||||
|
||||
This is an auto-generated file: Any edits you make may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace BinaryData
|
||||
{
|
||||
extern const char* juce_icon_png;
|
||||
const int juce_icon_pngSize = 45854;
|
||||
|
||||
// Number of elements in the namedResourceList and originalFileNames arrays.
|
||||
const int namedResourceListSize = 1;
|
||||
|
||||
// Points to the start of a list of resource names.
|
||||
extern const char* namedResourceList[];
|
||||
|
||||
// Points to the start of a list of resource filenames.
|
||||
extern const char* originalFilenames[];
|
||||
|
||||
// If you provide the name of one of the binary resource variables above, this function will
|
||||
// return the corresponding data and its size (or a null pointer if the name isn't found).
|
||||
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);
|
||||
|
||||
// If you provide the name of one of the binary resource variables above, this function will
|
||||
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).
|
||||
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
|
||||
}
|
||||
/* =========================================================================================
|
||||
|
||||
This is an auto-generated file: Any edits you make may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace BinaryData
|
||||
{
|
||||
extern const char* juce_icon_png;
|
||||
const int juce_icon_pngSize = 45854;
|
||||
|
||||
// Number of elements in the namedResourceList and originalFileNames arrays.
|
||||
const int namedResourceListSize = 1;
|
||||
|
||||
// Points to the start of a list of resource names.
|
||||
extern const char* namedResourceList[];
|
||||
|
||||
// Points to the start of a list of resource filenames.
|
||||
extern const char* originalFilenames[];
|
||||
|
||||
// If you provide the name of one of the binary resource variables above, this function will
|
||||
// return the corresponding data and its size (or a null pointer if the name isn't found).
|
||||
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);
|
||||
|
||||
// If you provide the name of one of the binary resource variables above, this function will
|
||||
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).
|
||||
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
|
||||
}
|
||||
|
@ -1,56 +1,56 @@
|
||||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <juce_audio_basics/juce_audio_basics.h>
|
||||
#include <juce_audio_devices/juce_audio_devices.h>
|
||||
#include <juce_audio_formats/juce_audio_formats.h>
|
||||
#include <juce_audio_processors/juce_audio_processors.h>
|
||||
#include <juce_audio_utils/juce_audio_utils.h>
|
||||
#include <juce_core/juce_core.h>
|
||||
#include <juce_cryptography/juce_cryptography.h>
|
||||
#include <juce_data_structures/juce_data_structures.h>
|
||||
#include <juce_events/juce_events.h>
|
||||
#include <juce_graphics/juce_graphics.h>
|
||||
#include <juce_gui_basics/juce_gui_basics.h>
|
||||
#include <juce_gui_extra/juce_gui_extra.h>
|
||||
#include <juce_opengl/juce_opengl.h>
|
||||
#include <juce_osc/juce_osc.h>
|
||||
|
||||
#include "BinaryData.h"
|
||||
|
||||
#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
|
||||
/** If you've hit this error then the version of the Projucer that was used to generate this project is
|
||||
older than the version of the JUCE modules being included. To fix this error, re-save your project
|
||||
using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
|
||||
remove the JUCE_PROJUCER_VERSION define.
|
||||
*/
|
||||
#error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
|
||||
#endif
|
||||
|
||||
#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 = "NetworkGraphicsDemo";
|
||||
const char* const companyName = "Raw Material Software Limited";
|
||||
const char* const versionString = "1.0.0";
|
||||
const int versionNumber = 0x10000;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <juce_audio_basics/juce_audio_basics.h>
|
||||
#include <juce_audio_devices/juce_audio_devices.h>
|
||||
#include <juce_audio_formats/juce_audio_formats.h>
|
||||
#include <juce_audio_processors/juce_audio_processors.h>
|
||||
#include <juce_audio_utils/juce_audio_utils.h>
|
||||
#include <juce_core/juce_core.h>
|
||||
#include <juce_cryptography/juce_cryptography.h>
|
||||
#include <juce_data_structures/juce_data_structures.h>
|
||||
#include <juce_events/juce_events.h>
|
||||
#include <juce_graphics/juce_graphics.h>
|
||||
#include <juce_gui_basics/juce_gui_basics.h>
|
||||
#include <juce_gui_extra/juce_gui_extra.h>
|
||||
#include <juce_opengl/juce_opengl.h>
|
||||
#include <juce_osc/juce_osc.h>
|
||||
|
||||
#include "BinaryData.h"
|
||||
|
||||
#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
|
||||
/** If you've hit this error then the version of the Projucer that was used to generate this project is
|
||||
older than the version of the JUCE modules being included. To fix this error, re-save your project
|
||||
using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
|
||||
remove the JUCE_PROJUCER_VERSION define.
|
||||
*/
|
||||
#error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
|
||||
#endif
|
||||
|
||||
#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 = "NetworkGraphicsDemo";
|
||||
const char* const companyName = "Raw Material Software Limited";
|
||||
const char* const versionString = "1.0.0";
|
||||
const int versionNumber = 0x10000;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_basics/juce_audio_basics.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_basics/juce_audio_basics.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_devices/juce_audio_devices.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_devices/juce_audio_devices.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_formats/juce_audio_formats.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_formats/juce_audio_formats.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_processors/juce_audio_processors.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_processors/juce_audio_processors.cpp>
|
||||
|
8
deps/juce/extras/NetworkGraphicsDemo/JuceLibraryCode/include_juce_audio_processors_ara.cpp
vendored
Normal file
8
deps/juce/extras/NetworkGraphicsDemo/JuceLibraryCode/include_juce_audio_processors_ara.cpp
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_processors/juce_audio_processors_ara.cpp>
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_processors/juce_audio_processors_lv2_libs.cpp>
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_utils/juce_audio_utils.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_audio_utils/juce_audio_utils.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_core/juce_core.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_core/juce_core.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_cryptography/juce_cryptography.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_cryptography/juce_cryptography.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_data_structures/juce_data_structures.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_data_structures/juce_data_structures.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_events/juce_events.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_events/juce_events.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_graphics/juce_graphics.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_graphics/juce_graphics.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_gui_basics/juce_gui_basics.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_gui_basics/juce_gui_basics.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_gui_extra/juce_gui_extra.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_gui_extra/juce_gui_extra.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_opengl/juce_opengl.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_opengl/juce_opengl.cpp>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_osc/juce_osc.cpp>
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
*/
|
||||
|
||||
#include <juce_osc/juce_osc.cpp>
|
||||
|
@ -10,8 +10,8 @@
|
||||
<FILE id="xdUc9q" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/>
|
||||
<FILE id="Vjuvqu" name="MasterComponent.h" compile="0" resource="0"
|
||||
file="Source/MasterComponent.h"/>
|
||||
<FILE id="KbZNxO" name="SlaveComponent.h" compile="0" resource="0"
|
||||
file="Source/SlaveComponent.h"/>
|
||||
<FILE id="KbZNxO" name="ClientComponent.h" compile="0" resource="0"
|
||||
file="Source/ClientComponent.h"/>
|
||||
<FILE id="F7A4kl" name="SharedCanvas.h" compile="0" resource="0" file="Source/SharedCanvas.h"/>
|
||||
</GROUP>
|
||||
<FILE id="Ww6bQw" name="juce_icon.png" compile="0" resource="1" file="Source/juce_icon.png"/>
|
||||
@ -41,7 +41,7 @@
|
||||
<MODULEPATH id="juce_cryptography" path="../../modules"/>
|
||||
</MODULEPATHS>
|
||||
</XCODE_MAC>
|
||||
<VS2019 targetFolder="Builds/VisualStudio2019">
|
||||
<VS2022 targetFolder="Builds/VisualStudio2022">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" targetName="JUCE Network Graphics Demo"/>
|
||||
<CONFIGURATION name="Release" isDebug="0" targetName="JUCE Network Graphics Demo"/>
|
||||
@ -62,7 +62,7 @@
|
||||
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
|
||||
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
|
||||
</MODULEPATHS>
|
||||
</VS2019>
|
||||
</VS2022>
|
||||
<XCODE_IPHONE targetFolder="Builds/iOS" bigIcon="Ww6bQw">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" targetName="JUCE Network Graphics Demo"/>
|
||||
@ -111,8 +111,8 @@
|
||||
androidCpp11="1" targetFolder="Builds/Android" bigIcon="Ww6bQw"
|
||||
gradleToolchainVersion="3.6">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" androidArchitectures="armeabi-v7a x86" isDebug="1"
|
||||
optimisation="6" targetName="JUCE Network Graphics Demo" defines="JUCE_DEBUG=0"/>
|
||||
<CONFIGURATION name="Debug" isDebug="1" optimisation="6"
|
||||
targetName="JUCE Network Graphics Demo" defines="JUCE_DEBUG=0"/>
|
||||
<CONFIGURATION name="Release" isDebug="0" targetName="JUCE Network Graphics Demo"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
|
@ -1,224 +1,224 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2020 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
|
||||
End User License Agreement: www.juce.com/juce-6-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
This component runs in a slave process, draws the part of the canvas that this
|
||||
particular client covers, and updates itself when messages arrive from the master
|
||||
containing new canvas states.
|
||||
*/
|
||||
class SlaveCanvasComponent : public Component,
|
||||
private OSCSender,
|
||||
private OSCReceiver,
|
||||
private OSCReceiver::Listener<OSCReceiver::RealtimeCallback>,
|
||||
private AsyncUpdater,
|
||||
private Timer
|
||||
{
|
||||
public:
|
||||
SlaveCanvasComponent (PropertiesFile& p, int windowIndex) : properties (p)
|
||||
{
|
||||
{
|
||||
String uuidPropName ("UUID" + String (windowIndex));
|
||||
clientName = properties.getValue (uuidPropName);
|
||||
|
||||
if (clientName.isEmpty())
|
||||
{
|
||||
clientName = "CLIENT_" + String (Random().nextInt (10000)).toUpperCase();
|
||||
properties.setValue (uuidPropName, clientName);
|
||||
}
|
||||
}
|
||||
|
||||
setOpaque (true);
|
||||
setSize (1500, 900);
|
||||
|
||||
if (! OSCSender::connect (getBroadcastIPAddress(), clientPortNumber))
|
||||
error = "Client app OSC sender: network connection error.";
|
||||
|
||||
if (! OSCReceiver::connect (masterPortNumber))
|
||||
error = "Client app OSC receiver: network connection error.";
|
||||
|
||||
OSCReceiver::addListener (this);
|
||||
|
||||
timerCallback();
|
||||
startTimer (2000);
|
||||
}
|
||||
|
||||
~SlaveCanvasComponent() override
|
||||
{
|
||||
OSCReceiver::removeListener (this);
|
||||
}
|
||||
|
||||
private:
|
||||
void mouseDrag (const MouseEvent& e) override
|
||||
{
|
||||
auto clientArea = getAreaInGlobalSpace();
|
||||
|
||||
if (! clientArea.isEmpty())
|
||||
{
|
||||
OSCMessage message (userInputOSCAddress);
|
||||
|
||||
message.addString (clientName);
|
||||
message.addFloat32 (e.position.x * clientArea.getWidth() / (float) getWidth() + clientArea.getX());
|
||||
message.addFloat32 (e.position.y * clientArea.getHeight() / (float) getHeight() + clientArea.getY());
|
||||
|
||||
send (message);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void oscMessageReceived (const OSCMessage& message) override
|
||||
{
|
||||
auto address = message.getAddressPattern();
|
||||
|
||||
if (address.matches (canvasStateOSCAddress))
|
||||
canvasStateOSCMessageReceived (message);
|
||||
}
|
||||
|
||||
struct NewStateMessage : public Message
|
||||
{
|
||||
NewStateMessage (const MemoryBlock& d) : data (d) {}
|
||||
MemoryBlock data;
|
||||
};
|
||||
|
||||
void canvasStateOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.isEmpty() || ! message[0].isBlob())
|
||||
return;
|
||||
|
||||
if (packetiser.appendIncomingBlock (message[0].getBlob()))
|
||||
{
|
||||
const ScopedLock sl (canvasLock);
|
||||
|
||||
MemoryBlock newCanvasData;
|
||||
|
||||
if (packetiser.reassemble (newCanvasData))
|
||||
{
|
||||
MemoryInputStream i (newCanvasData.getData(), newCanvasData.getSize(), false);
|
||||
canvas2.load (i);
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
String getMachineInfoToDisplay() const
|
||||
{
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (getScreenBounds().getCentre());
|
||||
return getOSName() + " " + String (display->dpi) + " " + String (display->scale);
|
||||
}
|
||||
|
||||
static String getOSName()
|
||||
{
|
||||
#if JUCE_MAC
|
||||
return "Mac OSX";
|
||||
#elif JUCE_ANDROID
|
||||
return "Android";
|
||||
#elif JUCE_IOS
|
||||
return "iOS";
|
||||
#elif JUCE_WINDOWS
|
||||
return "Windows";
|
||||
#elif JUCE_LINUX
|
||||
return "Linux";
|
||||
#elif JUCE_BSD
|
||||
return "BSD";
|
||||
#endif
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (canvas.backgroundColour);
|
||||
|
||||
auto clientArea = getAreaInGlobalSpace();
|
||||
|
||||
if (clientArea.isEmpty())
|
||||
{
|
||||
g.setColour (Colours::red.withAlpha (0.5f));
|
||||
g.setFont (20.0f);
|
||||
g.drawText ("Not Connected", getLocalBounds(), Justification::centred, false);
|
||||
return;
|
||||
}
|
||||
|
||||
canvas.draw (g, getLocalBounds().toFloat(), clientArea);
|
||||
|
||||
g.setFont (Font (34.0f));
|
||||
g.setColour (Colours::white.withAlpha (0.6f));
|
||||
|
||||
g.drawText (getMachineInfoToDisplay(),
|
||||
getLocalBounds().reduced (10).removeFromBottom (20),
|
||||
Justification::centredRight, true);
|
||||
|
||||
if (error.isNotEmpty())
|
||||
{
|
||||
g.setColour (Colours::red);
|
||||
g.drawText (error, getLocalBounds().reduced (10).removeFromBottom (80),
|
||||
Justification::centredRight, true);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle<float> getAreaInGlobalSpace() const
|
||||
{
|
||||
if (auto client = canvas.findClient (clientName))
|
||||
{
|
||||
auto screenBounds = getScreenBounds();
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (screenBounds.getCentre());
|
||||
return ((screenBounds - display->userArea.getCentre()).toFloat() / (client->scaleFactor * display->dpi / display->scale)) + client->centre;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getScreenAreaInGlobalSpace() const
|
||||
{
|
||||
if (auto client = canvas.findClient (clientName))
|
||||
{
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (getScreenBounds().getCentre());
|
||||
return (display->userArea.toFloat() / (client->scaleFactor * display->dpi / display->scale)).withCentre (client->centre);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
send (newClientOSCAddress, clientName + ":" + IPAddress::getLocalAddress().toString()
|
||||
+ ":" + getScreenAreaInGlobalSpace().toString());
|
||||
}
|
||||
|
||||
void handleAsyncUpdate() override
|
||||
{
|
||||
const ScopedLock sl (canvasLock);
|
||||
canvas.swapWith (canvas2);
|
||||
repaint();
|
||||
}
|
||||
|
||||
SharedCanvasDescription canvas, canvas2;
|
||||
PropertiesFile& properties;
|
||||
String clientName, error;
|
||||
|
||||
CriticalSection canvasLock;
|
||||
BlockPacketiser packetiser;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SlaveCanvasComponent)
|
||||
};
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
This component runs in a client process, draws the part of the canvas that this
|
||||
particular client covers, and updates itself when messages arrive from the master
|
||||
containing new canvas states.
|
||||
*/
|
||||
class ClientCanvasComponent : public Component,
|
||||
private OSCSender,
|
||||
private OSCReceiver,
|
||||
private OSCReceiver::Listener<OSCReceiver::RealtimeCallback>,
|
||||
private AsyncUpdater,
|
||||
private Timer
|
||||
{
|
||||
public:
|
||||
ClientCanvasComponent (PropertiesFile& p, int windowIndex) : properties (p)
|
||||
{
|
||||
{
|
||||
String uuidPropName ("UUID" + String (windowIndex));
|
||||
clientName = properties.getValue (uuidPropName);
|
||||
|
||||
if (clientName.isEmpty())
|
||||
{
|
||||
clientName = "CLIENT_" + String (Random().nextInt (10000)).toUpperCase();
|
||||
properties.setValue (uuidPropName, clientName);
|
||||
}
|
||||
}
|
||||
|
||||
setOpaque (true);
|
||||
setSize (1500, 900);
|
||||
|
||||
if (! OSCSender::connect (getBroadcastIPAddress(), clientPortNumber))
|
||||
error = "Client app OSC sender: network connection error.";
|
||||
|
||||
if (! OSCReceiver::connect (masterPortNumber))
|
||||
error = "Client app OSC receiver: network connection error.";
|
||||
|
||||
OSCReceiver::addListener (this);
|
||||
|
||||
timerCallback();
|
||||
startTimer (2000);
|
||||
}
|
||||
|
||||
~ClientCanvasComponent() override
|
||||
{
|
||||
OSCReceiver::removeListener (this);
|
||||
}
|
||||
|
||||
private:
|
||||
void mouseDrag (const MouseEvent& e) override
|
||||
{
|
||||
auto clientArea = getAreaInGlobalSpace();
|
||||
|
||||
if (! clientArea.isEmpty())
|
||||
{
|
||||
OSCMessage message (userInputOSCAddress);
|
||||
|
||||
message.addString (clientName);
|
||||
message.addFloat32 (e.position.x * clientArea.getWidth() / (float) getWidth() + clientArea.getX());
|
||||
message.addFloat32 (e.position.y * clientArea.getHeight() / (float) getHeight() + clientArea.getY());
|
||||
|
||||
send (message);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void oscMessageReceived (const OSCMessage& message) override
|
||||
{
|
||||
auto address = message.getAddressPattern();
|
||||
|
||||
if (address.matches (canvasStateOSCAddress))
|
||||
canvasStateOSCMessageReceived (message);
|
||||
}
|
||||
|
||||
struct NewStateMessage : public Message
|
||||
{
|
||||
NewStateMessage (const MemoryBlock& d) : data (d) {}
|
||||
MemoryBlock data;
|
||||
};
|
||||
|
||||
void canvasStateOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.isEmpty() || ! message[0].isBlob())
|
||||
return;
|
||||
|
||||
if (packetiser.appendIncomingBlock (message[0].getBlob()))
|
||||
{
|
||||
const ScopedLock sl (canvasLock);
|
||||
|
||||
MemoryBlock newCanvasData;
|
||||
|
||||
if (packetiser.reassemble (newCanvasData))
|
||||
{
|
||||
MemoryInputStream i (newCanvasData.getData(), newCanvasData.getSize(), false);
|
||||
canvas2.load (i);
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
String getMachineInfoToDisplay() const
|
||||
{
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (getScreenBounds().getCentre());
|
||||
return getOSName() + " " + String (display->dpi) + " " + String (display->scale);
|
||||
}
|
||||
|
||||
static String getOSName()
|
||||
{
|
||||
#if JUCE_MAC
|
||||
return "Mac OSX";
|
||||
#elif JUCE_ANDROID
|
||||
return "Android";
|
||||
#elif JUCE_IOS
|
||||
return "iOS";
|
||||
#elif JUCE_WINDOWS
|
||||
return "Windows";
|
||||
#elif JUCE_LINUX
|
||||
return "Linux";
|
||||
#elif JUCE_BSD
|
||||
return "BSD";
|
||||
#endif
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (canvas.backgroundColour);
|
||||
|
||||
auto clientArea = getAreaInGlobalSpace();
|
||||
|
||||
if (clientArea.isEmpty())
|
||||
{
|
||||
g.setColour (Colours::red.withAlpha (0.5f));
|
||||
g.setFont (20.0f);
|
||||
g.drawText ("Not Connected", getLocalBounds(), Justification::centred, false);
|
||||
return;
|
||||
}
|
||||
|
||||
canvas.draw (g, getLocalBounds().toFloat(), clientArea);
|
||||
|
||||
g.setFont (Font (34.0f));
|
||||
g.setColour (Colours::white.withAlpha (0.6f));
|
||||
|
||||
g.drawText (getMachineInfoToDisplay(),
|
||||
getLocalBounds().reduced (10).removeFromBottom (20),
|
||||
Justification::centredRight, true);
|
||||
|
||||
if (error.isNotEmpty())
|
||||
{
|
||||
g.setColour (Colours::red);
|
||||
g.drawText (error, getLocalBounds().reduced (10).removeFromBottom (80),
|
||||
Justification::centredRight, true);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle<float> getAreaInGlobalSpace() const
|
||||
{
|
||||
if (auto client = canvas.findClient (clientName))
|
||||
{
|
||||
auto screenBounds = getScreenBounds();
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (screenBounds.getCentre());
|
||||
return ((screenBounds - display->userArea.getCentre()).toFloat() / (client->scaleFactor * display->dpi / display->scale)) + client->centre;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getScreenAreaInGlobalSpace() const
|
||||
{
|
||||
if (auto client = canvas.findClient (clientName))
|
||||
{
|
||||
auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (getScreenBounds().getCentre());
|
||||
return (display->userArea.toFloat() / (client->scaleFactor * display->dpi / display->scale)).withCentre (client->centre);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
send (newClientOSCAddress, clientName + ":" + IPAddress::getLocalAddress().toString()
|
||||
+ ":" + getScreenAreaInGlobalSpace().toString());
|
||||
}
|
||||
|
||||
void handleAsyncUpdate() override
|
||||
{
|
||||
const ScopedLock sl (canvasLock);
|
||||
canvas.swapWith (canvas2);
|
||||
repaint();
|
||||
}
|
||||
|
||||
SharedCanvasDescription canvas, canvas2;
|
||||
PropertiesFile& properties;
|
||||
String clientName, error;
|
||||
|
||||
CriticalSection canvasLock;
|
||||
BlockPacketiser packetiser;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ClientCanvasComponent)
|
||||
};
|
1008
deps/juce/extras/NetworkGraphicsDemo/Source/Demos.h
vendored
1008
deps/juce/extras/NetworkGraphicsDemo/Source/Demos.h
vendored
File diff suppressed because it is too large
Load Diff
314
deps/juce/extras/NetworkGraphicsDemo/Source/Main.cpp
vendored
314
deps/juce/extras/NetworkGraphicsDemo/Source/Main.cpp
vendored
@ -1,157 +1,157 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2020 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
|
||||
End User License Agreement: www.juce.com/juce-6-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include <JuceHeader.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
String getBroadcastIPAddress()
|
||||
{
|
||||
return IPAddress::getLocalAddress().toString().upToLastOccurrenceOf (".", false, false) + ".255";
|
||||
}
|
||||
|
||||
static const int masterPortNumber = 9001; // the UDP port the master sends on / the clients receive.
|
||||
static const int clientPortNumber = 9002; // the UDP port the clients send on / the master receives.
|
||||
|
||||
static const String canvasStateOSCAddress = "/juce/nfd/canvasState";
|
||||
static const String newClientOSCAddress = "/juce/nfd/newClient";
|
||||
static const String userInputOSCAddress = "/juce/nfd/userInput";
|
||||
}
|
||||
|
||||
#include "SharedCanvas.h"
|
||||
#include "SlaveComponent.h"
|
||||
#include "Demos.h"
|
||||
#include "MasterComponent.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class NetworkGraphicsDemoApplication : public JUCEApplication
|
||||
{
|
||||
public:
|
||||
NetworkGraphicsDemoApplication() : properties (getPropertyFileOptions())
|
||||
{}
|
||||
|
||||
const String getApplicationName() override { return ProjectInfo::projectName; }
|
||||
const String getApplicationVersion() override { return ProjectInfo::versionString; }
|
||||
bool moreThanOneInstanceAllowed() override { return true; }
|
||||
void anotherInstanceStarted (const String&) override {}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
#if ! JUCE_IOS && ! JUCE_ANDROID
|
||||
// Run as the master if we have a command-line flag "master" or if the exe itself
|
||||
// has been renamed to include the word "master"..
|
||||
bool isMaster = commandLine.containsIgnoreCase ("master")
|
||||
|| File::getSpecialLocation (File::currentApplicationFile)
|
||||
.getFileName().containsIgnoreCase ("master");
|
||||
|
||||
if (isMaster)
|
||||
mainWindows.add (new MainWindow (properties));
|
||||
#endif
|
||||
|
||||
mainWindows.add (new MainWindow (properties, 0));
|
||||
|
||||
Desktop::getInstance().setScreenSaverEnabled (false);
|
||||
}
|
||||
|
||||
void shutdown() override
|
||||
{
|
||||
mainWindows.clear();
|
||||
properties.saveIfNeeded();
|
||||
}
|
||||
|
||||
void systemRequestedQuit() override
|
||||
{
|
||||
quit();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct MainWindow : public DocumentWindow
|
||||
{
|
||||
explicit MainWindow (PropertiesFile& props)
|
||||
: DocumentWindow ("JUCE Networked Graphics Demo - Master", Colours::white, DocumentWindow::allButtons)
|
||||
{
|
||||
setUsingNativeTitleBar (true);
|
||||
setContentOwned (new MasterContentComponent (props), true);
|
||||
setBounds (100, 50, getWidth(), getHeight());
|
||||
setResizable (true, false);
|
||||
setVisible (true);
|
||||
|
||||
glContext.attachTo (*this);
|
||||
}
|
||||
|
||||
MainWindow (PropertiesFile& props, int windowIndex)
|
||||
: DocumentWindow ("JUCE Networked Graphics Demo", Colours::black, DocumentWindow::allButtons)
|
||||
{
|
||||
setUsingNativeTitleBar (true);
|
||||
setContentOwned (new SlaveCanvasComponent (props, windowIndex), true);
|
||||
setBounds (500, 100, getWidth(), getHeight());
|
||||
setResizable (true, false);
|
||||
setVisible (true);
|
||||
|
||||
#if ! JUCE_IOS
|
||||
glContext.attachTo (*this);
|
||||
#endif
|
||||
|
||||
#if JUCE_IOS || JUCE_ANDROID
|
||||
setFullScreen (true);
|
||||
#endif
|
||||
}
|
||||
|
||||
~MainWindow() override
|
||||
{
|
||||
glContext.detach();
|
||||
}
|
||||
|
||||
void closeButtonPressed() override
|
||||
{
|
||||
JUCEApplication::getInstance()->systemRequestedQuit();
|
||||
}
|
||||
|
||||
OpenGLContext glContext;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
|
||||
};
|
||||
|
||||
static PropertiesFile::Options getPropertyFileOptions()
|
||||
{
|
||||
PropertiesFile::Options o;
|
||||
o.applicationName = "JUCE Network Graphics Demo";
|
||||
o.filenameSuffix = ".settings";
|
||||
o.folderName = "JUCE Network Graphics Demo";
|
||||
o.osxLibrarySubFolder = "Application Support/JUCE Network Graphics Demo";
|
||||
o.millisecondsBeforeSaving = 2000;
|
||||
return o;
|
||||
}
|
||||
|
||||
PropertiesFile properties;
|
||||
OwnedArray<MainWindow> mainWindows;
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// This macro generates the main() routine that launches the app.
|
||||
START_JUCE_APPLICATION (NetworkGraphicsDemoApplication)
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include <JuceHeader.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
String getBroadcastIPAddress()
|
||||
{
|
||||
return IPAddress::getLocalAddress().toString().upToLastOccurrenceOf (".", false, false) + ".255";
|
||||
}
|
||||
|
||||
static const int masterPortNumber = 9001; // the UDP port the master sends on / the clients receive.
|
||||
static const int clientPortNumber = 9002; // the UDP port the clients send on / the master receives.
|
||||
|
||||
static const String canvasStateOSCAddress = "/juce/nfd/canvasState";
|
||||
static const String newClientOSCAddress = "/juce/nfd/newClient";
|
||||
static const String userInputOSCAddress = "/juce/nfd/userInput";
|
||||
}
|
||||
|
||||
#include "SharedCanvas.h"
|
||||
#include "ClientComponent.h"
|
||||
#include "Demos.h"
|
||||
#include "MasterComponent.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class NetworkGraphicsDemoApplication : public JUCEApplication
|
||||
{
|
||||
public:
|
||||
NetworkGraphicsDemoApplication() : properties (getPropertyFileOptions())
|
||||
{}
|
||||
|
||||
const String getApplicationName() override { return ProjectInfo::projectName; }
|
||||
const String getApplicationVersion() override { return ProjectInfo::versionString; }
|
||||
bool moreThanOneInstanceAllowed() override { return true; }
|
||||
void anotherInstanceStarted (const String&) override {}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
#if ! JUCE_IOS && ! JUCE_ANDROID
|
||||
// Run as the master if we have a command-line flag "master" or if the exe itself
|
||||
// has been renamed to include the word "master"..
|
||||
bool isMaster = commandLine.containsIgnoreCase ("master")
|
||||
|| File::getSpecialLocation (File::currentApplicationFile)
|
||||
.getFileName().containsIgnoreCase ("master");
|
||||
|
||||
if (isMaster)
|
||||
mainWindows.add (new MainWindow (properties));
|
||||
#endif
|
||||
|
||||
mainWindows.add (new MainWindow (properties, 0));
|
||||
|
||||
Desktop::getInstance().setScreenSaverEnabled (false);
|
||||
}
|
||||
|
||||
void shutdown() override
|
||||
{
|
||||
mainWindows.clear();
|
||||
properties.saveIfNeeded();
|
||||
}
|
||||
|
||||
void systemRequestedQuit() override
|
||||
{
|
||||
quit();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct MainWindow : public DocumentWindow
|
||||
{
|
||||
explicit MainWindow (PropertiesFile& props)
|
||||
: DocumentWindow ("JUCE Networked Graphics Demo - Master", Colours::white, DocumentWindow::allButtons)
|
||||
{
|
||||
setUsingNativeTitleBar (true);
|
||||
setContentOwned (new MasterContentComponent (props), true);
|
||||
setBounds (100, 50, getWidth(), getHeight());
|
||||
setResizable (true, false);
|
||||
setVisible (true);
|
||||
|
||||
glContext.attachTo (*this);
|
||||
}
|
||||
|
||||
MainWindow (PropertiesFile& props, int windowIndex)
|
||||
: DocumentWindow ("JUCE Networked Graphics Demo", Colours::black, DocumentWindow::allButtons)
|
||||
{
|
||||
setUsingNativeTitleBar (true);
|
||||
setContentOwned (new ClientCanvasComponent (props, windowIndex), true);
|
||||
setBounds (500, 100, getWidth(), getHeight());
|
||||
setResizable (true, false);
|
||||
setVisible (true);
|
||||
|
||||
#if ! JUCE_IOS
|
||||
glContext.attachTo (*this);
|
||||
#endif
|
||||
|
||||
#if JUCE_IOS || JUCE_ANDROID
|
||||
setFullScreen (true);
|
||||
#endif
|
||||
}
|
||||
|
||||
~MainWindow() override
|
||||
{
|
||||
glContext.detach();
|
||||
}
|
||||
|
||||
void closeButtonPressed() override
|
||||
{
|
||||
JUCEApplication::getInstance()->systemRequestedQuit();
|
||||
}
|
||||
|
||||
OpenGLContext glContext;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
|
||||
};
|
||||
|
||||
static PropertiesFile::Options getPropertyFileOptions()
|
||||
{
|
||||
PropertiesFile::Options o;
|
||||
o.applicationName = "JUCE Network Graphics Demo";
|
||||
o.filenameSuffix = ".settings";
|
||||
o.folderName = "JUCE Network Graphics Demo";
|
||||
o.osxLibrarySubFolder = "Application Support/JUCE Network Graphics Demo";
|
||||
o.millisecondsBeforeSaving = 2000;
|
||||
return o;
|
||||
}
|
||||
|
||||
PropertiesFile properties;
|
||||
OwnedArray<MainWindow> mainWindows;
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// This macro generates the main() routine that launches the app.
|
||||
START_JUCE_APPLICATION (NetworkGraphicsDemoApplication)
|
||||
|
@ -1,422 +1,422 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2020 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
|
||||
End User License Agreement: www.juce.com/juce-6-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Runs the master node, calls the demo to update the canvas, broadcasts those changes
|
||||
out to slaves, and shows a view of all the clients to allow them to be dragged around.
|
||||
*/
|
||||
struct MasterContentComponent : public Component,
|
||||
private Timer,
|
||||
private OSCSender,
|
||||
private OSCReceiver,
|
||||
private OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>
|
||||
{
|
||||
MasterContentComponent (PropertiesFile& props)
|
||||
: properties (props)
|
||||
{
|
||||
setWantsKeyboardFocus (true);
|
||||
createAllDemos (demos);
|
||||
setContent (0);
|
||||
|
||||
setSize ((int) (15.0f * currentCanvas.getLimits().getWidth()),
|
||||
(int) (15.0f * currentCanvas.getLimits().getHeight()));
|
||||
|
||||
if (! OSCSender::connect (getBroadcastIPAddress(), masterPortNumber))
|
||||
error = "Master app OSC sender: network connection error.";
|
||||
|
||||
if (! OSCReceiver::connect (clientPortNumber))
|
||||
error = "Master app OSC receiver: network connection error.";
|
||||
|
||||
OSCReceiver::addListener (this);
|
||||
|
||||
startTimerHz (30);
|
||||
}
|
||||
|
||||
~MasterContentComponent() override
|
||||
{
|
||||
OSCReceiver::removeListener (this);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct Client
|
||||
{
|
||||
String name, ipAddress;
|
||||
float widthInches, heightInches;
|
||||
Point<float> centre; // in inches
|
||||
float scaleFactor;
|
||||
};
|
||||
|
||||
Array<Client> clients;
|
||||
|
||||
void addClient (String name, String ipAddress, String areaDescription)
|
||||
{
|
||||
auto area = Rectangle<float>::fromString (areaDescription);
|
||||
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
c->ipAddress = ipAddress;
|
||||
c->widthInches = area.getWidth();
|
||||
c->heightInches = area.getHeight();
|
||||
return;
|
||||
}
|
||||
|
||||
DBG (name + " " + ipAddress);
|
||||
|
||||
removeClient (name);
|
||||
clients.add ({ name, ipAddress, area.getWidth(), area.getHeight(), {}, 1.0f });
|
||||
|
||||
String lastX = properties.getValue ("lastX_" + name);
|
||||
String lastY = properties.getValue ("lastY_" + name);
|
||||
String lastScale = properties.getValue ("scale_" + name);
|
||||
|
||||
if (lastX.isEmpty() || lastY.isEmpty())
|
||||
setClientCentre (name, { Random().nextFloat() * 10.0f,
|
||||
Random().nextFloat() * 10.0f });
|
||||
else
|
||||
setClientCentre (name, Point<float> (lastX.getFloatValue(),
|
||||
lastY.getFloatValue()));
|
||||
|
||||
if (lastScale.isNotEmpty())
|
||||
setClientScale (name, lastScale.getFloatValue());
|
||||
else
|
||||
setClientScale (name, 1.0f);
|
||||
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void removeClient (String name)
|
||||
{
|
||||
for (int i = clients.size(); --i >= 0;)
|
||||
if (clients.getReference (0).name == name)
|
||||
clients.remove (i);
|
||||
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void setClientCentre (const String& name, Point<float> newCentre)
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
newCentre = currentCanvas.getLimits().getConstrainedPoint (newCentre);
|
||||
c->centre = newCentre;
|
||||
|
||||
properties.setValue ("lastX_" + name, String (newCentre.x));
|
||||
properties.setValue ("lastY_" + name, String (newCentre.y));
|
||||
|
||||
startTimer (1);
|
||||
}
|
||||
}
|
||||
|
||||
float getClientScale (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return c->scaleFactor;
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void setClientScale (const String& name, float newScale)
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
c->scaleFactor = jlimit (0.5f, 2.0f, newScale);
|
||||
properties.setValue ("scale_" + name, String (newScale));
|
||||
}
|
||||
}
|
||||
|
||||
Point<float> getClientCentre (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return c->centre;
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getClientArea (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return Rectangle<float> (c->widthInches, c->heightInches)
|
||||
.withCentre (c->centre);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getActiveCanvasArea() const
|
||||
{
|
||||
Rectangle<float> r;
|
||||
|
||||
if (clients.size() > 0)
|
||||
r = Rectangle<float> (1.0f, 1.0f).withCentre (clients.getReference (0).centre);
|
||||
|
||||
for (int i = 1; i < clients.size(); ++i)
|
||||
r = r.getUnion (Rectangle<float> (1.0f, 1.0f).withCentre (clients.getReference (i).centre));
|
||||
|
||||
return r.expanded (6.0f);
|
||||
}
|
||||
|
||||
int getContentIndex() const
|
||||
{
|
||||
return demos.indexOf (content);
|
||||
}
|
||||
|
||||
void setContent (int demoIndex)
|
||||
{
|
||||
content = demos[demoIndex];
|
||||
|
||||
if (content != nullptr)
|
||||
content->reset();
|
||||
}
|
||||
|
||||
bool keyPressed (const KeyPress& key) override
|
||||
{
|
||||
if (key == KeyPress::spaceKey || key == KeyPress::rightKey || key == KeyPress::downKey)
|
||||
{
|
||||
setContent ((getContentIndex() + 1) % demos.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (key == KeyPress::upKey || key == KeyPress::leftKey)
|
||||
{
|
||||
setContent ((getContentIndex() + demos.size() - 1) % demos.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
return Component::keyPressed (key);
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (Colours::black);
|
||||
|
||||
currentCanvas.draw (g, getLocalBounds().toFloat(), currentCanvas.getLimits());
|
||||
|
||||
if (error.isNotEmpty())
|
||||
{
|
||||
g.setColour (Colours::red);
|
||||
g.setFont (20.0f);
|
||||
g.drawText (error, getLocalBounds().reduced (10).removeFromBottom (80),
|
||||
Justification::centredRight, true);
|
||||
}
|
||||
|
||||
if (content != nullptr)
|
||||
{
|
||||
g.setColour (Colours::white);
|
||||
g.setFont (17.0f);
|
||||
g.drawText ("Demo: " + content->getName(),
|
||||
getLocalBounds().reduced (10).removeFromTop (30),
|
||||
Justification::centredLeft, true);
|
||||
}
|
||||
}
|
||||
|
||||
void resized() override
|
||||
{
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void updateDeviceComponents()
|
||||
{
|
||||
for (int i = devices.size(); --i >= 0;)
|
||||
if (getClient (devices.getUnchecked(i)->getName()) == nullptr)
|
||||
devices.remove (i);
|
||||
|
||||
for (const auto& c : clients)
|
||||
if (getDeviceComponent (c.name) == nullptr)
|
||||
addAndMakeVisible (devices.add (new DeviceComponent (*this, c.name)));
|
||||
|
||||
for (auto d : devices)
|
||||
d->setBounds (virtualSpaceToLocal (getClientArea (d->getName())).getSmallestIntegerContainer());
|
||||
}
|
||||
|
||||
Point<float> virtualSpaceToLocal (Point<float> p) const
|
||||
{
|
||||
auto total = currentCanvas.getLimits();
|
||||
|
||||
return { (float) getWidth() * (p.x - total.getX()) / total.getWidth(),
|
||||
(float) getHeight() * (p.y - total.getY()) / total.getHeight() };
|
||||
}
|
||||
|
||||
Rectangle<float> virtualSpaceToLocal (Rectangle<float> p) const
|
||||
{
|
||||
return { virtualSpaceToLocal (p.getTopLeft()),
|
||||
virtualSpaceToLocal (p.getBottomRight()) };
|
||||
}
|
||||
|
||||
Point<float> localSpaceToVirtual (Point<float> p) const
|
||||
{
|
||||
auto total = currentCanvas.getLimits();
|
||||
|
||||
return { total.getX() + total.getWidth() * (p.x / (float) getWidth()),
|
||||
total.getY() + total.getHeight() * (p.y / (float) getHeight()) };
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct DeviceComponent : public Component
|
||||
{
|
||||
DeviceComponent (MasterContentComponent& e, String name)
|
||||
: Component (name), editor (e)
|
||||
{
|
||||
setMouseCursor (MouseCursor::DraggingHandCursor);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (Colours::blue.withAlpha (0.4f));
|
||||
|
||||
g.setColour (Colours::white);
|
||||
g.setFont (11.0f);
|
||||
g.drawFittedText (getName(), getLocalBounds(), Justification::centred, 2);
|
||||
}
|
||||
|
||||
void mouseDown (const MouseEvent&) override
|
||||
{
|
||||
dragStartLocation = editor.getClientCentre (getName());
|
||||
}
|
||||
|
||||
void mouseDrag (const MouseEvent& e) override
|
||||
{
|
||||
editor.setClientCentre (getName(), dragStartLocation
|
||||
+ editor.localSpaceToVirtual (e.getPosition().toFloat())
|
||||
- editor.localSpaceToVirtual (e.getMouseDownPosition().toFloat()));
|
||||
}
|
||||
|
||||
void mouseWheelMove (const MouseEvent&, const MouseWheelDetails& e) override
|
||||
{
|
||||
editor.setClientScale (getName(), editor.getClientScale (getName()) + 0.1f * e.deltaY);
|
||||
}
|
||||
|
||||
void mouseDoubleClick (const MouseEvent&) override
|
||||
{
|
||||
editor.setClientScale (getName(), 1.0f);
|
||||
}
|
||||
|
||||
MasterContentComponent& editor;
|
||||
Point<float> dragStartLocation;
|
||||
Rectangle<float> clientArea;
|
||||
};
|
||||
|
||||
DeviceComponent* getDeviceComponent (const String& name) const
|
||||
{
|
||||
for (auto d : devices)
|
||||
if (d->getName() == name)
|
||||
return d;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void broadcastNewCanvasState (const MemoryBlock& canvasData)
|
||||
{
|
||||
BlockPacketiser packetiser;
|
||||
packetiser.createBlocksFromData (canvasData, 1000);
|
||||
|
||||
for (const auto& client : clients)
|
||||
for (auto& b : packetiser.blocks)
|
||||
sendToIPAddress (client.ipAddress, masterPortNumber, canvasStateOSCAddress, b);
|
||||
}
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
startTimerHz (30);
|
||||
|
||||
currentCanvas.reset();
|
||||
updateCanvasInfo (currentCanvas);
|
||||
|
||||
{
|
||||
std::unique_ptr<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));
|
||||
Graphics g (*context);
|
||||
|
||||
if (content != nullptr)
|
||||
content->generateCanvas (g, currentCanvas, getActiveCanvasArea());
|
||||
}
|
||||
|
||||
broadcastNewCanvasState (currentCanvas.toMemoryBlock());
|
||||
|
||||
updateDeviceComponents();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void updateCanvasInfo (SharedCanvasDescription& canvas)
|
||||
{
|
||||
canvas.backgroundColour = Colours::black;
|
||||
|
||||
for (const auto& c : clients)
|
||||
canvas.clients.add ({ c.name, c.centre, c.scaleFactor });
|
||||
}
|
||||
|
||||
const Client* getClient (const String& name) const
|
||||
{
|
||||
for (auto& c : clients)
|
||||
if (c.name == name)
|
||||
return &c;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Client* getClient (const String& name)
|
||||
{
|
||||
return const_cast<Client*> (static_cast<const MasterContentComponent&> (*this).getClient (name));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void oscMessageReceived (const OSCMessage& message) override
|
||||
{
|
||||
auto address = message.getAddressPattern();
|
||||
|
||||
if (address.matches (newClientOSCAddress)) newClientOSCMessageReceived (message);
|
||||
else if (address.matches (userInputOSCAddress)) userInputOSCMessageReceived (message);
|
||||
}
|
||||
|
||||
void newClientOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.isEmpty() || ! message[0].isString())
|
||||
return;
|
||||
|
||||
StringArray tokens = StringArray::fromTokens (message[0].getString(), ":", "");
|
||||
addClient (tokens[0], tokens[1], tokens[2]);
|
||||
}
|
||||
|
||||
void userInputOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.size() == 3 && message[0].isString() && message[1].isFloat32() && message[2].isFloat32())
|
||||
{
|
||||
content->handleTouch ({ message[1].getFloat32(),
|
||||
message[2].getFloat32() });
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
AnimatedContent* content = nullptr;
|
||||
PropertiesFile& properties;
|
||||
OwnedArray<DeviceComponent> devices;
|
||||
SharedCanvasDescription currentCanvas;
|
||||
String error;
|
||||
|
||||
OwnedArray<AnimatedContent> demos;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MasterContentComponent)
|
||||
};
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Runs the master node, calls the demo to update the canvas, broadcasts those changes
|
||||
out to slaves, and shows a view of all the clients to allow them to be dragged around.
|
||||
*/
|
||||
struct MasterContentComponent : public Component,
|
||||
private Timer,
|
||||
private OSCSender,
|
||||
private OSCReceiver,
|
||||
private OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>
|
||||
{
|
||||
MasterContentComponent (PropertiesFile& props)
|
||||
: properties (props)
|
||||
{
|
||||
setWantsKeyboardFocus (true);
|
||||
createAllDemos (demos);
|
||||
setContent (0);
|
||||
|
||||
setSize ((int) (15.0f * currentCanvas.getLimits().getWidth()),
|
||||
(int) (15.0f * currentCanvas.getLimits().getHeight()));
|
||||
|
||||
if (! OSCSender::connect (getBroadcastIPAddress(), masterPortNumber))
|
||||
error = "Master app OSC sender: network connection error.";
|
||||
|
||||
if (! OSCReceiver::connect (clientPortNumber))
|
||||
error = "Master app OSC receiver: network connection error.";
|
||||
|
||||
OSCReceiver::addListener (this);
|
||||
|
||||
startTimerHz (30);
|
||||
}
|
||||
|
||||
~MasterContentComponent() override
|
||||
{
|
||||
OSCReceiver::removeListener (this);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct Client
|
||||
{
|
||||
String name, ipAddress;
|
||||
float widthInches, heightInches;
|
||||
Point<float> centre; // in inches
|
||||
float scaleFactor;
|
||||
};
|
||||
|
||||
Array<Client> clients;
|
||||
|
||||
void addClient (String name, String ipAddress, String areaDescription)
|
||||
{
|
||||
auto area = Rectangle<float>::fromString (areaDescription);
|
||||
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
c->ipAddress = ipAddress;
|
||||
c->widthInches = area.getWidth();
|
||||
c->heightInches = area.getHeight();
|
||||
return;
|
||||
}
|
||||
|
||||
DBG (name + " " + ipAddress);
|
||||
|
||||
removeClient (name);
|
||||
clients.add ({ name, ipAddress, area.getWidth(), area.getHeight(), {}, 1.0f });
|
||||
|
||||
String lastX = properties.getValue ("lastX_" + name);
|
||||
String lastY = properties.getValue ("lastY_" + name);
|
||||
String lastScale = properties.getValue ("scale_" + name);
|
||||
|
||||
if (lastX.isEmpty() || lastY.isEmpty())
|
||||
setClientCentre (name, { Random().nextFloat() * 10.0f,
|
||||
Random().nextFloat() * 10.0f });
|
||||
else
|
||||
setClientCentre (name, Point<float> (lastX.getFloatValue(),
|
||||
lastY.getFloatValue()));
|
||||
|
||||
if (lastScale.isNotEmpty())
|
||||
setClientScale (name, lastScale.getFloatValue());
|
||||
else
|
||||
setClientScale (name, 1.0f);
|
||||
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void removeClient (String name)
|
||||
{
|
||||
for (int i = clients.size(); --i >= 0;)
|
||||
if (clients.getReference (0).name == name)
|
||||
clients.remove (i);
|
||||
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void setClientCentre (const String& name, Point<float> newCentre)
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
newCentre = currentCanvas.getLimits().getConstrainedPoint (newCentre);
|
||||
c->centre = newCentre;
|
||||
|
||||
properties.setValue ("lastX_" + name, String (newCentre.x));
|
||||
properties.setValue ("lastY_" + name, String (newCentre.y));
|
||||
|
||||
startTimer (1);
|
||||
}
|
||||
}
|
||||
|
||||
float getClientScale (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return c->scaleFactor;
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void setClientScale (const String& name, float newScale)
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
{
|
||||
c->scaleFactor = jlimit (0.5f, 2.0f, newScale);
|
||||
properties.setValue ("scale_" + name, String (newScale));
|
||||
}
|
||||
}
|
||||
|
||||
Point<float> getClientCentre (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return c->centre;
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getClientArea (const String& name) const
|
||||
{
|
||||
if (auto c = getClient (name))
|
||||
return Rectangle<float> (c->widthInches, c->heightInches)
|
||||
.withCentre (c->centre);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Rectangle<float> getActiveCanvasArea() const
|
||||
{
|
||||
Rectangle<float> r;
|
||||
|
||||
if (clients.size() > 0)
|
||||
r = Rectangle<float> (1.0f, 1.0f).withCentre (clients.getReference (0).centre);
|
||||
|
||||
for (int i = 1; i < clients.size(); ++i)
|
||||
r = r.getUnion (Rectangle<float> (1.0f, 1.0f).withCentre (clients.getReference (i).centre));
|
||||
|
||||
return r.expanded (6.0f);
|
||||
}
|
||||
|
||||
int getContentIndex() const
|
||||
{
|
||||
return demos.indexOf (content);
|
||||
}
|
||||
|
||||
void setContent (int demoIndex)
|
||||
{
|
||||
content = demos[demoIndex];
|
||||
|
||||
if (content != nullptr)
|
||||
content->reset();
|
||||
}
|
||||
|
||||
bool keyPressed (const KeyPress& key) override
|
||||
{
|
||||
if (key == KeyPress::spaceKey || key == KeyPress::rightKey || key == KeyPress::downKey)
|
||||
{
|
||||
setContent ((getContentIndex() + 1) % demos.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (key == KeyPress::upKey || key == KeyPress::leftKey)
|
||||
{
|
||||
setContent ((getContentIndex() + demos.size() - 1) % demos.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
return Component::keyPressed (key);
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (Colours::black);
|
||||
|
||||
currentCanvas.draw (g, getLocalBounds().toFloat(), currentCanvas.getLimits());
|
||||
|
||||
if (error.isNotEmpty())
|
||||
{
|
||||
g.setColour (Colours::red);
|
||||
g.setFont (20.0f);
|
||||
g.drawText (error, getLocalBounds().reduced (10).removeFromBottom (80),
|
||||
Justification::centredRight, true);
|
||||
}
|
||||
|
||||
if (content != nullptr)
|
||||
{
|
||||
g.setColour (Colours::white);
|
||||
g.setFont (17.0f);
|
||||
g.drawText ("Demo: " + content->getName(),
|
||||
getLocalBounds().reduced (10).removeFromTop (30),
|
||||
Justification::centredLeft, true);
|
||||
}
|
||||
}
|
||||
|
||||
void resized() override
|
||||
{
|
||||
updateDeviceComponents();
|
||||
}
|
||||
|
||||
void updateDeviceComponents()
|
||||
{
|
||||
for (int i = devices.size(); --i >= 0;)
|
||||
if (getClient (devices.getUnchecked(i)->getName()) == nullptr)
|
||||
devices.remove (i);
|
||||
|
||||
for (const auto& c : clients)
|
||||
if (getDeviceComponent (c.name) == nullptr)
|
||||
addAndMakeVisible (devices.add (new DeviceComponent (*this, c.name)));
|
||||
|
||||
for (auto d : devices)
|
||||
d->setBounds (virtualSpaceToLocal (getClientArea (d->getName())).getSmallestIntegerContainer());
|
||||
}
|
||||
|
||||
Point<float> virtualSpaceToLocal (Point<float> p) const
|
||||
{
|
||||
auto total = currentCanvas.getLimits();
|
||||
|
||||
return { (float) getWidth() * (p.x - total.getX()) / total.getWidth(),
|
||||
(float) getHeight() * (p.y - total.getY()) / total.getHeight() };
|
||||
}
|
||||
|
||||
Rectangle<float> virtualSpaceToLocal (Rectangle<float> p) const
|
||||
{
|
||||
return { virtualSpaceToLocal (p.getTopLeft()),
|
||||
virtualSpaceToLocal (p.getBottomRight()) };
|
||||
}
|
||||
|
||||
Point<float> localSpaceToVirtual (Point<float> p) const
|
||||
{
|
||||
auto total = currentCanvas.getLimits();
|
||||
|
||||
return { total.getX() + total.getWidth() * (p.x / (float) getWidth()),
|
||||
total.getY() + total.getHeight() * (p.y / (float) getHeight()) };
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct DeviceComponent : public Component
|
||||
{
|
||||
DeviceComponent (MasterContentComponent& e, String name)
|
||||
: Component (name), editor (e)
|
||||
{
|
||||
setMouseCursor (MouseCursor::DraggingHandCursor);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (Colours::blue.withAlpha (0.4f));
|
||||
|
||||
g.setColour (Colours::white);
|
||||
g.setFont (11.0f);
|
||||
g.drawFittedText (getName(), getLocalBounds(), Justification::centred, 2);
|
||||
}
|
||||
|
||||
void mouseDown (const MouseEvent&) override
|
||||
{
|
||||
dragStartLocation = editor.getClientCentre (getName());
|
||||
}
|
||||
|
||||
void mouseDrag (const MouseEvent& e) override
|
||||
{
|
||||
editor.setClientCentre (getName(), dragStartLocation
|
||||
+ editor.localSpaceToVirtual (e.getPosition().toFloat())
|
||||
- editor.localSpaceToVirtual (e.getMouseDownPosition().toFloat()));
|
||||
}
|
||||
|
||||
void mouseWheelMove (const MouseEvent&, const MouseWheelDetails& e) override
|
||||
{
|
||||
editor.setClientScale (getName(), editor.getClientScale (getName()) + 0.1f * e.deltaY);
|
||||
}
|
||||
|
||||
void mouseDoubleClick (const MouseEvent&) override
|
||||
{
|
||||
editor.setClientScale (getName(), 1.0f);
|
||||
}
|
||||
|
||||
MasterContentComponent& editor;
|
||||
Point<float> dragStartLocation;
|
||||
Rectangle<float> clientArea;
|
||||
};
|
||||
|
||||
DeviceComponent* getDeviceComponent (const String& name) const
|
||||
{
|
||||
for (auto d : devices)
|
||||
if (d->getName() == name)
|
||||
return d;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void broadcastNewCanvasState (const MemoryBlock& canvasData)
|
||||
{
|
||||
BlockPacketiser packetiser;
|
||||
packetiser.createBlocksFromData (canvasData, 1000);
|
||||
|
||||
for (const auto& client : clients)
|
||||
for (auto& b : packetiser.blocks)
|
||||
sendToIPAddress (client.ipAddress, masterPortNumber, canvasStateOSCAddress, b);
|
||||
}
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
startTimerHz (30);
|
||||
|
||||
currentCanvas.reset();
|
||||
updateCanvasInfo (currentCanvas);
|
||||
|
||||
{
|
||||
std::unique_ptr<CanvasGeneratingContext> context (new CanvasGeneratingContext (currentCanvas));
|
||||
Graphics g (*context);
|
||||
|
||||
if (content != nullptr)
|
||||
content->generateCanvas (g, currentCanvas, getActiveCanvasArea());
|
||||
}
|
||||
|
||||
broadcastNewCanvasState (currentCanvas.toMemoryBlock());
|
||||
|
||||
updateDeviceComponents();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void updateCanvasInfo (SharedCanvasDescription& canvas)
|
||||
{
|
||||
canvas.backgroundColour = Colours::black;
|
||||
|
||||
for (const auto& c : clients)
|
||||
canvas.clients.add ({ c.name, c.centre, c.scaleFactor });
|
||||
}
|
||||
|
||||
const Client* getClient (const String& name) const
|
||||
{
|
||||
for (auto& c : clients)
|
||||
if (c.name == name)
|
||||
return &c;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Client* getClient (const String& name)
|
||||
{
|
||||
return const_cast<Client*> (static_cast<const MasterContentComponent&> (*this).getClient (name));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void oscMessageReceived (const OSCMessage& message) override
|
||||
{
|
||||
auto address = message.getAddressPattern();
|
||||
|
||||
if (address.matches (newClientOSCAddress)) newClientOSCMessageReceived (message);
|
||||
else if (address.matches (userInputOSCAddress)) userInputOSCMessageReceived (message);
|
||||
}
|
||||
|
||||
void newClientOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.isEmpty() || ! message[0].isString())
|
||||
return;
|
||||
|
||||
StringArray tokens = StringArray::fromTokens (message[0].getString(), ":", "");
|
||||
addClient (tokens[0], tokens[1], tokens[2]);
|
||||
}
|
||||
|
||||
void userInputOSCMessageReceived (const OSCMessage& message)
|
||||
{
|
||||
if (message.size() == 3 && message[0].isString() && message[1].isFloat32() && message[2].isFloat32())
|
||||
{
|
||||
content->handleTouch ({ message[1].getFloat32(),
|
||||
message[2].getFloat32() });
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
AnimatedContent* content = nullptr;
|
||||
PropertiesFile& properties;
|
||||
OwnedArray<DeviceComponent> devices;
|
||||
SharedCanvasDescription currentCanvas;
|
||||
String error;
|
||||
|
||||
OwnedArray<AnimatedContent> demos;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MasterContentComponent)
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user