Browse Source

New example project: audio performance test app

tags/2021-05-28
jules 9 years ago
parent
commit
e67b67f513
35 changed files with 10051 additions and 0 deletions
  1. +139
    -0
      extras/AudioPerformanceTest/AudioPerformanceTest.jucer
  2. +142
    -0
      extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile
  3. +2093
    -0
      extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj
  4. +27
    -0
      extras/AudioPerformanceTest/Builds/MacOSX/Info.plist
  5. BIN
      extras/AudioPerformanceTest/Builds/MacOSX/RecentFilesMenuTemplate.nib
  6. +19
    -0
      extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln
  7. +1719
    -0
      extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj
  8. +2888
    -0
      extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters
  9. +29
    -0
      extras/AudioPerformanceTest/Builds/VisualStudio2015/resources.rc
  10. +2103
    -0
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj
  11. +128
    -0
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/AppIcon.appiconset/Contents.json
  12. +57
    -0
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/Contents.json
  13. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-landscape-1x.png
  14. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-landscape-2x.png
  15. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-portrait-1x.png
  16. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-portrait-2x.png
  17. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-iphone-2x.png
  18. BIN
      extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-iphone-retina4.png
  19. +38
    -0
      extras/AudioPerformanceTest/Builds/iOS/Info.plist
  20. +188
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h
  21. +44
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/JuceHeader.h
  22. +12
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/ReadMe.txt
  23. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_basics/juce_audio_basics.h
  24. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_devices/juce_audio_devices.h
  25. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_formats/juce_audio_formats.h
  26. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h
  27. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h
  28. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_core/juce_core.h
  29. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_data_structures/juce_data_structures.h
  30. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_events/juce_events.h
  31. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_graphics/juce_graphics.h
  32. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h
  33. +4
    -0
      extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.h
  34. +97
    -0
      extras/AudioPerformanceTest/Source/Main.cpp
  35. +284
    -0
      extras/AudioPerformanceTest/Source/MainComponent.h

+ 139
- 0
extras/AudioPerformanceTest/AudioPerformanceTest.jucer View File

@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="AKfc5m" name="AudioPerformanceTest" projectType="guiapp"
version="1.0.0" bundleIdentifier="com.juce.AudioPerformanceTest"
includeBinaryInAppConfig="1" jucerVersion="4.1.0">
<MAINGROUP id="b1eVTe" name="AudioPerformanceTest">
<GROUP id="{AB66118C-9D88-1C3A-D95C-42892D828E4B}" name="Source">
<FILE id="SqGU9p" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/>
<FILE id="A0IkQJ" name="MainComponent.h" compile="0" resource="0" file="Source/MainComponent.h"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" extraCompilerFlags="">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
isDebug="1" optimisation="1" targetName="AudioPerformanceTest"/>
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="default"
isDebug="0" optimisation="3" targetName="AudioPerformanceTest"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</XCODE_MAC>
<XCODE_IPHONE targetFolder="Builds/iOS" extraCompilerFlags="">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" iosCompatibility="default" isDebug="1" optimisation="1"
targetName="AudioPerformanceTest"/>
<CONFIGURATION name="Release" iosCompatibility="default" isDebug="0" optimisation="3"
targetName="AudioPerformanceTest"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</XCODE_IPHONE>
<VS2015 targetFolder="Builds/VisualStudio2015" extraCompilerFlags="">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="AudioPerformanceTest"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="AudioPerformanceTest"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</VS2015>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" extraCompilerFlags="">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"
targetName="AudioPerformanceTest"/>
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3"
targetName="AudioPerformanceTest"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<ANDROIDSTUDIO androidVersionCode="1" androidActivityClass="com.juce.audioperformancetest.AudioPerformanceTest"
androidMinimumSDK="23" androidInternetNeeded="1" androidBluetoothNeeded="1"
androidKeyStore="${user.home}/.android/debug.keystore" androidKeyStorePass="android"
androidKeyAlias="androiddebugkey" androidKeyAliasPass="android"
androidCpp11="1" androidScreenOrientation="unspecified" targetFolder="Builds/AndroidStudio"
androidSDKPath="" androidNDKPath="" extraCompilerFlags="-mfpu=neon -mfloat-abi=hard -ffast-math -funroll-loops --param max-unroll-times=8 -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -DJUCE_DISABLE_ASSERTIONS=1"
extraDefs="" extraLinkerFlags="" externalLibraries="">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" androidArchitectures="arm64-v8a" isDebug="1" optimisation="1"
targetName="AudioPerformanceTest"/>
<CONFIGURATION name="Release" androidArchitectures="arm64-v8a" isDebug="0" optimisation="6"
targetName="AudioPerformanceTest"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../modules"/>
<MODULEPATH id="juce_events" path="../../modules"/>
<MODULEPATH id="juce_graphics" path="../../modules"/>
<MODULEPATH id="juce_data_structures" path="../../modules"/>
<MODULEPATH id="juce_gui_basics" path="../../modules"/>
<MODULEPATH id="juce_gui_extra" path="../../modules"/>
<MODULEPATH id="juce_audio_basics" path="../../modules"/>
<MODULEPATH id="juce_audio_devices" path="../../modules"/>
<MODULEPATH id="juce_audio_formats" path="../../modules"/>
<MODULEPATH id="juce_audio_processors" path="../../modules"/>
<MODULEPATH id="juce_audio_utils" path="../../modules"/>
</MODULEPATHS>
</ANDROIDSTUDIO>
</EXPORTFORMATS>
<MODULES>
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0"/>
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0"/>
</MODULES>
<JUCEOPTIONS/>
</JUCERPROJECT>

+ 142
- 0
extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile View File

@@ -0,0 +1,142 @@
# Automatically generated makefile, created by the Introjucer
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
# (this disables dependency generation if multiple architectures are set)
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
ifndef CONFIG
CONFIG=Debug
endif
ifeq ($(CONFIG),Debug)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Debug
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0
CXXFLAGS += $(CFLAGS) -std=c++11
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
TARGET := AudioPerformanceTest
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
ifeq ($(CONFIG),Release)
BINDIR := build
LIBDIR := build
OBJDIR := build/intermediate/Release
OUTDIR := build
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3
CXXFLAGS += $(CFLAGS) -std=c++11
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
TARGET := AudioPerformanceTest
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
endif
OBJECTS := \
$(OBJDIR)/Main_90ebc5c2.o \
$(OBJDIR)/juce_audio_basics_399a455e.o \
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o \
$(OBJDIR)/juce_audio_formats_f04b043c.o \
$(OBJDIR)/juce_audio_processors_eb9ae116.o \
$(OBJDIR)/juce_audio_utils_cf18005c.o \
$(OBJDIR)/juce_core_1ee54a40.o \
$(OBJDIR)/juce_data_structures_84790dfc.o \
$(OBJDIR)/juce_events_584896b4.o \
$(OBJDIR)/juce_graphics_f9afc18.o \
$(OBJDIR)/juce_gui_basics_90929794.o \
$(OBJDIR)/juce_gui_extra_b81d9e1c.o \
.PHONY: clean
$(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
@echo Linking AudioPerformanceTest
-@mkdir -p $(BINDIR)
-@mkdir -p $(LIBDIR)
-@mkdir -p $(OUTDIR)
@$(BLDCMD)
clean:
@echo Cleaning AudioPerformanceTest
@$(CLEANCMD)
strip:
@echo Stripping AudioPerformanceTest
-@strip --strip-unneeded $(OUTDIR)/$(TARGET)
$(OBJDIR)/Main_90ebc5c2.o: ../../Source/Main.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling Main.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_basics_399a455e.o: ../../../../modules/juce_audio_basics/juce_audio_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_devices_c1c9ba9c.o: ../../../../modules/juce_audio_devices/juce_audio_devices.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_devices.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_formats_f04b043c.o: ../../../../modules/juce_audio_formats/juce_audio_formats.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_formats.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_processors_eb9ae116.o: ../../../../modules/juce_audio_processors/juce_audio_processors.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_processors.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_audio_utils_cf18005c.o: ../../../../modules/juce_audio_utils/juce_audio_utils.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_audio_utils.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_core_1ee54a40.o: ../../../../modules/juce_core/juce_core.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_core.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_data_structures_84790dfc.o: ../../../../modules/juce_data_structures/juce_data_structures.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_data_structures.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_events_584896b4.o: ../../../../modules/juce_events/juce_events.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_events.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_graphics_f9afc18.o: ../../../../modules/juce_graphics/juce_graphics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_graphics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_basics_90929794.o: ../../../../modules/juce_gui_basics/juce_gui_basics.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_basics.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_gui_extra_b81d9e1c.o: ../../../../modules/juce_gui_extra/juce_gui_extra.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_gui_extra.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
-include $(OBJECTS:%.o=%.d)

+ 2093
- 0
extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 27
- 0
extras/AudioPerformanceTest/Builds/MacOSX/Info.plist View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>AudioPerformanceTest</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

BIN
extras/AudioPerformanceTest/Builds/MacOSX/RecentFilesMenuTemplate.nib View File


+ 19
- 0
extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.sln View File

@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2015
Project("{8F15A9F5-4FD4-7BCA-941E-83FD72FB9668}") = "AudioPerformanceTest", "AudioPerformanceTest.vcxproj", "{DD9D09AA-8915-4497-3B88-5D337FA5B703}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DD9D09AA-8915-4497-3B88-5D337FA5B703}.Debug|Win32.ActiveCfg = Debug|Win32
{DD9D09AA-8915-4497-3B88-5D337FA5B703}.Debug|Win32.Build.0 = Debug|Win32
{DD9D09AA-8915-4497-3B88-5D337FA5B703}.Release|Win32.ActiveCfg = Release|Win32
{DD9D09AA-8915-4497-3B88-5D337FA5B703}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

+ 1719
- 0
extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj
File diff suppressed because it is too large
View File


+ 2888
- 0
extras/AudioPerformanceTest/Builds/VisualStudio2015/AudioPerformanceTest.vcxproj.filters
File diff suppressed because it is too large
View File


+ 29
- 0
extras/AudioPerformanceTest/Builds/VisualStudio2015/resources.rc View File

@@ -0,0 +1,29 @@
#ifdef JUCE_USER_DEFINED_RC_FILE
#include JUCE_USER_DEFINED_RC_FILE
#else
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "AudioPerformanceTest\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "AudioPerformanceTest\0"
VALUE "ProductVersion", "1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif

+ 2103
- 0
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 128
- 0
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/AppIcon.appiconset/Contents.json View File

@@ -0,0 +1,128 @@
{
"images": [
{
"idiom": "iphone",
"size": "29x29",
"filename": "Icon-29.png",
"scale": "1x"
},
{
"idiom": "iphone",
"size": "29x29",
"filename": "Icon-29@2x.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "29x29",
"filename": "Icon-29@3x.png",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "40x40",
"filename": "Icon-Spotlight-40@2x.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "40x40",
"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",
"filename": "Icon-60@2x.png",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "60x60",
"filename": "Icon-@3x.png",
"scale": "3x"
},
{
"idiom": "ipad",
"size": "29x29",
"filename": "Icon-Small-1.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "29x29",
"filename": "Icon-Small@2x-1.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "40x40",
"filename": "Icon-Spotlight-40.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "40x40",
"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",
"filename": "Icon-76.png",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "76x76",
"filename": "Icon-76@2x.png",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "83.5x83.5",
"filename": "Icon-83.5@2x.png",
"scale": "2x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

+ 57
- 0
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/Contents.json View File

@@ -0,0 +1,57 @@
{
"images": [
{
"orientation": "portrait",
"idiom": "iphone",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"filename": "LaunchImage-iphone-2x.png"
},
{
"orientation": "portrait",
"idiom": "iphone",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"filename": "LaunchImage-iphone-retina4.png",
"subtype": "retina4"
},
{
"orientation": "portrait",
"idiom": "ipad",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"filename": "LaunchImage-ipad-portrait-1x.png"
},
{
"orientation": "landscape",
"idiom": "ipad",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "1x",
"filename": "LaunchImage-ipad-landscape-1x.png"
},
{
"orientation": "portrait",
"idiom": "ipad",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"filename": "LaunchImage-ipad-portrait-2x.png"
},
{
"orientation": "landscape",
"idiom": "ipad",
"extent": "full-screen",
"minimum-system-version": "7.0",
"scale": "2x",
"filename": "LaunchImage-ipad-landscape-2x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-landscape-1x.png View File

Before After
Width: 1024  |  Height: 768  |  Size: 4.8KB

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-landscape-2x.png View File

Before After
Width: 2048  |  Height: 1536  |  Size: 16KB

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-portrait-1x.png View File

Before After
Width: 768  |  Height: 1024  |  Size: 5.2KB

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-ipad-portrait-2x.png View File

Before After
Width: 1536  |  Height: 2048  |  Size: 17KB

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-iphone-2x.png View File

Before After
Width: 640  |  Height: 960  |  Size: 4.4KB

BIN
extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest/Images.xcassets/LaunchImage.launchimage/LaunchImage-iphone-retina4.png View File

Before After
Width: 640  |  Height: 1136  |  Size: 5.2KB

+ 38
- 0
extras/AudioPerformanceTest/Builds/iOS/Info.plist View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>AudioPerformanceTest</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
<true/>
<key>UIRequiresFullScreen</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

+ 188
- 0
extras/AudioPerformanceTest/JuceLibraryCode/AppConfig.h View File

@@ -0,0 +1,188 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
There's a section below where you can add your own custom code safely, and the
Introjucer will preserve the contents of that block, but the best way to change
any of these definitions is by using the Introjucer's project settings.
Any commented-out settings will assume their default values.
*/
#ifndef __JUCE_APPCONFIG_AKFC5M__
#define __JUCE_APPCONFIG_AKFC5M__
//==============================================================================
// [BEGIN_USER_CODE_SECTION]
// (You can add your own code in this section, and the Introjucer will not overwrite it)
// [END_USER_CODE_SECTION]
//==============================================================================
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 1
#define JUCE_MODULE_AVAILABLE_juce_core 1
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1
#define JUCE_MODULE_AVAILABLE_juce_events 1
#define JUCE_MODULE_AVAILABLE_juce_graphics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
//==============================================================================
#ifndef JUCE_STANDALONE_APPLICATION
#define JUCE_STANDALONE_APPLICATION 1
#endif
//==============================================================================
// juce_audio_devices flags:
#ifndef JUCE_ASIO
//#define JUCE_ASIO
#endif
#ifndef JUCE_WASAPI
//#define JUCE_WASAPI
#endif
#ifndef JUCE_WASAPI_EXCLUSIVE
//#define JUCE_WASAPI_EXCLUSIVE
#endif
#ifndef JUCE_DIRECTSOUND
//#define JUCE_DIRECTSOUND
#endif
#ifndef JUCE_ALSA
//#define JUCE_ALSA
#endif
#ifndef JUCE_JACK
//#define JUCE_JACK
#endif
#ifndef JUCE_USE_ANDROID_OPENSLES
//#define JUCE_USE_ANDROID_OPENSLES
#endif
#ifndef JUCE_USE_CDREADER
//#define JUCE_USE_CDREADER
#endif
#ifndef JUCE_USE_CDBURNER
//#define JUCE_USE_CDBURNER
#endif
//==============================================================================
// juce_audio_formats flags:
#ifndef JUCE_USE_FLAC
//#define JUCE_USE_FLAC
#endif
#ifndef JUCE_USE_OGGVORBIS
//#define JUCE_USE_OGGVORBIS
#endif
#ifndef JUCE_USE_MP3AUDIOFORMAT
//#define JUCE_USE_MP3AUDIOFORMAT
#endif
#ifndef JUCE_USE_LAME_AUDIO_FORMAT
//#define JUCE_USE_LAME_AUDIO_FORMAT
#endif
#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT
//#define JUCE_USE_WINDOWS_MEDIA_FORMAT
#endif
//==============================================================================
// juce_audio_processors flags:
#ifndef JUCE_PLUGINHOST_VST
//#define JUCE_PLUGINHOST_VST
#endif
#ifndef JUCE_PLUGINHOST_VST3
//#define JUCE_PLUGINHOST_VST3
#endif
#ifndef JUCE_PLUGINHOST_AU
//#define JUCE_PLUGINHOST_AU
#endif
//==============================================================================
// juce_core flags:
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG
#endif
#ifndef JUCE_LOG_ASSERTIONS
//#define JUCE_LOG_ASSERTIONS
#endif
#ifndef JUCE_CHECK_MEMORY_LEAKS
//#define JUCE_CHECK_MEMORY_LEAKS
#endif
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
//#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#endif
#ifndef JUCE_INCLUDE_ZLIB_CODE
//#define JUCE_INCLUDE_ZLIB_CODE
#endif
#ifndef JUCE_USE_CURL
//#define JUCE_USE_CURL
#endif
//==============================================================================
// juce_graphics flags:
#ifndef JUCE_USE_COREIMAGE_LOADER
//#define JUCE_USE_COREIMAGE_LOADER
#endif
#ifndef JUCE_USE_DIRECTWRITE
//#define JUCE_USE_DIRECTWRITE
#endif
//==============================================================================
// juce_gui_basics flags:
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
//#define JUCE_ENABLE_REPAINT_DEBUGGING
#endif
#ifndef JUCE_USE_XSHM
//#define JUCE_USE_XSHM
#endif
#ifndef JUCE_USE_XRENDER
//#define JUCE_USE_XRENDER
#endif
#ifndef JUCE_USE_XCURSOR
//#define JUCE_USE_XCURSOR
#endif
//==============================================================================
// juce_gui_extra flags:
#ifndef JUCE_WEB_BROWSER
//#define JUCE_WEB_BROWSER
#endif
#ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR
//#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR
#endif
#endif // __JUCE_APPCONFIG_AKFC5M__

+ 44
- 0
extras/AudioPerformanceTest/JuceLibraryCode/JuceHeader.h View File

@@ -0,0 +1,44 @@
/*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
This is the header file that your files should include in order to get all the
JUCE library headers. You should avoid including the JUCE headers directly in
your own source files, because that wouldn't pick up the correct configuration
options for your app.
*/
#ifndef __APPHEADERFILE_AKFC5M__
#define __APPHEADERFILE_AKFC5M__
#include "AppConfig.h"
#include "modules/juce_audio_basics/juce_audio_basics.h"
#include "modules/juce_audio_devices/juce_audio_devices.h"
#include "modules/juce_audio_formats/juce_audio_formats.h"
#include "modules/juce_audio_processors/juce_audio_processors.h"
#include "modules/juce_audio_utils/juce_audio_utils.h"
#include "modules/juce_core/juce_core.h"
#include "modules/juce_data_structures/juce_data_structures.h"
#include "modules/juce_events/juce_events.h"
#include "modules/juce_graphics/juce_graphics.h"
#include "modules/juce_gui_basics/juce_gui_basics.h"
#include "modules/juce_gui_extra/juce_gui_extra.h"
#if ! DONT_SET_USING_JUCE_NAMESPACE
// If your code uses a lot of JUCE classes, then this will obviously save you
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
using namespace juce;
#endif
#if ! JUCE_DONT_DECLARE_PROJECTINFO
namespace ProjectInfo
{
const char* const projectName = "AudioPerformanceTest";
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
}
#endif
#endif // __APPHEADERFILE_AKFC5M__

+ 12
- 0
extras/AudioPerformanceTest/JuceLibraryCode/ReadMe.txt View File

@@ -0,0 +1,12 @@
Important Note!!
================
The purpose of this folder is to contain files that are auto-generated by the Introjucer,
and ALL files in this folder will be mercilessly DELETED and completely re-written whenever
the Introjucer saves your project.
Therefore, it's a bad idea to make any manual changes to the files in here, or to
put any of your own files in here if you don't want to lose them. (Of course you may choose
to add the folder's contents to your version-control system so that you can re-merge your own
modifications after the Introjucer has saved its changes).

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_basics/juce_audio_basics.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_basics/juce_audio_basics.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_devices/juce_audio_devices.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_devices/juce_audio_devices.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_formats/juce_audio_formats.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_formats/juce_audio_formats.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_processors/juce_audio_processors.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_audio_utils/juce_audio_utils.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_audio_utils/juce_audio_utils.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_core/juce_core.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_core/juce_core.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_data_structures/juce_data_structures.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_data_structures/juce_data_structures.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_events/juce_events.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_events/juce_events.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_graphics/juce_graphics.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_graphics/juce_graphics.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_gui_basics/juce_gui_basics.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_gui_basics/juce_gui_basics.h"

+ 4
- 0
extras/AudioPerformanceTest/JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.h View File

@@ -0,0 +1,4 @@
// This is an auto-generated file to redirect any included
// module headers to the correct external folder.
#include "../../../../../modules/juce_gui_extra/juce_gui_extra.h"

+ 97
- 0
extras/AudioPerformanceTest/Source/Main.cpp View File

@@ -0,0 +1,97 @@
/*
==============================================================================
This file is part of the juce_core module of the JUCE library.
Copyright (c) 2016 - ROLI Ltd.
Permission to use, copy, modify, and/or distribute this software for any purpose with
or without fee is hereby granted, provided that the above copyright notice and this
permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
------------------------------------------------------------------------------
NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
All other JUCE modules are covered by a dual GPL/commercial license, so if you are
using any other modules, be sure to check that you also comply with their license.
For more details, visit www.juce.com
==============================================================================
*/
#include "../JuceLibraryCode/JuceHeader.h"
#include "MainComponent.h"
Component* createMainContentComponent();
//==============================================================================
class AudioPerformanceTestApplication : public JUCEApplication
{
public:
//==============================================================================
AudioPerformanceTestApplication() {}
const String getApplicationName() override { return ProjectInfo::projectName; }
const String getApplicationVersion() override { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() override { return true; }
//==============================================================================
void initialise (const String& commandLine) override
{
mainWindow = new MainWindow (getApplicationName());
}
void shutdown() override
{
mainWindow = nullptr; // (deletes our window)
}
//==============================================================================
void systemRequestedQuit() override
{
quit();
}
//==============================================================================
class MainWindow : public DocumentWindow
{
public:
MainWindow (String name) : DocumentWindow (name,
Colours::lightgrey,
DocumentWindow::allButtons)
{
setUsingNativeTitleBar (true);
setContentOwned (createMainContentComponent(), true);
setResizable (false, false);
#if JUCE_IOS || JUCE_ANDROID
setFullScreen (true);
#else
centreWithSize (getWidth(), getHeight());
#endif
setVisible (true);
}
void closeButtonPressed() override
{
JUCEApplication::getInstance()->systemRequestedQuit();
}
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
};
private:
ScopedPointer<MainWindow> mainWindow;
};
//==============================================================================
START_JUCE_APPLICATION (AudioPerformanceTestApplication)

+ 284
- 0
extras/AudioPerformanceTest/Source/MainComponent.h View File

@@ -0,0 +1,284 @@
/*
==============================================================================
This file is part of the juce_core module of the JUCE library.
Copyright (c) 2016 - ROLI Ltd.
Permission to use, copy, modify, and/or distribute this software for any purpose with
or without fee is hereby granted, provided that the above copyright notice and this
permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
------------------------------------------------------------------------------
NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
All other JUCE modules are covered by a dual GPL/commercial license, so if you are
using any other modules, be sure to check that you also comply with their license.
For more details, visit www.juce.com
==============================================================================
*/
#ifndef MAINCOMPONENT_H_INCLUDED
#define MAINCOMPONENT_H_INCLUDED
#include "../JuceLibraryCode/JuceHeader.h"
//==============================================================================
class MainContentComponent : public AudioAppComponent,
private Timer
{
public:
//==========================================================================
MainContentComponent()
{
setSize (400, 400);
setAudioChannels (0, 2);
initGui();
Desktop::getInstance().setScreenSaverEnabled (false);
startTimer (1000);
}
~MainContentComponent()
{
shutdownAudio();
}
//==========================================================================
void prepareToPlay (int bufferSize, double sampleRate) override
{
currentSampleRate = sampleRate;
allocateBuffers (bufferSize);
printHeader();
}
void releaseResources() override
{
a.clear();
b.clear();
c.clear();
currentSampleRate = 0.0;
}
//==========================================================================
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
{
const double startTimeMs = getPreciseTimeMs();
AudioBuffer<float>& outputAudio = *bufferToFill.buffer;
int bufferSize = outputAudio.getNumSamples();
initialiseBuffers (bufferToFill, bufferSize);
for (int ch = 0; ch < outputAudio.getNumChannels(); ++ch)
crunchSomeNumbers (outputAudio.getWritePointer (ch), bufferSize, numLoopIterationsPerCallback);
std::lock_guard<std::mutex> lock (metricMutex);
double endTimeMs = getPreciseTimeMs();
addCallbackMetrics (startTimeMs, endTimeMs);
}
//==========================================================================
void addCallbackMetrics (double startTimeMs, double endTimeMs)
{
double runtimeMs = endTimeMs - startTimeMs;
audioCallbackRuntimeMs.addValue (runtimeMs);
if (runtimeMs > getPhysicalTimeLimitMs())
numCallbacksOverPhysicalTimeLimit++;
if (lastCallbackStartTimeMs > 0.0)
{
double gapMs = startTimeMs - lastCallbackStartTimeMs;
audioCallbackGapMs.addValue (gapMs);
if (gapMs > 1.5 * getPhysicalTimeLimitMs())
numLateCallbacks++;
}
lastCallbackStartTimeMs = startTimeMs;
}
//==========================================================================
void paint (Graphics& g) override
{
g.fillAll (Colours::black);
g.setFont (Font (16.0f));
g.setColour (Colours::white);
g.drawText ("loop iterations / audio callback",
getLocalBounds().withY (loopIterationsSlider.getHeight()), Justification::centred, true);
}
//==========================================================================
void resized() override
{
loopIterationsSlider.setBounds (getLocalBounds().withSizeKeepingCentre (proportionOfWidth (0.9), 50));
}
private:
//==========================================================================
void initGui()
{
loopIterationsSlider.setSliderStyle (Slider::LinearBar);
loopIterationsSlider.setRange (0, 30000, 1000);
loopIterationsSlider.setValue (15000);
loopIterationsSlider.setColour (Slider::thumbColourId, Colours::white);
loopIterationsSlider.setColour (Slider::textBoxTextColourId, Colours::grey);
updateNumLoopIterationsPerCallback();
addAndMakeVisible (loopIterationsSlider);
}
//==========================================================================
void allocateBuffers (int bufferSize)
{
a.resize (bufferSize);
b.resize (bufferSize);
c.resize (bufferSize);
}
//==========================================================================
void initialiseBuffers (const AudioSourceChannelInfo& bufferToFill, int bufferSize)
{
if (bufferSize != a.size())
{
jassertfalse;
Logger::writeToLog ("WARNING: Unexpected buffer size received."
"expected: " + String (a.size()) +
", actual: " + String (bufferSize));
if (bufferSize > a.size())
Logger::writeToLog ("WARNING: Need to allocate larger buffers on audio thread!");
allocateBuffers (bufferSize);
}
bufferToFill.clearActiveBufferRegion();
std::fill (a.begin(), a.end(), 0.09f);
std::fill (b.begin(), b.end(), 0.1f );
std::fill (c.begin(), c.end(), 0.11f);
}
//==========================================================================
void crunchSomeNumbers (float* outBuffer, int bufferSize, int numIterations) noexcept
{
jassert (a.size() == bufferSize && b.size() == bufferSize && c.size() == bufferSize);
for (int i = 0; i < numIterations; ++i)
{
FloatVectorOperations::multiply (c.data(), a.data(), b.data(), bufferSize);
FloatVectorOperations::addWithMultiply (outBuffer, b.data(), c.data(), bufferSize);
}
}
//==========================================================================
void timerCallback() override
{
printAndResetPerformanceMetrics();
}
//==========================================================================
void printHeader() const
{
Logger::writeToLog ("buffer size = " + String (a.size()) + " samples");
Logger::writeToLog ("sample rate = " + String (currentSampleRate) + " Hz");
Logger::writeToLog ("physical time limit / callback = " + String (getPhysicalTimeLimitMs() )+ " ms");
Logger::writeToLog ("");
Logger::writeToLog (" | callback exec time / physLimit | callback time gap / physLimit | callback counters ");
Logger::writeToLog ("numLoops | avg min max stddev | avg min max stddev | called late >limit ");
Logger::writeToLog ("----- | ----- ----- ----- ----- | ----- ----- ----- ----- | --- --- --- ");
}
//==========================================================================
void printAndResetPerformanceMetrics()
{
std::unique_lock<std::mutex> lock (metricMutex);
auto runtimeMetric = audioCallbackRuntimeMs;
auto gapMetric = audioCallbackGapMs;
auto late = numLateCallbacks;
auto overLimit = numCallbacksOverPhysicalTimeLimit;
resetPerformanceMetrics();
updateNumLoopIterationsPerCallback();
lock.unlock();
Logger::writeToLog (String (numLoopIterationsPerCallback).paddedRight (' ', 8) + " | "
+ getPercentFormattedMetricString (runtimeMetric) + " | "
+ getPercentFormattedMetricString (gapMetric) + " | "
+ String (runtimeMetric.getCount()).paddedRight (' ', 8)
+ String (late).paddedRight (' ', 8)
+ String (overLimit).paddedRight (' ', 8) + " | ");
}
//==========================================================================
String getPercentFormattedMetricString (const StatisticsAccumulator<double> metric) const
{
auto physTimeLimit = getPhysicalTimeLimitMs();
return (String (100.0 * metric.getAverage() / physTimeLimit, 1) + "%").paddedRight (' ', 8)
+ (String (100.0 * metric.getMinValue() / physTimeLimit, 1) + "%").paddedRight (' ', 8)
+ (String (100.0 * metric.getMaxValue() / physTimeLimit, 1) + "%").paddedRight (' ', 8)
+ String (metric.getStandardDeviation(), 3).paddedRight (' ', 8);
}
//==========================================================================
void resetPerformanceMetrics()
{
audioCallbackRuntimeMs.reset();
audioCallbackGapMs.reset();
numLateCallbacks = 0;
numCallbacksOverPhysicalTimeLimit = 0;
}
//==========================================================================
void updateNumLoopIterationsPerCallback()
{
numLoopIterationsPerCallback = loopIterationsSlider.getValue();
}
//==========================================================================
static double getPreciseTimeMs() noexcept
{
return 1000.0 * Time::getHighResolutionTicks() / (double) Time::getHighResolutionTicksPerSecond();
}
//==========================================================================
double getPhysicalTimeLimitMs() const noexcept
{
return 1000.0 * a.size() / currentSampleRate;
}
//==========================================================================
std::vector<float> a, b, c; // must always be of size == current bufferSize
double currentSampleRate = 0.0;
StatisticsAccumulator<double> audioCallbackRuntimeMs;
StatisticsAccumulator<double> audioCallbackGapMs;
double lastCallbackStartTimeMs = 0.0;
int numLateCallbacks = 0;
int numCallbacksOverPhysicalTimeLimit = 0;
int numLoopIterationsPerCallback;
Slider loopIterationsSlider;
std::mutex metricMutex;
//==========================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
};
// (This function is called by the app startup code to create our main component)
Component* createMainContentComponent() { return new MainContentComponent(); }
#endif // MAINCOMPONENT_H_INCLUDED

Loading…
Cancel
Save