From 8d59c34d4d5fd4af2ce26ee403bdc7d28e006333 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Mon, 9 Sep 2024 17:01:40 -0700 Subject: [PATCH 01/38] shim for new AudioTests suite --- .../AudioTests/proj/vc2019/AudioTests.sln | 25 ++ .../AudioTests/proj/vc2019/AudioTests.vcxproj | 263 ++++++++++++++++++ .../proj/vc2019/AudioTests.vcxproj.filters | 13 + .../proj/vc2019/PropertySheet.props | 14 + .../AudioTests/proj/vc2019/Resources.rc | 2 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 168 +++++++++++ 6 files changed, 485 insertions(+) create mode 100644 test/_audio/AudioTests/proj/vc2019/AudioTests.sln create mode 100644 test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj create mode 100644 test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters create mode 100644 test/_audio/AudioTests/proj/vc2019/PropertySheet.props create mode 100644 test/_audio/AudioTests/proj/vc2019/Resources.rc create mode 100644 test/_audio/AudioTests/src/AudioTestsApp.cpp diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.sln b/test/_audio/AudioTests/proj/vc2019/AudioTests.sln new file mode 100644 index 0000000000..6f0568af4b --- /dev/null +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.35130.168 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioTests", "AudioTests.vcxproj", "{242B9F1A-CC82-4E3A-A21E-0533ABD26074}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug|x64.ActiveCfg = Debug|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug|x64.Build.0 = Debug|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release|x64.ActiveCfg = Release|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7627A586-622D-475B-9401-D57EE9B29CFE} + EndGlobalSection +EndGlobal diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj new file mode 100644 index 0000000000..9b9b9b13de --- /dev/null +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -0,0 +1,263 @@ + + + + + Debug_Shared + x64 + + + Debug + x64 + + + Release_Shared + x64 + + + Release + x64 + + + + + + + {242B9F1A-CC82-4E3A-A21E-0533ABD26074} + AudioTests + Win32Proj + 10.0 + + + + Application + false + v142 + Unicode + false + + + Application + false + v142 + Unicode + false + + + Application + true + v142 + Unicode + + + Application + true + v142 + Unicode + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + true + true + true + + + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\ + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\intermediate\ + + + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\ + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\intermediate\ + + + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\ + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\intermediate\ + + + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\ + $(ProjectDir)build\$(Platform)\$(Configuration)\$(PlatformToolset)\intermediate\ + + + + Disabled + ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + NotUsing + Level3 + ProgramDatabase + true + false + + + true + $(IntDir)vc$(PlatformToolsetVersion).pdb + stdcpp17 + + + + + $(REPO_PATH)\include;..\include + + + cinder.lib;OpenGL32.lib;%(AdditionalDependencies) + $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) + DebugFull + Windows + false + + LIBCMT;LIBCPMT + /verbose:incr %(AdditionalOptions) + Enabled + false + false + + + + + Disabled + ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;FMT_SHARED;_CRT_SECURE_NO_WARNINGS;CINDER_SHARED;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + true + false + + + true + $(IntDir)$(ProjectName).pdb + stdcpp17 + + + + + $(REPO_PATH)\include;..\include + + + cinder.lib;OpenGL32.lib;%(AdditionalDependencies) + $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) + DebugFull + Windows + false + + + LIBCMT;LIBCPMT + /verbose:incr %(AdditionalOptions) + Enabled + false + false + + + xcopy /y /d "$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset)\cinder.dll" "$(OutDir)" +xcopy /y /d "$(REPO_PATH)\blocks\mason\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset)\mason.dll" "$(OutDir)" + + + + + ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;NDEBUG;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + true + + + true + Full + $(IntDir)$(ProjectName).pdb + stdcpp17 + + + + + true + + + $(REPO_PATH)\include;..\include + + + cinder.lib;OpenGL32.lib;%(AdditionalDependencies) + $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) + DebugFull + false + Windows + false + false + false + + /verbose:incr %(AdditionalOptions) + Enabled + + + + + ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;FMT_SHARED;_CRT_SECURE_NO_WARNINGS;CINDER_SHARED;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + true + + + true + Full + $(IntDir)$(ProjectName).pdb + stdcpp17 + + + + + true + + + $(REPO_PATH)\include;..\include + + + cinder.lib;OpenGL32.lib;%(AdditionalDependencies) + $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) + DebugFull + false + Windows + false + false + false + + + /verbose:incr %(AdditionalOptions) + Enabled + + + xcopy /y /d "$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset)\cinder.dll" "$(OutDir)" +xcopy /y /d "$(REPO_PATH)\blocks\mason\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset)\mason.dll" "$(OutDir)" + + + + + \ No newline at end of file diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters new file mode 100644 index 0000000000..e122bd7643 --- /dev/null +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {714c556a-f6d8-4496-a9ab-22ed0aada75c} + + + + + src + + + \ No newline at end of file diff --git a/test/_audio/AudioTests/proj/vc2019/PropertySheet.props b/test/_audio/AudioTests/proj/vc2019/PropertySheet.props new file mode 100644 index 0000000000..246ecc1196 --- /dev/null +++ b/test/_audio/AudioTests/proj/vc2019/PropertySheet.props @@ -0,0 +1,14 @@ + + + + + ..\..\..\..\.. + + + + + + $(CINDER_PATH) + + + \ No newline at end of file diff --git a/test/_audio/AudioTests/proj/vc2019/Resources.rc b/test/_audio/AudioTests/proj/vc2019/Resources.rc new file mode 100644 index 0000000000..9fd5c6be8f --- /dev/null +++ b/test/_audio/AudioTests/proj/vc2019/Resources.rc @@ -0,0 +1,2 @@ + +1 ICON "..\\resources\\cinder_app_icon.ico" diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp new file mode 100644 index 0000000000..c6c44192a6 --- /dev/null +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -0,0 +1,168 @@ + +#include "cinder/app/App.h" +#include "cinder/app/RendererGl.h" +#include "cinder/gl/gl.h" +#include "cinder/Timeline.h" +#include "cinder/Log.h" +#include "cinder/Utilities.h" +#include "cinder/CinderImGui.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +#define LIVEPP_ENABLED 0 + +const int SCREEN_INDEX = 2; +const ivec2 WINDOW_POS = { 2000, 50 }; +const ivec2 WINDOW_SIZE = { 1600, 1000 }; + +class AudioTests : public app::App { + public: + void setup() override; + void keyDown( app::KeyEvent event ) override; + void resize() override; + void update() override; + void draw() override; + + void reload(); + void initImGui(); + void updateImGui(); + + bool mImGuiEnabled = true; + + //ma::TestSuite mSuite; +}; + +void prepareSettings( app::App::Settings *settings ) +{ +#if LIVEPP_ENABLED + { + liveppEnabled = ma::initLivePP( "../../../../tools/LivePP", "AudioTests" ); + CI_LOG_I( "Live++ " << string( liveppEnabled ? "enabled" : "disabled" ) ); + } +#endif + + settings->setWindowPos( WINDOW_POS ); + settings->setWindowSize( WINDOW_SIZE ); + if( SCREEN_INDEX > 0 && Display::getDisplays().size() >= SCREEN_INDEX ) { + settings->setDisplay( Display::getDisplays()[SCREEN_INDEX] ); + } +} + +void AudioTests::setup() +{ + initImGui(); + + //mSuite.addTest( "misc" ); + //mSuite.addTest( "fluid smoke" ); + //mSuite.addTest( "temporal reveal" ); + + reload(); +} + +void AudioTests::reload() +{ + CI_LOG_I( "reloading" ); + +} + +void AudioTests::keyDown( app::KeyEvent event ) +{ + bool handled = false; + if( event.isControlDown() ) { + handled = true; + if( tolower( event.getChar() ) == 'r' ) { + reload(); + } + else if( event.getChar() == 'f' ) { + setFullScreen( ! isFullScreen() ); + } + else if( event.getChar() == 'g' ) { + mImGuiEnabled = ! mImGuiEnabled; + CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); + } + else if( event.getChar() == 'q' ) { + CI_LOG_I( "Ctrl + q: quitting app." ); + quit(); + } + else { + handled = false; + } + } + + //if( ! handled ) { + // mSuite.keyDown( event ); + //} +} + +void AudioTests::resize() +{ + //mSuite.layout(); +} + +void AudioTests::update() +{ + //mSuite.update(); + + if( mImGuiEnabled ) { + updateImGui(); + } +} + +void AudioTests::draw() +{ + gl::clear( Color( 0, 0, 0 ) ); + + //mSuite.draw(); + +} + +// ---------------------------------------------------------------------------------------------------- +// ImGui +// ---------------------------------------------------------------------------------------------------- + +static bool sThemeIsDark = true; +static float sThemeAlpha = 0.85f; + +// called on first render loop, because we need a valid gl::context +void AudioTests::initImGui() +{ + IMGUI_CHECKVERSION(); + im::Initialize(); +} + +// only called from main thread, after ImGui has been initialized on the first Window's render thread +void AudioTests::updateImGui() +{ + //im::GetStyle().WindowRounding = 4.0f; + //im::GetStyle().Alpha = 0.85f; + + //im::GetStyle().Colors[ImGuiCol_Text] = Color( 0.187f, 1, 0.269f ); + //im::GetStyle().Colors[ImGuiCol_Text] = Color( 0.187f, 1, 1 ); + + im::GetIO().FontGlobalScale = getWindowContentScale(); + im::GetIO().FontAllowUserScaling = true; + + //im::GetIO().ConfigWindowsMoveFromTitleBarOnly = false; + //im::GetIO().ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + + if( im::Begin( "General", nullptr ) ) { + im::Text( "fps: %0.2f, seconds running: %0.1f", app::App::get()->getAverageFps(), app::App::get()->getElapsedSeconds() ); + im::Separator(); + //im::SameLine(); im::Text( "(ctrl + s)" ); + + if( im::Button( "reload" ) ) { + reload(); + } + im::SameLine(); + im::Text( "user settings" ); + + im::Checkbox( "GUI (ctrl + g)", &mImGuiEnabled ); + } + im::End(); // "General" + + //mSuite.updateUI(); +} + +CINDER_APP( AudioTests, app::RendererGl( app::RendererGl::Options().msaa( 2 ) ), prepareSettings ) From 7718216887c80f9fc4e221b7616d489ac73b496b Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Mon, 9 Sep 2024 17:35:57 -0700 Subject: [PATCH 02/38] wip NodeTest via Factor --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 7 + .../proj/vc2019/AudioTests.vcxproj.filters | 17 + test/_audio/AudioTests/src/AudioTest.h | 13 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 22 ++ test/_audio/AudioTests/src/Factory.h | 89 +++++ .../AudioTests/src/InterleavedPassThruNode.h | 28 ++ test/_audio/AudioTests/src/NodeTest.cpp | 333 ++++++++++++++++++ test/_audio/AudioTests/src/NodeTest.h | 41 +++ 8 files changed, 550 insertions(+) create mode 100644 test/_audio/AudioTests/src/AudioTest.h create mode 100644 test/_audio/AudioTests/src/Factory.h create mode 100644 test/_audio/AudioTests/src/InterleavedPassThruNode.h create mode 100644 test/_audio/AudioTests/src/NodeTest.cpp create mode 100644 test/_audio/AudioTests/src/NodeTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 9b9b9b13de..b97ad941e5 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -20,6 +20,13 @@ + + + + + + + {242B9F1A-CC82-4E3A-A21E-0533ABD26074} diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index e122bd7643..37a0580fe9 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -9,5 +9,22 @@ src + + src + + + + + src + + + src + + + src + + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTest.h b/test/_audio/AudioTests/src/AudioTest.h new file mode 100644 index 0000000000..8ec745917f --- /dev/null +++ b/test/_audio/AudioTests/src/AudioTest.h @@ -0,0 +1,13 @@ +#pragma once + +class AudioTest { +public: + void setup() = default; + void resize() = default; + + void update() = default; + void draw() = default; + void updateUI() = default; + +private: +}; diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index c6c44192a6..ef4d0959d0 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -5,8 +5,12 @@ #include "cinder/Timeline.h" #include "cinder/Log.h" #include "cinder/Utilities.h" +#include "cinder/audio/Context.h" #include "cinder/CinderImGui.h" +#include "Factory.h" +#include "NodeTest.h" + using namespace ci; using namespace std; namespace im = ImGui; @@ -26,12 +30,15 @@ class AudioTests : public app::App { void draw() override; void reload(); + void printDefaultOutput(); + void initImGui(); void updateImGui(); bool mImGuiEnabled = true; //ma::TestSuite mSuite; + mason::Factory mTestFactory; }; void prepareSettings( app::App::Settings *settings ) @@ -54,10 +61,14 @@ void AudioTests::setup() { initImGui(); + mTestFactory.registerBuilder( "node basic" ); + //mSuite.addTest( "misc" ); //mSuite.addTest( "fluid smoke" ); //mSuite.addTest( "temporal reveal" ); + printDefaultOutput(); + reload(); } @@ -67,6 +78,17 @@ void AudioTests::reload() } +void AudioTests::printDefaultOutput() +{ + audio::DeviceRef device = audio::Device::getDefaultOutput(); + + CI_LOG_I( "device name: " << device->getName() ); + console() << "\t input channels: " << device->getNumInputChannels() << endl; + console() << "\t output channels: " << device->getNumOutputChannels() << endl; + console() << "\t samplerate: " << device->getSampleRate() << endl; + console() << "\t frames per block: " << device->getFramesPerBlock() << endl; +} + void AudioTests::keyDown( app::KeyEvent event ) { bool handled = false; diff --git a/test/_audio/AudioTests/src/Factory.h b/test/_audio/AudioTests/src/Factory.h new file mode 100644 index 0000000000..15be492d7a --- /dev/null +++ b/test/_audio/AudioTests/src/Factory.h @@ -0,0 +1,89 @@ +/* + Copyright (c) 2014-15, Richard Eakin - All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided + that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and + the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "cinder/Exception.h" + +#include +#include +#include + +namespace mason { + +//! Exception thrown when Factory cannot build an object for the requested key +class FactoryException : public cinder::Exception { + public: + FactoryException( const std::string &key ) + : Exception( "no Builder for key: " + key ) + {} +}; + +//! Allows for constructing shared_ptr objects by string, passing \a Args to T's constructor. +template +class Factory { + public: + //! Register a builder of type \a Y, that can be built by calling `build( key )`. \note Y must inherit from T + template + void registerBuilder( const std::string &key ) + { + static_assert( std::is_base_of::value, "Y must inherit from T" ); + + mBuilderMap[key] = Builder(); + } + + //! Builds an object that inherits from T, which is associated with \a key via registerBuilder(), returning it in a shared_ptr. + std::shared_ptr build( const std::string &key, const Args&... args ) + { + auto builderFnIt = mBuilderMap.find( key ); + if( builderFnIt == mBuilderMap.end() ) + throw FactoryException( key ); + + return builderFnIt->second( args... ); + } + + std::vector getAllKeys() const + { + std::vector result; + for( const auto &mp : mBuilderMap ) { + result.push_back( mp.first ); + } + + return result; + } + + private: + // Helper functor for building objects registered with Factory and returning them in a shared_ptr. + template + struct Builder { + //! returns a shared_ptr of a newly constructed T object + std::shared_ptr operator()( const Args&... args ) + { + return std::shared_ptr( new Y( args... ) ); + } + }; + + typedef std::function( Args... )> BuilderFn; + + std::map mBuilderMap; +}; + +} // namespace mason diff --git a/test/_audio/AudioTests/src/InterleavedPassThruNode.h b/test/_audio/AudioTests/src/InterleavedPassThruNode.h new file mode 100644 index 0000000000..e9dfcbdce9 --- /dev/null +++ b/test/_audio/AudioTests/src/InterleavedPassThruNode.h @@ -0,0 +1,28 @@ +#pragma once + +#include "cinder/audio/Node.h" + +struct InterleavedPassThruNode : public ci::audio::Node { + InterleavedPassThruNode() : Node( Format() ) + { + setAutoEnabled(); + setChannelMode( ChannelMode::SPECIFIED ); + setNumChannels( 2 ); + } + + void initialize() override + { + mBufferInterleaved = ci::audio::BufferInterleaved( getContext()->getFramesPerBlock(), 2 ); + } + + void process( ci::audio::Buffer *buffer ) override + { + CI_ASSERT( buffer->getNumChannels() == 2 ); + + ci::audio::dsp::interleaveBuffer( buffer, &mBufferInterleaved ); + ci::audio::dsp::deinterleaveBuffer( &mBufferInterleaved, buffer ); + } + +private: + ci::audio::BufferInterleaved mBufferInterleaved; +}; \ No newline at end of file diff --git a/test/_audio/AudioTests/src/NodeTest.cpp b/test/_audio/AudioTests/src/NodeTest.cpp new file mode 100644 index 0000000000..90e33be2c8 --- /dev/null +++ b/test/_audio/AudioTests/src/NodeTest.cpp @@ -0,0 +1,333 @@ +//#include "cinder/app/App.h" +//#include "cinder/app/RendererGl.h" +#include "NodeTest.h" +#include "cinder/Log.h" + +#include "cinder/audio/GenNode.h" +#include "cinder/audio/GainNode.h" +#include "cinder/audio/ChannelRouterNode.h" +#include "cinder/audio/MonitorNode.h" +#include "cinder/CinderAssert.h" +#include "cinder/audio/dsp/Converter.h" +#include "cinder/audio/Utilities.h" + +#include "InterleavedPassThruNode.h" +//#include "../../common/AudioTestGui.h" +//#include "../../../../samples/_audio/common/AudioDrawUtils.h" +#include "cinder/CinderImGui.h" + +using namespace ci; +using namespace ci::app; +using namespace std; + +void NodeTest::setup() +{ + auto ctx = audio::master(); + mGain = ctx->makeNode( new audio::GainNode( 0.04f ) ); + mGen = ctx->makeNode( 440 ); + mNoise = ctx->makeNode(); + + mMonitor = audio::master()->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 2048 ) ) ); + + setupGen(); +// setupMerge(); +// setupMerge4(); +// setupSplitStereo(); +// setupSplitMerge(); + + // PRINT_GRAPH( ctx ); // TODO: re-enable + + setupUI(); +} + +void NodeTest::setupGen() +{ + if( mMonitor ) + mMonitor->disconnectAll(); + + mGain->disconnectAllInputs(); + + mGen >> audio::master()->getOutput(); + mGen->enable(); + + //mEnableNoiseButton.setEnabled( false ); + //mEnableSineButton.setEnabled( true ); +} + +void NodeTest::setup2to1() +{ + if( mMonitor ) + mMonitor->disconnectAll(); + + mGen >> mGain; + mNoise >> mGain; + + mGain >> audio::master()->getOutput(); + + mGen->enable(); + mNoise->enable(); + + //mEnableSineButton.setEnabled( true ); + //mEnableNoiseButton.setEnabled( true ); +} + +// note: this enables the scope as a secondary output of mGen, and as no one ever disconnects that, it harmlessly remains when the test is switched. +void NodeTest::setup1to2() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + mGen >> mGain >> audio::master()->getOutput(); + mGen->enable(); + + mGen->connect( mMonitor ); + + //mEnableNoiseButton.setEnabled( false ); + //mEnableSineButton.setEnabled( true ); +} + +void NodeTest::setupInterleavedPassThru() +{ + if( mMonitor ) + mMonitor->disconnectAll(); + + auto ctx = audio::master(); + + mGain->disconnectAllInputs(); + + auto interleaved = ctx->makeNode( new InterleavedPassThruNode() ); + mGen >> interleaved >> mGain >> ctx->getOutput(); + mGen->enable(); + + //mEnableNoiseButton.setEnabled( false ); + //mEnableSineButton.setEnabled( true ); +} + +void NodeTest::setupAutoPulled() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + mGen >> mMonitor; + mGen->enable(); +} + +void NodeTest::setupFunnelCase() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto gain1 = ctx->makeNode( new audio::GainNode ); + auto gain2 = ctx->makeNode( new audio::GainNode ); +// auto gain2 = ctx->makeNode( new audio::GainNode( audio::Node::Format().autoEnable( false ) ) ); + + mGen >> gain1 >> mMonitor; + mNoise >> gain2 >> mMonitor; + + mMonitor >> mGain >> ctx->getOutput(); + + mNoise->disable(); + mGen->enable(); +} + +void NodeTest::setupMerge() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); + + mGen >> router->route( 0, 0 ); + mNoise >> router->route( 0, 1 ); + + router >> mGain >> mMonitor >> ctx->getOutput(); + + mGen->enable(); + mNoise->enable(); +} + +void NodeTest::setupMerge4() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 4 ) ) ); + + auto upmixStereo1 = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); + auto upmixStereo2 = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); + + mGen >> upmixStereo1 >> router->route( 0, 0 ); + mNoise >> upmixStereo2 >> router->route( 0, 2 ); + + router >> mGain >> mMonitor >> ctx->getOutput(); + + mGen->enable(); + mNoise->enable(); +} + +void NodeTest::setupSplitStereo() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto gainStereo = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 2 ) ) ); + auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); + + mGen >> gainStereo >> router->route( 0, 0, 1 ) >> mGain >> mMonitor >> ctx->getOutput(); + + mGen->enable(); +} + +void NodeTest::setupSplitMerge() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto upmixStereo = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); + + auto splitRouter0 = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 1 ) ) ); + auto splitRouter1 = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 1 ) ) ); + auto stereoRouter = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); + + // up-mix to stereo, then split the channels into two separate Node's + mGen >> upmixStereo; + upmixStereo >> splitRouter0->route( 0, 0 ); + upmixStereo >> splitRouter1->route( 1, 0 ); + + // merge the two split Nodes back into one stereo output + splitRouter0 >> stereoRouter->route( 0, 0 ); + splitRouter1 >> stereoRouter->route( 0, 1 ); + + stereoRouter >> mGain >> mMonitor >> ctx->getOutput(); + + mGen->enable(); +} + +void NodeTest::setupUI() +{ + mPlayButton = Button( true, "stopped", "playing" ); + mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); + mWidgets.push_back( &mPlayButton ); + + mTestSelector.mSegments.push_back( "sine" ); + mTestSelector.mSegments.push_back( "2 to 1" ); + mTestSelector.mSegments.push_back( "1 to 2" ); + mTestSelector.mSegments.push_back( "funnel case" ); + mTestSelector.mSegments.push_back( "interleave pass-thru" ); + mTestSelector.mSegments.push_back( "auto-pulled" ); + mTestSelector.mSegments.push_back( "merge" ); + mTestSelector.mSegments.push_back( "merge4" ); + mTestSelector.mSegments.push_back( "split stereo" ); + mTestSelector.mSegments.push_back( "split-merge" ); + mWidgets.push_back( &mTestSelector ); + + mGainSlider.mTitle = "GainNode"; + mGainSlider.mMax = 1; + mGainSlider.set( mGain->getValue() ); + mWidgets.push_back( &mGainSlider ); + + Rectf buttonRect( 0, 70, 200, 120 ); + + mEnableSineButton.mIsToggle = true; + mEnableSineButton.mTitleNormal = "sine disabled"; + mEnableSineButton.mTitleEnabled = "sine enabled"; + mEnableSineButton.mBounds = buttonRect; + mWidgets.push_back( &mEnableSineButton ); + + buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); + mEnableNoiseButton.mIsToggle = true; + mEnableNoiseButton.mTitleNormal = "noise disabled"; + mEnableNoiseButton.mTitleEnabled = "noise enabled"; + mEnableNoiseButton.mBounds = buttonRect; + mWidgets.push_back( &mEnableNoiseButton ); + + buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); + mDelayedEnableButton.mTitleNormal = "delayed enable"; + mDelayedEnableButton.mBounds = buttonRect; + mWidgets.push_back( &mDelayedEnableButton ); + + getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); + getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); + getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); + getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { + for( const TouchEvent::Touch &touch : getActiveTouches() ) + processDrag( touch.getPos() ); + } ); + + gl::enableAlphaBlending(); +} + +void NodeTest::processDrag( ivec2 pos ) +{ + if( mGainSlider.hitTest( pos ) ) + mGain->setValue( mGainSlider.mValueScaled ); +} + +void NodeTest::processTap( ivec2 pos ) +{ + auto ctx = audio::master(); + + if( mPlayButton.hitTest( pos ) ) + ctx->setEnabled( ! ctx->isEnabled() ); + if( mGen && mEnableSineButton.hitTest( pos ) ) + mGen->setEnabled( ! mGen->isEnabled() ); + if( mNoise && mEnableNoiseButton.hitTest( pos ) ) // FIXME: this check doesn't work any more because there is always an mNoise / mGen + mNoise->setEnabled( ! mNoise->isEnabled() ); + if( mDelayedEnableButton.hitTest( pos ) ) { + mGen->setEnabled( ! mGen->isEnabled(), ctx->getNumProcessedSeconds() + 1.0 ); + } + + size_t currentIndex = mTestSelector.mCurrentSectionIndex; + if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { + string currentTest = mTestSelector.currentSection(); + CI_LOG_V( "selected: " << currentTest ); + + if( currentTest == "sine" ) + setupGen(); + else if( currentTest == "2 to 1" ) + setup2to1(); + else if( currentTest == "1 to 2" ) + setup1to2(); + else if( currentTest == "interleave pass-thru" ) + setupInterleavedPassThru(); + else if( currentTest == "auto-pulled" ) + setupAutoPulled(); + else if( currentTest == "funnel case" ) + setupFunnelCase(); + else if( currentTest == "merge" ) + setupMerge(); + else if( currentTest == "merge4" ) + setupMerge4(); + else if( currentTest == "split stereo" ) + setupSplitStereo(); + else if( currentTest == "split-merge" ) + setupSplitMerge(); + + PRINT_GRAPH( ctx ); + } +} + +void NodeTest::resize() +{ + //mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.6f, 0, (float)getWindowWidth(), (float)getWindowHeight() * 0.6f ); + + //const float padding = 10; + //const float sliderHeght = 50; + //Rectf sliderRect( padding, getWindowHeight() - sliderHeght - padding, getWindowCenter().x, getWindowHeight() - padding ); + //mGainSlider.mBounds = sliderRect; + +} + +void NodeTest::draw() +{ + //gl::clear(); + + if( mMonitor && mMonitor->getNumConnectedInputs() ) { + vec2 padding( 20, 20 ); + + Rectf scopeRect( padding.x, padding.y, getWindowWidth() - padding.x, getWindowHeight() - padding.y ); + drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); + } + + //drawWidgets( mWidgets ); +} diff --git a/test/_audio/AudioTests/src/NodeTest.h b/test/_audio/AudioTests/src/NodeTest.h new file mode 100644 index 0000000000..02325db520 --- /dev/null +++ b/test/_audio/AudioTests/src/NodeTest.h @@ -0,0 +1,41 @@ +#pragma once + +#include "AudioTest.h" + +//#include "cinder/Cinder.h" +#include "cinder/audio/audio.h" // TODO: only include what is needed here + + +class NodeTest : public AudioTest { +public: + void setup() override; + void resize() override; + void draw() override; + + void setupGen(); + void setup2to1(); + void setup1to2(); + void setupInterleavedPassThru(); + void setupAutoPulled(); + void setupFunnelCase(); + void setupMerge(); + void setupMerge4(); + void setupSplitStereo(); + void setupSplitMerge(); + + void setupUI(); + void processDrag( ivec2 pos ); + void processTap( ivec2 pos ); + + ci::audio::GainNodeRef mGain; + ci::audio::MonitorNodeRef mMonitor; + ci::audio::GenNodeRef mGen, mNoise; + + //vector mWidgets; + //Button mPlayButton, mEnableNoiseButton, mEnableSineButton, mDelayedEnableButton; + //VSelector mTestSelector; + //HSlider mGainSlider; + + enum InputBus { SINE, NOISE }; +}; + From d04b7dd6589595a3766138f0ef6f5abc9e9e3346 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Mon, 9 Sep 2024 22:11:25 -0700 Subject: [PATCH 03/38] fleshing out first AudioTest, livepp support --- .../AudioTests/proj/vc2019/AudioTests.sln | 55 +++++ .../AudioTests/proj/vc2019/AudioTests.vcxproj | 10 +- .../proj/vc2019/AudioTests.vcxproj.filters | 9 + test/_audio/AudioTests/src/AudioTest.h | 20 +- test/_audio/AudioTests/src/AudioTestsApp.cpp | 59 ++++- test/_audio/AudioTests/src/NodeTest.cpp | 205 +++++++----------- test/_audio/AudioTests/src/NodeTest.h | 23 +- 7 files changed, 222 insertions(+), 159 deletions(-) diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.sln b/test/_audio/AudioTests/proj/vc2019/AudioTests.sln index 6f0568af4b..34f354be83 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.sln +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.sln @@ -4,17 +4,72 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 16.0.35130.168 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioTests", "AudioTests.vcxproj", "{242B9F1A-CC82-4E3A-A21E-0533ABD26074}" + ProjectSection(ProjectDependencies) = postProject + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cinder", "..\..\..\..\..\proj\vc2019\cinder.vcxproj", "{92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_ANGLE|x64 = Debug_ANGLE|x64 + Debug_ANGLE|x86 = Debug_ANGLE|x86 + Debug_Shared|x64 = Debug_Shared|x64 + Debug_Shared|x86 = Debug_Shared|x86 Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release_ANGLE|x64 = Release_ANGLE|x64 + Release_ANGLE|x86 = Release_ANGLE|x86 + Release_Shared|x64 = Release_Shared|x64 + Release_Shared|x86 = Release_Shared|x86 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_ANGLE|x64.ActiveCfg = Debug_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_ANGLE|x64.Build.0 = Debug_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_ANGLE|x86.ActiveCfg = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_ANGLE|x86.Build.0 = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_Shared|x64.ActiveCfg = Debug_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_Shared|x64.Build.0 = Debug_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug_Shared|x86.ActiveCfg = Debug_Shared|x64 {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug|x64.ActiveCfg = Debug|x64 {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug|x64.Build.0 = Debug|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Debug|x86.ActiveCfg = Debug|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_ANGLE|x64.ActiveCfg = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_ANGLE|x64.Build.0 = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_ANGLE|x86.ActiveCfg = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_ANGLE|x86.Build.0 = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_Shared|x64.ActiveCfg = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_Shared|x64.Build.0 = Release_Shared|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release_Shared|x86.ActiveCfg = Release_Shared|x64 {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release|x64.ActiveCfg = Release|x64 {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release|x64.Build.0 = Release|x64 + {242B9F1A-CC82-4E3A-A21E-0533ABD26074}.Release|x86.ActiveCfg = Release|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x64.ActiveCfg = Debug_ANGLE|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x64.Build.0 = Debug_ANGLE|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x86.ActiveCfg = Debug_ANGLE|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x86.Build.0 = Debug_ANGLE|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x64.ActiveCfg = Debug_Shared|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x64.Build.0 = Debug_Shared|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x86.ActiveCfg = Debug_Shared|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x86.Build.0 = Debug_Shared|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x64.ActiveCfg = Debug|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x64.Build.0 = Debug|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x86.ActiveCfg = Debug|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x86.Build.0 = Debug|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x64.ActiveCfg = Release_ANGLE|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x64.Build.0 = Release_ANGLE|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x86.ActiveCfg = Release_ANGLE|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x86.Build.0 = Release_ANGLE|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x64.ActiveCfg = Release_Shared|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x64.Build.0 = Release_Shared|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x86.ActiveCfg = Release_Shared|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x86.Build.0 = Release_Shared|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x64.ActiveCfg = Release|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x64.Build.0 = Release|x64 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x86.ActiveCfg = Release|Win32 + {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index b97ad941e5..28b042e172 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -19,10 +19,12 @@ + + @@ -106,7 +108,7 @@ Disabled - ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + ..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\..\LivePP\API\x64 USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;_DEBUG;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -143,7 +145,7 @@ Disabled - ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + ..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\..\LivePP\API\x64 USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;FMT_SHARED;_CRT_SECURE_NO_WARNINGS;CINDER_SHARED;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;_DEBUG;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -185,7 +187,7 @@ xcopy /y /d "$(REPO_PATH)\blocks\mason\lib\msw\$(PlatformTarget)\$(Configuration - ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + ..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\..\LivePP\API\x64 USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;_CRT_SECURE_NO_WARNINGS;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;NDEBUG;%(PreprocessorDefinitions) MultiThreaded @@ -223,7 +225,7 @@ xcopy /y /d "$(REPO_PATH)\blocks\mason\lib\msw\$(PlatformTarget)\$(Configuration - ..\..\src;$(REPO_PATH)\src;$(REPO_PATH)\blocks\Cinder-ImGui\include;$(REPO_PATH)\blocks\Cinder-ImGui\lib;$(REPO_PATH)\blocks\mason\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-View\src;$(REPO_PATH)\blocks\mason\blocks\Cinder-Profiler\src;$(REPO_PATH)\tools\LivePP\API;$(REPO_PATH)\thirdparty\imGuIZMO.quat\imGuIZMO.quat;$(REPO_PATH)\thirdparty\libxtract\include;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies;$(REPO_PATH)\thirdparty\hirt\HISSTools_IR_Toolbox_Dependencies\HISSTools_FFT;$(CINDER_PATH)\include + ..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\..\LivePP\API\x64 USE_OOURA;WIN_VERSION;CINDER_IMGUI_NO_NAMESPACE_ALIAS;VGIZMO_USES_GLM;FMT_SHARED;_CRT_SECURE_NO_WARNINGS;CINDER_SHARED;WIN32;_WIN32_WINNT=0x0601;_WINDOWS;NOMINMAX;NDEBUG;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 37a0580fe9..8507ff80b9 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -4,6 +4,9 @@ {714c556a-f6d8-4496-a9ab-22ed0aada75c} + + {dda2d0b1-1a2d-48ea-8728-53ea3551cb28} + @@ -12,6 +15,9 @@ src + + src\common + @@ -26,5 +32,8 @@ src + + src\common + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTest.h b/test/_audio/AudioTests/src/AudioTest.h index 8ec745917f..86383e1939 100644 --- a/test/_audio/AudioTests/src/AudioTest.h +++ b/test/_audio/AudioTests/src/AudioTest.h @@ -1,13 +1,21 @@ #pragma once +#include "cinder/Vector.h" + +using AudioTestRef = std::shared_ptr; + class AudioTest { public: - void setup() = default; - void resize() = default; + + virtual void setup() {} + virtual void resize() {} - void update() = default; - void draw() = default; - void updateUI() = default; + virtual void update() {} + virtual void draw() {} + virtual void updateUI() {} + + const std::string& getName() const { return mName; } -private: +protected: + std::string mName; }; diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index ef4d0959d0..0170057894 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -15,7 +15,11 @@ using namespace ci; using namespace std; namespace im = ImGui; -#define LIVEPP_ENABLED 0 +// To use Live++, place necessary files in a folder called LivePP next to the cinder folder +#define LIVEPP_ENABLED 1 +#if LIVEPP_ENABLED +#include "LPP_API_x64_CPP.h" +#endif const int SCREEN_INDEX = 2; const ivec2 WINDOW_POS = { 2000, 50 }; @@ -37,16 +41,18 @@ class AudioTests : public app::App { bool mImGuiEnabled = true; - //ma::TestSuite mSuite; mason::Factory mTestFactory; + AudioTestRef mCurrentTest; }; void prepareSettings( app::App::Settings *settings ) { #if LIVEPP_ENABLED { - liveppEnabled = ma::initLivePP( "../../../../tools/LivePP", "AudioTests" ); - CI_LOG_I( "Live++ " << string( liveppEnabled ? "enabled" : "disabled" ) ); + CI_LOG_I( "executable path:" << app::Platform::get()->getExecutablePath() ); + + lpp::LppDefaultAgent lppAgent = lpp::LppCreateDefaultAgent( nullptr, L"../../../../../../../../../../LivePP" ); + lppAgent.EnableModule( lpp::LppGetCurrentModulePath(), lpp::LPP_MODULES_OPTION_ALL_IMPORT_MODULES, nullptr, nullptr ); } #endif @@ -69,13 +75,12 @@ void AudioTests::setup() printDefaultOutput(); - reload(); + mCurrentTest = mTestFactory.build( "node basic" ); } void AudioTests::reload() { - CI_LOG_I( "reloading" ); - + // TODO: reload current test } void AudioTests::printDefaultOutput() @@ -104,6 +109,10 @@ void AudioTests::keyDown( app::KeyEvent event ) mImGuiEnabled = ! mImGuiEnabled; CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); } + else if( event.getChar() == '/' ) { + audio::master()->setEnabled( ! audio::master()->isEnabled() ); + CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); + } else if( event.getChar() == 'q' ) { CI_LOG_I( "Ctrl + q: quitting app." ); quit(); @@ -120,12 +129,16 @@ void AudioTests::keyDown( app::KeyEvent event ) void AudioTests::resize() { - //mSuite.layout(); + if( mCurrentTest ) { + mCurrentTest->resize(); + } } void AudioTests::update() { - //mSuite.update(); + if( mCurrentTest ) { + mCurrentTest->update(); + } if( mImGuiEnabled ) { updateImGui(); @@ -136,8 +149,9 @@ void AudioTests::draw() { gl::clear( Color( 0, 0, 0 ) ); - //mSuite.draw(); - + if( mCurrentTest ) { + mCurrentTest->draw(); + } } // ---------------------------------------------------------------------------------------------------- @@ -181,10 +195,33 @@ void AudioTests::updateImGui() im::Text( "user settings" ); im::Checkbox( "GUI (ctrl + g)", &mImGuiEnabled ); + + im::Separator(); + im::Text( "Audio" ); + + bool audioEnabled = audio::master()->isEnabled(); + if( im::Checkbox( "enabled", &audioEnabled ) ) { + audio::master()->setEnabled( audioEnabled ); + } + + if( im::Button( "print audio graph" ) ) { + app::console() << "-------------- Graph configuration: --------------" << endl; + app::console() << audio::master()->printGraphToString(); + app::console() << "--------------------------------------------------" << endl; + } } im::End(); // "General" //mSuite.updateUI(); + if( mCurrentTest ) { + im::SetNextWindowPos( { 400, 100 }, ImGuiCond_FirstUseEver ); + im::SetNextWindowSize( { 800, 600 }, ImGuiCond_FirstUseEver ); + im::Begin( mCurrentTest->getName().c_str() ); + + mCurrentTest->updateUI(); + + im::End(); + } } CINDER_APP( AudioTests, app::RendererGl( app::RendererGl::Options().msaa( 2 ) ), prepareSettings ) diff --git a/test/_audio/AudioTests/src/NodeTest.cpp b/test/_audio/AudioTests/src/NodeTest.cpp index 90e33be2c8..23ac374998 100644 --- a/test/_audio/AudioTests/src/NodeTest.cpp +++ b/test/_audio/AudioTests/src/NodeTest.cpp @@ -1,5 +1,4 @@ -//#include "cinder/app/App.h" -//#include "cinder/app/RendererGl.h" +#include "cinder/app/App.h" #include "NodeTest.h" #include "cinder/Log.h" @@ -12,16 +11,30 @@ #include "cinder/audio/Utilities.h" #include "InterleavedPassThruNode.h" -//#include "../../common/AudioTestGui.h" -//#include "../../../../samples/_audio/common/AudioDrawUtils.h" +#include "../../../../samples/_audio/common/AudioDrawUtils.h" #include "cinder/CinderImGui.h" using namespace ci; -using namespace ci::app; using namespace std; - -void NodeTest::setup() +namespace im = ImGui; + +vector sSubTests = { + "sine", + "2 to 1", + "1 to 2", + "funnel case", + "interleave pass-through", + "auto-pulled", + "merge", + "merge4", + "split stereo", + "split merge" +}; + +NodeTest::NodeTest() { + mName = "NodeTest"; + auto ctx = audio::master(); mGain = ctx->makeNode( new audio::GainNode( 0.04f ) ); mGen = ctx->makeNode( 440 ); @@ -37,7 +50,33 @@ void NodeTest::setup() // PRINT_GRAPH( ctx ); // TODO: re-enable - setupUI(); + //setupUI(); +} + +void NodeTest::setupSubTest( const string &testName ) +{ + if( testName == "sine" ) + setupGen(); + else if( testName == "2 to 1" ) + setup2to1(); + else if( testName == "1 to 2" ) + setup1to2(); + else if( testName == "funnel case" ) + setupFunnelCase(); + else if( testName == "interleave pass-thru" ) + setupInterleavedPassThru(); + else if( testName == "auto-pulled" ) + setupAutoPulled(); + else if( testName == "merge" ) + setupMerge(); + else if( testName == "merge4" ) + setupMerge4(); + else if( testName == "split stereo" ) + setupSplitStereo(); + else if( testName == "split merge" ) + setupSplitMerge(); + + CI_LOG_I( "Finished setup for test: " << testName ); } void NodeTest::setupGen() @@ -47,7 +86,8 @@ void NodeTest::setupGen() mGain->disconnectAllInputs(); - mGen >> audio::master()->getOutput(); + //mGen >> audio::master()->getOutput(); + mGen >> mGain >> audio::master()->getOutput(); mGen->enable(); //mEnableNoiseButton.setEnabled( false ); @@ -203,131 +243,50 @@ void NodeTest::setupSplitMerge() mGen->enable(); } -void NodeTest::setupUI() -{ - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); - mWidgets.push_back( &mPlayButton ); - - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "2 to 1" ); - mTestSelector.mSegments.push_back( "1 to 2" ); - mTestSelector.mSegments.push_back( "funnel case" ); - mTestSelector.mSegments.push_back( "interleave pass-thru" ); - mTestSelector.mSegments.push_back( "auto-pulled" ); - mTestSelector.mSegments.push_back( "merge" ); - mTestSelector.mSegments.push_back( "merge4" ); - mTestSelector.mSegments.push_back( "split stereo" ); - mTestSelector.mSegments.push_back( "split-merge" ); - mWidgets.push_back( &mTestSelector ); - - mGainSlider.mTitle = "GainNode"; - mGainSlider.mMax = 1; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - Rectf buttonRect( 0, 70, 200, 120 ); - - mEnableSineButton.mIsToggle = true; - mEnableSineButton.mTitleNormal = "sine disabled"; - mEnableSineButton.mTitleEnabled = "sine enabled"; - mEnableSineButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableSineButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mEnableNoiseButton.mIsToggle = true; - mEnableNoiseButton.mTitleNormal = "noise disabled"; - mEnableNoiseButton.mTitleEnabled = "noise enabled"; - mEnableNoiseButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableNoiseButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mDelayedEnableButton.mTitleNormal = "delayed enable"; - mDelayedEnableButton.mBounds = buttonRect; - mWidgets.push_back( &mDelayedEnableButton ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void NodeTest::processDrag( ivec2 pos ) +void NodeTest::resize() { - if( mGainSlider.hitTest( pos ) ) - mGain->setValue( mGainSlider.mValueScaled ); } -void NodeTest::processTap( ivec2 pos ) +void NodeTest::draw() { - auto ctx = audio::master(); - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - if( mGen && mEnableSineButton.hitTest( pos ) ) - mGen->setEnabled( ! mGen->isEnabled() ); - if( mNoise && mEnableNoiseButton.hitTest( pos ) ) // FIXME: this check doesn't work any more because there is always an mNoise / mGen - mNoise->setEnabled( ! mNoise->isEnabled() ); - if( mDelayedEnableButton.hitTest( pos ) ) { - mGen->setEnabled( ! mGen->isEnabled(), ctx->getNumProcessedSeconds() + 1.0 ); - } + if( mMonitor && mMonitor->getNumConnectedInputs() ) { + vec2 padding( 20, 20 ); - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "sine" ) - setupGen(); - else if( currentTest == "2 to 1" ) - setup2to1(); - else if( currentTest == "1 to 2" ) - setup1to2(); - else if( currentTest == "interleave pass-thru" ) - setupInterleavedPassThru(); - else if( currentTest == "auto-pulled" ) - setupAutoPulled(); - else if( currentTest == "funnel case" ) - setupFunnelCase(); - else if( currentTest == "merge" ) - setupMerge(); - else if( currentTest == "merge4" ) - setupMerge4(); - else if( currentTest == "split stereo" ) - setupSplitStereo(); - else if( currentTest == "split-merge" ) - setupSplitMerge(); - - PRINT_GRAPH( ctx ); + Rectf scopeRect( padding.x, padding.y, app::getWindowWidth() - padding.x, app::getWindowHeight() - padding.y ); + drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); } } -void NodeTest::resize() -{ - //mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.6f, 0, (float)getWindowWidth(), (float)getWindowHeight() * 0.6f ); - - //const float padding = 10; - //const float sliderHeght = 50; - //Rectf sliderRect( padding, getWindowHeight() - sliderHeght - padding, getWindowCenter().x, getWindowHeight() - padding ); - //mGainSlider.mBounds = sliderRect; +// ----------------------------------------------------------------------- +// ImGui +// ----------------------------------------------------------------------- -} - -void NodeTest::draw() +void NodeTest::updateUI() { - //gl::clear(); + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } - if( mMonitor && mMonitor->getNumConnectedInputs() ) { - vec2 padding( 20, 20 ); + bool sineEnabled = mGen->isEnabled(); + if( im::Checkbox( "sine", &sineEnabled ) ) { + mGen->setEnabled( sineEnabled ); + } + im::SameLine(); + bool noiseEnabled = mNoise->isEnabled(); + if( im::Checkbox( "noise", &noiseEnabled ) ) { + mNoise->setEnabled( noiseEnabled ); + } - Rectf scopeRect( padding.x, padding.y, getWindowWidth() - padding.x, getWindowHeight() - padding.y ); - drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); + static float delaySeconds = 1.0f; + if( im::Button( "delayed enable / disable" ) ) { + mGen->setEnabled( ! mGen->isEnabled(), audio::master()->getNumProcessedSeconds() + (double)delaySeconds ); } + im::SameLine(); + im::InputFloat( "seconds", &delaySeconds, 0.5f, 5.0f ); - //drawWidgets( mWidgets ); -} + static int currentSubTest = 0; + if( im::ListBox( "sub-tests", ¤tSubTest, sSubTests, sSubTests.size() ) ) { + setupSubTest( sSubTests[currentSubTest] ); + } +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/NodeTest.h b/test/_audio/AudioTests/src/NodeTest.h index 02325db520..720345b455 100644 --- a/test/_audio/AudioTests/src/NodeTest.h +++ b/test/_audio/AudioTests/src/NodeTest.h @@ -2,16 +2,20 @@ #include "AudioTest.h" -//#include "cinder/Cinder.h" -#include "cinder/audio/audio.h" // TODO: only include what is needed here - +#include "cinder/audio/GainNode.h" +#include "cinder/audio/GenNode.h" +#include "cinder/audio/MonitorNode.h" class NodeTest : public AudioTest { public: - void setup() override; + NodeTest(); + void resize() override; void draw() override; + void updateUI() override; +private: + void setupSubTest( const std::string &testName ); void setupGen(); void setup2to1(); void setup1to2(); @@ -23,19 +27,8 @@ class NodeTest : public AudioTest { void setupSplitStereo(); void setupSplitMerge(); - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - ci::audio::GainNodeRef mGain; ci::audio::MonitorNodeRef mMonitor; ci::audio::GenNodeRef mGen, mNoise; - - //vector mWidgets; - //Button mPlayButton, mEnableNoiseButton, mEnableSineButton, mDelayedEnableButton; - //VSelector mTestSelector; - //HSlider mGainSlider; - - enum InputBus { SINE, NOISE }; }; From 6d6d6bf544b9077e570cbd3308435e91312c5164 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 11 Sep 2024 17:33:02 -0700 Subject: [PATCH 04/38] added NodeEffectsTest, Combo selector in main app to choose which test at runtime --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 31 ++- .../_audio/AudioTests/src/NodeEffectsTest.cpp | 219 ++++++++++++++++++ test/_audio/AudioTests/src/NodeEffectsTest.h | 40 ++++ test/_audio/AudioTests/src/NodeTest.cpp | 49 ++-- test/_audio/AudioTests/src/NodeTest.h | 5 +- 7 files changed, 313 insertions(+), 39 deletions(-) create mode 100644 test/_audio/AudioTests/src/NodeEffectsTest.cpp create mode 100644 test/_audio/AudioTests/src/NodeEffectsTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 28b042e172..05414f6955 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -21,6 +21,7 @@ + @@ -28,6 +29,7 @@ + diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 8507ff80b9..6e8bc34dc5 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -18,6 +18,9 @@ src\common + + src + @@ -35,5 +38,8 @@ src\common + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 0170057894..e670d5037d 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -10,11 +10,14 @@ #include "Factory.h" #include "NodeTest.h" +#include "NodeEffectsTest.h" using namespace ci; using namespace std; namespace im = ImGui; +#define TEST_LOW_LATENCY 0 + // To use Live++, place necessary files in a folder called LivePP next to the cinder folder #define LIVEPP_ENABLED 1 #if LIVEPP_ENABLED @@ -39,10 +42,11 @@ class AudioTests : public app::App { void initImGui(); void updateImGui(); - bool mImGuiEnabled = true; + bool mImGuiEnabled = true; mason::Factory mTestFactory; AudioTestRef mCurrentTest; + int mCurrenTestIndex = 0; }; void prepareSettings( app::App::Settings *settings ) @@ -68,19 +72,27 @@ void AudioTests::setup() initImGui(); mTestFactory.registerBuilder( "node basic" ); + mTestFactory.registerBuilder( "node effects" ); - //mSuite.addTest( "misc" ); - //mSuite.addTest( "fluid smoke" ); - //mSuite.addTest( "temporal reveal" ); +#if TEST_LOW_LATENCY + auto lineOut = ctx->createOutputDeviceNode(); + lineOut->getDevice()->updateFormat( audio::Device::Format().framesPerBlock( 64 ) ); + ctx->setOutput( lineOut ); +#endif + auto ctx = audio::master(); + CI_LOG_I( "Context samplerate: " << ctx->getSampleRate() << ", frames per block: " << ctx->getFramesPerBlock() ); printDefaultOutput(); - mCurrentTest = mTestFactory.build( "node basic" ); + reload(); } void AudioTests::reload() { - // TODO: reload current test + auto testNames = mTestFactory.getAllKeys(); + mCurrentTest = mTestFactory.build( testNames[mCurrenTestIndex] ); + + CI_LOG_I( "finished building test: " << mCurrentTest->getName() ); } void AudioTests::printDefaultOutput() @@ -204,10 +216,15 @@ void AudioTests::updateImGui() audio::master()->setEnabled( audioEnabled ); } + static vector sTests = mTestFactory.getAllKeys(); + if( im::Combo( "tests", &mCurrenTestIndex, sTests, sTests.size() ) ) { + reload(); + } + if( im::Button( "print audio graph" ) ) { - app::console() << "-------------- Graph configuration: --------------" << endl; app::console() << audio::master()->printGraphToString(); app::console() << "--------------------------------------------------" << endl; + app::console() << "-------------- Graph configuration: --------------" << endl; } } im::End(); // "General" diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp new file mode 100644 index 0000000000..4eb11a6b60 --- /dev/null +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -0,0 +1,219 @@ +#include "NodeEffectsTest.h" + +#include "cinder/app/App.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" +#include "cinder/audio/Context.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + + +NodeEffectsTest::NodeEffectsTest() +{ + mName = "NodeEffectsTest"; + + mSubTests = { + "one", + "force stereo", + "down-mix", + "delay", + "variable delay", + "feedback", + "echo", + "cycle" + }; + + //mUseSine = true; // set to start with GenSineNode + + makeNodes(); + setupOne(); + setupDelay(); + //setupFeedback(); + //setupEcho(); +} + + +void NodeEffectsTest::setupSubTest( const string &testName ) +{ + auto ctx = audio::master(); + + bool enabled = ctx->isEnabled(); + ctx->disable(); + ctx->disconnectAllNodes(); + + if( testName == "one" ) + setupOne(); + else if( testName == "force stereo" ) + setupForceStereo(); + else if( testName == "down-mix" ) + setupDownMix(); + else if( testName == "delay" ) + setupDelay(); + else if( testName == "variable delay" ) + setupVariableDelay(); + else if( testName == "feedback" ) + setupFeedback(); + else if( testName == "echo" ) + setupEcho(); + else if( testName == "cycle" ) + setupCycle(); + + ctx->setEnabled( enabled ); + + CI_LOG_I( "Finished setup for test: " << testName ); +} + +void NodeEffectsTest::makeNodes() +{ + auto ctx = audio::master(); + + mGain = ctx->makeNode( new audio::GainNode ); + mGain->setValue( 0.25f ); + + mPan = ctx->makeNode( new audio::Pan2dNode ); + + auto genFmt = audio::Node::Format().autoEnable(); + + if( mUseSine ) { + mGen = ctx->makeNode( new audio::GenSineNode( 220, genFmt ) ); + } + else { + mGen = ctx->makeNode( new audio::GenNoiseNode( genFmt ) ); + } + + mLowPass = ctx->makeNode( new audio::FilterLowPassNode() ); + mLowPass->setCutoffFreq( 400 ); + // mLowPass = ctx->makeNode( new audio::FilterHighPassNode() ); + + mDelay = ctx->makeNode( new audio::DelayNode ); + mDelay->setDelaySeconds( 0.5f ); + // mDelay->setDelaySeconds( 100.0f / (float)ctx->getSampleRate() ); +} + +void NodeEffectsTest::setupOne() +{ + mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); +} + +// TODO: move to NodeTest +void NodeEffectsTest::setupForceStereo() +{ + mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); +} + +// TODO: move to NodeTest +void NodeEffectsTest::setupDownMix() +{ + auto ctx = audio::master(); + auto mono = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 1 ) ) ); + mGen >> mLowPass >> mGain >> mPan >> mono >> ctx->getOutput(); +} + +void NodeEffectsTest::setupDelay() +{ + mGen >> mGain >> mDelay >> audio::master()->getOutput(); +} + +void NodeEffectsTest::setupVariableDelay() +{ +#if TEST_LOW_LATENCY + float maxDelaySeconds = 20.0f / (float)audio::master()->getSampleRate(); + mDelay->setMaxDelaySeconds( maxDelaySeconds ); +#else + mDelay->setMaxDelaySeconds( 1.0f ); +#endif + + auto ctx = audio::master(); + + auto modGen = ctx->makeNode( new audio::GenSineNode( 0.3f, audio::Node::Format().autoEnable() ) ); + auto modMul = ctx->makeNode( new audio::GainNode( 0.1f ) ); + auto modAdd = ctx->makeNode( new audio::AddNode( 0.5f ) ); + + modGen >> modMul >> modAdd; + mDelay->getParamDelaySeconds()->setProcessor( modAdd ); + + mGen >> mGain >> mDelay >> audio::master()->getOutput(); +} + +void NodeEffectsTest::setupFeedback() +{ + // delay + feedback + auto ctx = audio::master(); + + auto feedbackGain = ctx->makeNode( new audio::GainNode( 0.5f ) ); + feedbackGain->setName( "FeedbackGain" ); + + mGen >> mDelay >> feedbackGain >> mDelay >> ctx->getOutput(); +} + +void NodeEffectsTest::setupEcho() +{ + // a more complex feedback graph, but more accurate to what you'd use in the real world + // - sends dry signal to output so you hear it immediately. + + auto feedbackGain = audio::master()->makeNode( new audio::GainNode( 0.5f ) ); + feedbackGain->setName( "FeedbackGain" ); + + mGen >> mGain; + + mGain >> audio::master()->getOutput(); // dry + mGain >> mDelay >> feedbackGain >> mDelay >> audio::master()->getOutput(); // wet +} + +void NodeEffectsTest::setupCycle() +{ + // this throws NodeCycleExc + + try { + mGen >> mLowPass >> mGain >> mLowPass >> audio::master()->getOutput(); + CI_ASSERT_NOT_REACHABLE(); + } + catch( audio::NodeCycleExc &exc ) { + CI_LOG_E( "audio::NodeCycleExc, what: " << exc.what() ); + } +} + +void NodeEffectsTest::applyChirp() +{ + mGen->getParamFreq()->applyRamp( 440, 220, 0.15f ); +} + +void NodeEffectsTest::update() +{ + if( mDelay->getParamDelaySeconds()->getNumEvents() ) { + CI_LOG_I( "ramping delay seconds val: " << mDelay->getParamDelaySeconds()->getValue() ); + } +} + +// ----------------------------------------------------------------------- +// ImGui +// ----------------------------------------------------------------------- + +// TODO: update UI +void NodeEffectsTest::updateUI() +{ + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } + + if( im::Checkbox( "use sine", &mUseSine ) ) { + makeNodes(); + setupSubTest( mSubTests[mCurrentSubTest] ); + } + + bool genEnabled = mGen->isEnabled(); + if( im::Checkbox( "Gen enabled", &genEnabled ) ) { + mGen->setEnabled( genEnabled ); + } + + if( im::Button( "chirp" ) ) { + applyChirp(); + } + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.h b/test/_audio/AudioTests/src/NodeEffectsTest.h new file mode 100644 index 0000000000..4bff9c8c94 --- /dev/null +++ b/test/_audio/AudioTests/src/NodeEffectsTest.h @@ -0,0 +1,40 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/GenNode.h" +#include "cinder/audio/NodeEffects.h" + +class NodeEffectsTest : public AudioTest { +public: + NodeEffectsTest(); + + void update() override; + void updateUI() override; + +private: + void makeNodes(); + void setupSubTest( const std::string &testName ); + + void setupOne(); + void setupForceStereo(); + void setupDownMix(); + void setupDelay(); + void setupVariableDelay(); + void setupFeedback(); + void setupEcho(); + void setupCycle(); + + void applyChirp(); + + std::vector mSubTests; + int mCurrentSubTest = 0; + bool mUseSine = false; // if false, uses noise instead of sine + + ci::audio::GenNodeRef mGen; + ci::audio::GainNodeRef mGain; + ci::audio::Pan2dNodeRef mPan; + ci::audio::FilterLowPassNodeRef mLowPass; + ci::audio::DelayNodeRef mDelay; +}; + diff --git a/test/_audio/AudioTests/src/NodeTest.cpp b/test/_audio/AudioTests/src/NodeTest.cpp index 23ac374998..2eba1a994e 100644 --- a/test/_audio/AudioTests/src/NodeTest.cpp +++ b/test/_audio/AudioTests/src/NodeTest.cpp @@ -1,40 +1,40 @@ -#include "cinder/app/App.h" #include "NodeTest.h" +#include "cinder/app/App.h" #include "cinder/Log.h" +#include "cinder/CinderAssert.h" +#include "cinder/CinderImGui.h" #include "cinder/audio/GenNode.h" #include "cinder/audio/GainNode.h" #include "cinder/audio/ChannelRouterNode.h" #include "cinder/audio/MonitorNode.h" -#include "cinder/CinderAssert.h" #include "cinder/audio/dsp/Converter.h" #include "cinder/audio/Utilities.h" #include "InterleavedPassThruNode.h" #include "../../../../samples/_audio/common/AudioDrawUtils.h" -#include "cinder/CinderImGui.h" using namespace ci; using namespace std; namespace im = ImGui; -vector sSubTests = { - "sine", - "2 to 1", - "1 to 2", - "funnel case", - "interleave pass-through", - "auto-pulled", - "merge", - "merge4", - "split stereo", - "split merge" -}; - NodeTest::NodeTest() { mName = "NodeTest"; + mSubTests = { + "sine", + "2 to 1", + "1 to 2", + "funnel case", + "interleave pass-through", + "auto-pulled", + "merge", + "merge4", + "split stereo", + "split merge" + }; + auto ctx = audio::master(); mGain = ctx->makeNode( new audio::GainNode( 0.04f ) ); mGen = ctx->makeNode( 440 ); @@ -43,14 +43,6 @@ NodeTest::NodeTest() mMonitor = audio::master()->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 2048 ) ) ); setupGen(); -// setupMerge(); -// setupMerge4(); -// setupSplitStereo(); -// setupSplitMerge(); - - // PRINT_GRAPH( ctx ); // TODO: re-enable - - //setupUI(); } void NodeTest::setupSubTest( const string &testName ) @@ -243,10 +235,6 @@ void NodeTest::setupSplitMerge() mGen->enable(); } -void NodeTest::resize() -{ -} - void NodeTest::draw() { if( mMonitor && mMonitor->getNumConnectedInputs() ) { @@ -285,8 +273,7 @@ void NodeTest::updateUI() im::SameLine(); im::InputFloat( "seconds", &delaySeconds, 0.5f, 5.0f ); - static int currentSubTest = 0; - if( im::ListBox( "sub-tests", ¤tSubTest, sSubTests, sSubTests.size() ) ) { - setupSubTest( sSubTests[currentSubTest] ); + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); } } \ No newline at end of file diff --git a/test/_audio/AudioTests/src/NodeTest.h b/test/_audio/AudioTests/src/NodeTest.h index 720345b455..14f71319e5 100644 --- a/test/_audio/AudioTests/src/NodeTest.h +++ b/test/_audio/AudioTests/src/NodeTest.h @@ -10,12 +10,12 @@ class NodeTest : public AudioTest { public: NodeTest(); - void resize() override; void draw() override; void updateUI() override; private: void setupSubTest( const std::string &testName ); + void setupGen(); void setup2to1(); void setup1to2(); @@ -27,6 +27,9 @@ class NodeTest : public AudioTest { void setupSplitStereo(); void setupSplitMerge(); + std::vector mSubTests; + int mCurrentSubTest = 0; + ci::audio::GainNodeRef mGain; ci::audio::MonitorNodeRef mMonitor; ci::audio::GenNodeRef mGen, mNoise; From f8048486440fdc943ae8c059b00971f0f12111d9 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 12 Sep 2024 15:10:55 -0700 Subject: [PATCH 05/38] added a GUI to show audio graph --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 133 ++++++++++++++++++- 1 file changed, 131 insertions(+), 2 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index e670d5037d..634b6b8ca3 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -24,7 +24,7 @@ namespace im = ImGui; #include "LPP_API_x64_CPP.h" #endif -const int SCREEN_INDEX = 2; +const int SCREEN_INDEX = 1; const ivec2 WINDOW_POS = { 2000, 50 }; const ivec2 WINDOW_SIZE = { 1600, 1000 }; @@ -41,8 +41,10 @@ class AudioTests : public app::App { void initImGui(); void updateImGui(); + void updateContextUI(); - bool mImGuiEnabled = true; + bool mImGuiEnabled = true; + bool mContextUIEnabled = true; mason::Factory mTestFactory; AudioTestRef mCurrentTest; @@ -170,9 +172,64 @@ void AudioTests::draw() // ImGui // ---------------------------------------------------------------------------------------------------- +namespace { + static bool sThemeIsDark = true; static float sThemeAlpha = 0.85f; +void substituteNodeLabel( std::string &label ) +{ + static vector> nameSubstitutes = { + { "class cinder::", "ci::" }, + { "class mason::", "ma::" } + }; + + for( const auto &sub : nameSubstitutes ) { + auto pos = label.find( sub.first, 0 ); + if( pos != string::npos ) { + label.replace( pos, sub.first.size(), sub.second ); + } + } +} + +// note: recursion level currently only for debugging +void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) +{ + string label = node->getName(); + substituteNodeLabel( label ); + + ImGuiTreeNodeFlags treeNodeFlags = 0; + im::PushStyleColor( ImGuiCol_Text, node->isEnabled() ? vec4( 1 ) : im::GetStyleColorVec4( ImGuiCol_TextDisabled ) ); + if( node->getNumConnectedInputs() > 0 ) { + if( expand ) + im::SetNextTreeNodeOpen( true ); + + if( im::TreeNodeEx( label.c_str(), treeNodeFlags ) ) { + if( im::IsItemHovered() ) { + *hovered = node; + } + + for( const auto &input : node->getInputs() ) { + printNodeFn( input.get(), expand, hovered ); + } + + im::TreePop(); + } + } + else { + treeNodeFlags |= ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_Bullet; + im::TreeNodeEx( label.c_str(), treeNodeFlags ); + + if( im::IsItemHovered() ) { + *hovered = node; + } + } + + im::PopStyleColor(); +}; + +} // anon namespace + // called on first render loop, because we need a valid gl::context void AudioTests::initImGui() { @@ -207,6 +264,7 @@ void AudioTests::updateImGui() im::Text( "user settings" ); im::Checkbox( "GUI (ctrl + g)", &mImGuiEnabled ); + im::Checkbox( "Show audio::Context UI", &mContextUIEnabled ); im::Separator(); im::Text( "Audio" ); @@ -239,6 +297,77 @@ void AudioTests::updateImGui() im::End(); } + + if( mContextUIEnabled ) { + updateContextUI(); + } +} + +void AudioTests::updateContextUI() +{ + im::SetNextWindowPos( ivec2( 681, 2 ), ImGuiCond_FirstUseEver ); + im::SetNextWindowSize( ivec2( 330, 420 ), ImGuiCond_FirstUseEver ); + im::SetNextWindowCollapsed( true, ImGuiCond_FirstUseEver ); + + if( ! im::Begin( "Audio Context", &mContextUIEnabled ) ) { + im::End(); + return; + } + + auto ctx = audio::master(); + + im::Text( "dsp %s, samplerate: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate() ); + im::Separator(); + im::Text( "Context Graph:" ); + im::SameLine(); + + static bool expand = false; + im::Checkbox( "expand all", &expand ); + + im::BeginChild( "Context Graph", vec2( 0, im::GetWindowHeight() - 100 ) ); + audio::Node *hovered = nullptr; + printNodeFn( ctx->getOutput().get(), expand, &hovered ); + +#if defined( CI_AUDIO_DEBUG_NODE_ALLOCATIONS ) + if( ! ctx->getAutoPulledNodes().empty() ) { + im::Separator(); + im::Text( "auto pulled nodes: %d", ctx->getAutoPulledNodes().size() ); + for( const auto& node : ctx->getAutoPulledNodes() ) { + printNodeFn( node, expand, &hovered ); + } + } +#endif + + im::EndChild(); + + // show info at bottom of window for hovered audio::Nodes + im::Separator(); + if( hovered ) { + string name = hovered->getName(); + substituteNodeLabel( name ); + + const char *processMode = hovered->getProcessesInPlace() ? "in-place" : "sum"; + string channelMode; + switch( hovered->getChannelMode() ) { + case audio::Node::ChannelMode::SPECIFIED: channelMode = "specified"; break; + case audio::Node::ChannelMode::MATCHES_INPUT: channelMode = "matches input"; break; + case audio::Node::ChannelMode::MATCHES_OUTPUT: channelMode = "matches output"; break; + default: CI_ASSERT_NOT_REACHABLE(); break; + } + + im::Text( "%s: channels: %d, mode: %s (%s)", name.c_str(), hovered->getNumChannels(), processMode, channelMode.c_str() ); + + auto mathNode = dynamic_cast( hovered ); + if( mathNode ) { + im::SameLine(); + im::Text( "| value: %0.3f", mathNode->getValue() ); + } + } + else { + im::Text( "" ); + } + + im::End(); // Audio Context } CINDER_APP( AudioTests, app::RendererGl( app::RendererGl::Options().msaa( 2 ) ), prepareSettings ) From c3fe3640ee8371308cf75811dad9b5f3112ed8f0 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 12 Sep 2024 15:11:51 -0700 Subject: [PATCH 06/38] fix test and cleanup dead code --- test/_audio/AudioTests/src/NodeTest.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/test/_audio/AudioTests/src/NodeTest.cpp b/test/_audio/AudioTests/src/NodeTest.cpp index 2eba1a994e..c77584a9b1 100644 --- a/test/_audio/AudioTests/src/NodeTest.cpp +++ b/test/_audio/AudioTests/src/NodeTest.cpp @@ -55,7 +55,7 @@ void NodeTest::setupSubTest( const string &testName ) setup1to2(); else if( testName == "funnel case" ) setupFunnelCase(); - else if( testName == "interleave pass-thru" ) + else if( testName == "interleave pass-through" ) setupInterleavedPassThru(); else if( testName == "auto-pulled" ) setupAutoPulled(); @@ -81,9 +81,6 @@ void NodeTest::setupGen() //mGen >> audio::master()->getOutput(); mGen >> mGain >> audio::master()->getOutput(); mGen->enable(); - - //mEnableNoiseButton.setEnabled( false ); - //mEnableSineButton.setEnabled( true ); } void NodeTest::setup2to1() @@ -98,9 +95,6 @@ void NodeTest::setup2to1() mGen->enable(); mNoise->enable(); - - //mEnableSineButton.setEnabled( true ); - //mEnableNoiseButton.setEnabled( true ); } // note: this enables the scope as a secondary output of mGen, and as no one ever disconnects that, it harmlessly remains when the test is switched. @@ -113,9 +107,6 @@ void NodeTest::setup1to2() mGen->enable(); mGen->connect( mMonitor ); - - //mEnableNoiseButton.setEnabled( false ); - //mEnableSineButton.setEnabled( true ); } void NodeTest::setupInterleavedPassThru() @@ -124,15 +115,11 @@ void NodeTest::setupInterleavedPassThru() mMonitor->disconnectAll(); auto ctx = audio::master(); - - mGain->disconnectAllInputs(); + ctx->disconnectAllNodes(); auto interleaved = ctx->makeNode( new InterleavedPassThruNode() ); mGen >> interleaved >> mGain >> ctx->getOutput(); mGen->enable(); - - //mEnableNoiseButton.setEnabled( false ); - //mEnableSineButton.setEnabled( true ); } void NodeTest::setupAutoPulled() From f603f866eaed09a9eced3ed5e81db0097e59a0cb Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 12 Sep 2024 16:08:43 -0700 Subject: [PATCH 07/38] rename AudioTests -> AudioTestsApp, NodeTest -> NodeBasicTest --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 4 +-- .../proj/vc2019/AudioTests.vcxproj.filters | 12 ++++---- test/_audio/AudioTests/src/AudioTestsApp.cpp | 28 ++++++++--------- .../src/{NodeTest.cpp => NodeBasicTest.cpp} | 30 +++++++++---------- .../src/{NodeTest.h => NodeBasicTest.h} | 4 +-- 5 files changed, 39 insertions(+), 39 deletions(-) rename test/_audio/AudioTests/src/{NodeTest.cpp => NodeBasicTest.cpp} (92%) rename test/_audio/AudioTests/src/{NodeTest.h => NodeBasicTest.h} (92%) diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 05414f6955..242b3cc038 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -21,16 +21,16 @@ + - + - {242B9F1A-CC82-4E3A-A21E-0533ABD26074} diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 6e8bc34dc5..fb62cb5b30 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -12,15 +12,15 @@ src - - src - src\common src + + src + @@ -29,9 +29,6 @@ src - - src - src @@ -41,5 +38,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 634b6b8ca3..3ad12e8b8b 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -9,7 +9,7 @@ #include "cinder/CinderImGui.h" #include "Factory.h" -#include "NodeTest.h" +#include "NodeBasicTest.h" #include "NodeEffectsTest.h" using namespace ci; @@ -28,7 +28,7 @@ const int SCREEN_INDEX = 1; const ivec2 WINDOW_POS = { 2000, 50 }; const ivec2 WINDOW_SIZE = { 1600, 1000 }; -class AudioTests : public app::App { +class AudioTestsApp : public app::App { public: void setup() override; void keyDown( app::KeyEvent event ) override; @@ -69,11 +69,11 @@ void prepareSettings( app::App::Settings *settings ) } } -void AudioTests::setup() +void AudioTestsApp::setup() { initImGui(); - mTestFactory.registerBuilder( "node basic" ); + mTestFactory.registerBuilder( "node basic" ); mTestFactory.registerBuilder( "node effects" ); #if TEST_LOW_LATENCY @@ -89,7 +89,7 @@ void AudioTests::setup() reload(); } -void AudioTests::reload() +void AudioTestsApp::reload() { auto testNames = mTestFactory.getAllKeys(); mCurrentTest = mTestFactory.build( testNames[mCurrenTestIndex] ); @@ -97,7 +97,7 @@ void AudioTests::reload() CI_LOG_I( "finished building test: " << mCurrentTest->getName() ); } -void AudioTests::printDefaultOutput() +void AudioTestsApp::printDefaultOutput() { audio::DeviceRef device = audio::Device::getDefaultOutput(); @@ -108,7 +108,7 @@ void AudioTests::printDefaultOutput() console() << "\t frames per block: " << device->getFramesPerBlock() << endl; } -void AudioTests::keyDown( app::KeyEvent event ) +void AudioTestsApp::keyDown( app::KeyEvent event ) { bool handled = false; if( event.isControlDown() ) { @@ -141,14 +141,14 @@ void AudioTests::keyDown( app::KeyEvent event ) //} } -void AudioTests::resize() +void AudioTestsApp::resize() { if( mCurrentTest ) { mCurrentTest->resize(); } } -void AudioTests::update() +void AudioTestsApp::update() { if( mCurrentTest ) { mCurrentTest->update(); @@ -159,7 +159,7 @@ void AudioTests::update() } } -void AudioTests::draw() +void AudioTestsApp::draw() { gl::clear( Color( 0, 0, 0 ) ); @@ -231,14 +231,14 @@ void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) } // anon namespace // called on first render loop, because we need a valid gl::context -void AudioTests::initImGui() +void AudioTestsApp::initImGui() { IMGUI_CHECKVERSION(); im::Initialize(); } // only called from main thread, after ImGui has been initialized on the first Window's render thread -void AudioTests::updateImGui() +void AudioTestsApp::updateImGui() { //im::GetStyle().WindowRounding = 4.0f; //im::GetStyle().Alpha = 0.85f; @@ -303,7 +303,7 @@ void AudioTests::updateImGui() } } -void AudioTests::updateContextUI() +void AudioTestsApp::updateContextUI() { im::SetNextWindowPos( ivec2( 681, 2 ), ImGuiCond_FirstUseEver ); im::SetNextWindowSize( ivec2( 330, 420 ), ImGuiCond_FirstUseEver ); @@ -370,4 +370,4 @@ void AudioTests::updateContextUI() im::End(); // Audio Context } -CINDER_APP( AudioTests, app::RendererGl( app::RendererGl::Options().msaa( 2 ) ), prepareSettings ) +CINDER_APP( AudioTestsApp, app::RendererGl( app::RendererGl::Options().msaa( 2 ) ), prepareSettings ) diff --git a/test/_audio/AudioTests/src/NodeTest.cpp b/test/_audio/AudioTests/src/NodeBasicTest.cpp similarity index 92% rename from test/_audio/AudioTests/src/NodeTest.cpp rename to test/_audio/AudioTests/src/NodeBasicTest.cpp index c77584a9b1..91f316a356 100644 --- a/test/_audio/AudioTests/src/NodeTest.cpp +++ b/test/_audio/AudioTests/src/NodeBasicTest.cpp @@ -1,4 +1,4 @@ -#include "NodeTest.h" +#include "NodeBasicTest.h" #include "cinder/app/App.h" #include "cinder/Log.h" #include "cinder/CinderAssert.h" @@ -18,7 +18,7 @@ using namespace ci; using namespace std; namespace im = ImGui; -NodeTest::NodeTest() +NodeBasicTest::NodeBasicTest() { mName = "NodeTest"; @@ -45,7 +45,7 @@ NodeTest::NodeTest() setupGen(); } -void NodeTest::setupSubTest( const string &testName ) +void NodeBasicTest::setupSubTest( const string &testName ) { if( testName == "sine" ) setupGen(); @@ -71,7 +71,7 @@ void NodeTest::setupSubTest( const string &testName ) CI_LOG_I( "Finished setup for test: " << testName ); } -void NodeTest::setupGen() +void NodeBasicTest::setupGen() { if( mMonitor ) mMonitor->disconnectAll(); @@ -83,7 +83,7 @@ void NodeTest::setupGen() mGen->enable(); } -void NodeTest::setup2to1() +void NodeBasicTest::setup2to1() { if( mMonitor ) mMonitor->disconnectAll(); @@ -98,7 +98,7 @@ void NodeTest::setup2to1() } // note: this enables the scope as a secondary output of mGen, and as no one ever disconnects that, it harmlessly remains when the test is switched. -void NodeTest::setup1to2() +void NodeBasicTest::setup1to2() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -109,7 +109,7 @@ void NodeTest::setup1to2() mGen->connect( mMonitor ); } -void NodeTest::setupInterleavedPassThru() +void NodeBasicTest::setupInterleavedPassThru() { if( mMonitor ) mMonitor->disconnectAll(); @@ -122,7 +122,7 @@ void NodeTest::setupInterleavedPassThru() mGen->enable(); } -void NodeTest::setupAutoPulled() +void NodeBasicTest::setupAutoPulled() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -131,7 +131,7 @@ void NodeTest::setupAutoPulled() mGen->enable(); } -void NodeTest::setupFunnelCase() +void NodeBasicTest::setupFunnelCase() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -149,7 +149,7 @@ void NodeTest::setupFunnelCase() mGen->enable(); } -void NodeTest::setupMerge() +void NodeBasicTest::setupMerge() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -165,7 +165,7 @@ void NodeTest::setupMerge() mNoise->enable(); } -void NodeTest::setupMerge4() +void NodeBasicTest::setupMerge4() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -184,7 +184,7 @@ void NodeTest::setupMerge4() mNoise->enable(); } -void NodeTest::setupSplitStereo() +void NodeBasicTest::setupSplitStereo() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -197,7 +197,7 @@ void NodeTest::setupSplitStereo() mGen->enable(); } -void NodeTest::setupSplitMerge() +void NodeBasicTest::setupSplitMerge() { auto ctx = audio::master(); ctx->disconnectAllNodes(); @@ -222,7 +222,7 @@ void NodeTest::setupSplitMerge() mGen->enable(); } -void NodeTest::draw() +void NodeBasicTest::draw() { if( mMonitor && mMonitor->getNumConnectedInputs() ) { vec2 padding( 20, 20 ); @@ -236,7 +236,7 @@ void NodeTest::draw() // ImGui // ----------------------------------------------------------------------- -void NodeTest::updateUI() +void NodeBasicTest::updateUI() { float gain = mGain->getValue(); if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { diff --git a/test/_audio/AudioTests/src/NodeTest.h b/test/_audio/AudioTests/src/NodeBasicTest.h similarity index 92% rename from test/_audio/AudioTests/src/NodeTest.h rename to test/_audio/AudioTests/src/NodeBasicTest.h index 14f71319e5..c24c845bee 100644 --- a/test/_audio/AudioTests/src/NodeTest.h +++ b/test/_audio/AudioTests/src/NodeBasicTest.h @@ -6,9 +6,9 @@ #include "cinder/audio/GenNode.h" #include "cinder/audio/MonitorNode.h" -class NodeTest : public AudioTest { +class NodeBasicTest : public AudioTest { public: - NodeTest(); + NodeBasicTest(); void draw() override; void updateUI() override; From 8b34257bc87a9f5b98405e756d85345739b0fe80 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Fri, 13 Sep 2024 00:00:18 -0700 Subject: [PATCH 08/38] added ParamTest, test name is set by main test app --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTest.h | 1 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 27 +- test/_audio/AudioTests/src/NodeBasicTest.cpp | 4 +- .../_audio/AudioTests/src/NodeEffectsTest.cpp | 5 +- test/_audio/AudioTests/src/ParamTest.cpp | 242 ++++++++++++++++++ test/_audio/AudioTests/src/ParamTest.h | 41 +++ 8 files changed, 311 insertions(+), 17 deletions(-) create mode 100644 test/_audio/AudioTests/src/ParamTest.cpp create mode 100644 test/_audio/AudioTests/src/ParamTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 242b3cc038..d8a049a28c 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -23,6 +23,7 @@ + @@ -31,6 +32,7 @@ + {242B9F1A-CC82-4E3A-A21E-0533ABD26074} diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index fb62cb5b30..8d7bf1e88f 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -21,6 +21,9 @@ src + + src + @@ -41,5 +44,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTest.h b/test/_audio/AudioTests/src/AudioTest.h index 86383e1939..427c0097d0 100644 --- a/test/_audio/AudioTests/src/AudioTest.h +++ b/test/_audio/AudioTests/src/AudioTest.h @@ -15,6 +15,7 @@ class AudioTest { virtual void updateUI() {} const std::string& getName() const { return mName; } + void setName( const std::string &name ) { mName = name; } protected: std::string mName; diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 3ad12e8b8b..214189e3a0 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -11,6 +11,7 @@ #include "Factory.h" #include "NodeBasicTest.h" #include "NodeEffectsTest.h" +#include "ParamTest.h" using namespace ci; using namespace std; @@ -73,8 +74,9 @@ void AudioTestsApp::setup() { initImGui(); - mTestFactory.registerBuilder( "node basic" ); - mTestFactory.registerBuilder( "node effects" ); + mTestFactory.registerBuilder( "Node Basic" ); + mTestFactory.registerBuilder( "Node Effects" ); + mTestFactory.registerBuilder( "Param" ); #if TEST_LOW_LATENCY auto lineOut = ctx->createOutputDeviceNode(); @@ -91,10 +93,15 @@ void AudioTestsApp::setup() void AudioTestsApp::reload() { - auto testNames = mTestFactory.getAllKeys(); - mCurrentTest = mTestFactory.build( testNames[mCurrenTestIndex] ); + auto ctx = audio::master(); + audio::ScopedEnableContext scopedDisableCtx( ctx, false ); + ctx->disconnectAllNodes(); + + string testName = mTestFactory.getAllKeys()[mCurrenTestIndex]; + mCurrentTest = mTestFactory.build( testName ); + mCurrentTest->setName( testName ); - CI_LOG_I( "finished building test: " << mCurrentTest->getName() ); + CI_LOG_I( "finished building test '" << testName << "', type: " << System::demangleTypeName( typeid( *mCurrentTest.get() ).name() ) ); } void AudioTestsApp::printDefaultOutput() @@ -123,10 +130,6 @@ void AudioTestsApp::keyDown( app::KeyEvent event ) mImGuiEnabled = ! mImGuiEnabled; CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); } - else if( event.getChar() == '/' ) { - audio::master()->setEnabled( ! audio::master()->isEnabled() ); - CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); - } else if( event.getChar() == 'q' ) { CI_LOG_I( "Ctrl + q: quitting app." ); quit(); @@ -135,9 +138,13 @@ void AudioTestsApp::keyDown( app::KeyEvent event ) handled = false; } } + else if( event.getCode() == app::KeyEvent::KEY_SLASH ) { + audio::master()->setEnabled( ! audio::master()->isEnabled() ); + CI_LOG_I( "ImGui enabled: " << mImGuiEnabled ); + } //if( ! handled ) { - // mSuite.keyDown( event ); + // mCurrentTest->keyDown( event ); //} } diff --git a/test/_audio/AudioTests/src/NodeBasicTest.cpp b/test/_audio/AudioTests/src/NodeBasicTest.cpp index 91f316a356..f9a93d1e15 100644 --- a/test/_audio/AudioTests/src/NodeBasicTest.cpp +++ b/test/_audio/AudioTests/src/NodeBasicTest.cpp @@ -20,8 +20,6 @@ namespace im = ImGui; NodeBasicTest::NodeBasicTest() { - mName = "NodeTest"; - mSubTests = { "sine", "2 to 1", @@ -233,7 +231,7 @@ void NodeBasicTest::draw() } // ----------------------------------------------------------------------- -// ImGui +// UI // ----------------------------------------------------------------------- void NodeBasicTest::updateUI() diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp index 4eb11a6b60..ee4a54413c 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.cpp +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -12,8 +12,6 @@ namespace im = ImGui; NodeEffectsTest::NodeEffectsTest() { - mName = "NodeEffectsTest"; - mSubTests = { "one", "force stereo", @@ -188,10 +186,9 @@ void NodeEffectsTest::update() } // ----------------------------------------------------------------------- -// ImGui +// UI // ----------------------------------------------------------------------- -// TODO: update UI void NodeEffectsTest::updateUI() { float gain = mGain->getValue(); diff --git a/test/_audio/AudioTests/src/ParamTest.cpp b/test/_audio/AudioTests/src/ParamTest.cpp new file mode 100644 index 0000000000..e46aac68e2 --- /dev/null +++ b/test/_audio/AudioTests/src/ParamTest.cpp @@ -0,0 +1,242 @@ +#include "ParamTest.h" + +#include "cinder/app/App.h" +#include "cinder/Log.h" +#include "cinder/Rand.h" +#include "cinder/Timeline.h" +#include "cinder/CinderImGui.h" + +#include "cinder/audio/Context.h" +#include "cinder/audio/Target.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +ParamTest::ParamTest() +{ + mSubTests = { + "basic", + "filter-pan" + }; + + auto ctx = audio::master(); + mGain = ctx->makeNode( new audio::GainNode() ); + mGain->setValue( 0.3f ); + + mPan = ctx->makeNode( new audio::Pan2dNode() ); + + mGen = ctx->makeNode( new audio::GenSineNode() ); +// mGen = ctx->makeNode( new audio::GenTriangleNode() ); +// mGen = ctx->makeNode( new audio::GenPhasorNode() ); + mGen = ctx->makeNode( new audio::GenPulseNode ); + + mGen->setFreq( 220 ); + + mLowPass = ctx->makeNode( new audio::FilterLowPassNode() ); + + setupBasic(); + + //setupUI(); + //PRINT_GRAPH( ctx ); + + testApply(); +// testApply2(); +// connectProcessor(); +} + +void ParamTest::setupSubTest( const std::string &testName ) +{ + auto ctx = audio::master(); + + bool enabled = ctx->isEnabled(); + ctx->disable(); + ctx->disconnectAllNodes(); + + if( testName == "basic" ) + setupBasic(); + else if( testName == "filter-pan" ) + setupFilter(); + + ctx->setEnabled( enabled ); + + CI_LOG_I( "Finished setup for test: " << testName ); +} + +void ParamTest::setupBasic() +{ + mGen >> mGain >> audio::master()->getOutput(); + mGen->enable(); +} + +void ParamTest::setupFilter() +{ + mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); + mGen->enable(); +} + +void ParamTest::testApply() +{ + // (a): ramp volume to 0.7 of 0.2 seconds +// mGain->getParam()->applyRamp( 0.7f, 0.2f ); + + mGen->getParamFreq()->applyRamp( 220, 440, 2 ); + + // PSEUDO CODE: possible syntax where context keeps references to Params, calling updateValueArray() (or just process() ?) on them each block: + // - problem I have with this right now is that its alot more syntax for the common case (see: (a)) of ramping up volume +// Context::master()->timeline()->apply( mGen->getParamFreq(), 220, 440, 1 ); + // - a bit shorter: +// audio::timeline()->apply( mGen->getParamFreq(), 220, 440, 1 ); + + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); +} + +// same as testApply(), but ramp time = 0. end value should still be set. +void ParamTest::testApply0() +{ + mGen->getParamFreq()->applyRamp( 220, 440, 0 ); + + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); +} + +// 2 events - first apply the ramp, blowing away anything else, then append another event to happen after that +void ParamTest::testApply2() +{ + mGen->getParamFreq()->applyRamp( 220, 880, 1 ); + mGen->getParamFreq()->appendRamp( 369.994f, 1 ); // F#4 + + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); + +// writeParamEval( mGen->getParamFreq() ); +} + +// append an event with random frequency and duration 1 second, allowing them to build up. new events begin from the end of the last event +void ParamTest::testAppend() +{ + mGen->getParamFreq()->appendRamp( randFloat( 50, 800 ), 1.0f ); + + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); +} + +// make a ramp after a 1 second delay +void ParamTest::testDelay() +{ + mGen->getParamFreq()->applyRamp( 50, 440, 1, audio::Param::Options().delay( 1 ) ); + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); +} + +// apply a ramp from 220 to 880 over 2 seconds and then after a 1 second delay, cancel it. result should be ~ 550: 220 + (880 - 220) / 2. +void ParamTest::testAppendCancel() +{ + audio::EventRef ramp = mGen->getParamFreq()->applyRamp( 220, 880, 2 ); + + CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); + + app::timeline().add( [ramp] { + CI_LOG_V( "canceling." ); + ramp->cancel(); + }, (float)app::getElapsedSeconds() + 1 ); +} + +void ParamTest::testProcessor() +{ + auto ctx = audio::master(); + auto mod = ctx->makeNode( new audio::GenSineNode( audio::Node::Format().autoEnable() ) ); + mod->setFreq( 2 ); + + mGain->getParam()->setProcessor( mod ); +} + +void ParamTest::testSchedule() +{ + bool enabled = mGen->isEnabled(); + mGen->setEnabled( ! enabled, audio::master()->getNumProcessedSeconds() + 0.5f ); +} + +// TODO: formalize once there is an offline audio context and OutputFileNode. +void ParamTest::writeParamEval( audio::Param *param ) +{ + auto ctx = audio::master(); + float duration = param->findDuration(); + float currTime = (float)ctx->getNumProcessedSeconds(); + size_t sampleRate = ctx->getSampleRate(); + audio::Buffer audioBuffer( (size_t)duration * sampleRate ); + + param->eval( currTime, audioBuffer.getData(), audioBuffer.getSize(), sampleRate ); + + auto target = audio::TargetFile::create( "param.wav", sampleRate, 1 ); + target->write( &audioBuffer ); + + CI_LOG_V( "write complete" ); +} + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void ParamTest::updateUI() +{ + float gain = mGain->getValue(); + if( im::SliderFloat( "Gain", &gain, 0, 1 ) ) { + //mGain->setValue( gain ); + //mGain->getParam()->applyRamp( gain ); + mGain->getParam()->applyRamp( gain, 0.15f ); + } + + float panPos = mPan->getPos(); + if( im::SliderFloat( "Pan", &panPos, 0, 1 ) ) { + //mPan->setPos( panPos ); + mPan->getParamPos()->applyRamp( panPos, 0.3f, audio::Param::Options().rampFn( &audio::rampOutQuad ) ); + } + + float genFreq = mGen->getFreq(); + if( im::SliderFloat( "Gen Freqency", &genFreq, -200, 1200 ) ) { + //mGen->setFreq( genFreq ); + //mGen->getParamFreq()->applyRamp( genFreq, 0.3f ); + mGen->getParamFreq()->applyRamp( genFreq, 0.3f, audio::Param::Options().rampFn( &audio::rampOutQuad ) ); + } + + float lowpassCuttoff = mLowPass->getCutoffFreq(); + if( im::SliderFloat( "Lowpass Cuttoff Freq", &lowpassCuttoff, 0, 1000 ) ) { + mLowPass->setCutoffFreq( lowpassCuttoff ); + } + + im::Separator(); + if( im::Button( "apply" ) ) { + testApply(); + } + im::SameLine(); + if( im::Button( "apply0" ) ) { + testApply0(); + } + im::SameLine(); + if( im::Button( "apply 2" ) ) { + testApply2(); + } + im::SameLine(); + if( im::Button( "append" ) ) { + testAppend(); + } + + if( im::Button( "delay" ) ) { + testDelay(); + } + im::SameLine(); + if( im::Button( "processor" ) ) { + testProcessor(); + } + im::SameLine(); + if( im::Button( "append cancel" ) ) { + testAppendCancel(); + } + im::SameLine(); + if( im::Button( "schedule" ) ) { + testSchedule(); + } + + + im::Separator(); + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} diff --git a/test/_audio/AudioTests/src/ParamTest.h b/test/_audio/AudioTests/src/ParamTest.h new file mode 100644 index 0000000000..4048251112 --- /dev/null +++ b/test/_audio/AudioTests/src/ParamTest.h @@ -0,0 +1,41 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/GainNode.h" +#include "cinder/audio/GenNode.h" +#include "cinder/audio/PanNode.h" +#include "cinder/audio/FilterNode.h" + + +class ParamTest : public AudioTest { + public: + ParamTest(); + + void updateUI() override; + +private: + void setupSubTest( const std::string &testName ); + void setupBasic(); + void setupFilter(); + + void testApply(); + void testApply0(); + void testApply2(); + void testAppend(); + void testDelay(); + void testAppendCancel(); + void testProcessor(); + void testSchedule(); + + void writeParamEval( ci::audio::Param *param ); + + int mCurrentSubTest = 0; + std::vector mSubTests; + + ci::audio::GenNodeRef mGen; + ci::audio::GainNodeRef mGain; + ci::audio::Pan2dNodeRef mPan; + ci::audio::FilterLowPassNodeRef mLowPass; +}; + From 04051a6d8dc7407787f6c3e114c49e94287a084b Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Fri, 13 Sep 2024 00:34:05 -0700 Subject: [PATCH 09/38] DeviceTest --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 20 +- test/_audio/AudioTests/src/DeviceTest.cpp | 699 ++++++++++++++++++ test/_audio/AudioTests/src/DeviceTest.h | 65 ++ 5 files changed, 783 insertions(+), 9 deletions(-) create mode 100644 test/_audio/AudioTests/src/DeviceTest.cpp create mode 100644 test/_audio/AudioTests/src/DeviceTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index d8a049a28c..f631ebfa8b 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -21,6 +21,7 @@ + @@ -28,6 +29,7 @@ + diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 8d7bf1e88f..c939731570 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -24,6 +24,9 @@ src + + src + @@ -47,5 +50,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 214189e3a0..9a2d834ab1 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -18,6 +18,11 @@ using namespace std; namespace im = ImGui; #define TEST_LOW_LATENCY 0 +#define WASAPI_EXCLUSIVE_MODE 1 // MSW only + +#if WASAPI_EXCLUSIVE_MODE && defined( CINDER_MSW ) +#include "cinder/audio/msw/ContextWasapi.h" +#endif // To use Live++, place necessary files in a folder called LivePP next to the cinder folder #define LIVEPP_ENABLED 1 @@ -78,13 +83,18 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Node Effects" ); mTestFactory.registerBuilder( "Param" ); + auto ctx = audio::master(); + +#if WASAPI_EXCLUSIVE_MODE && defined( CINDER_MSW ) + CI_LOG_I( "enabling WASAPI exlusive mode" ); + dynamic_cast( ctx )->setExclusiveModeEnabled(); +#endif #if TEST_LOW_LATENCY auto lineOut = ctx->createOutputDeviceNode(); lineOut->getDevice()->updateFormat( audio::Device::Format().framesPerBlock( 64 ) ); ctx->setOutput( lineOut ); #endif - auto ctx = audio::master(); CI_LOG_I( "Context samplerate: " << ctx->getSampleRate() << ", frames per block: " << ctx->getFramesPerBlock() ); printDefaultOutput(); @@ -247,12 +257,6 @@ void AudioTestsApp::initImGui() // only called from main thread, after ImGui has been initialized on the first Window's render thread void AudioTestsApp::updateImGui() { - //im::GetStyle().WindowRounding = 4.0f; - //im::GetStyle().Alpha = 0.85f; - - //im::GetStyle().Colors[ImGuiCol_Text] = Color( 0.187f, 1, 0.269f ); - //im::GetStyle().Colors[ImGuiCol_Text] = Color( 0.187f, 1, 1 ); - im::GetIO().FontGlobalScale = getWindowContentScale(); im::GetIO().FontAllowUserScaling = true; @@ -262,7 +266,6 @@ void AudioTestsApp::updateImGui() if( im::Begin( "General", nullptr ) ) { im::Text( "fps: %0.2f, seconds running: %0.1f", app::App::get()->getAverageFps(), app::App::get()->getElapsedSeconds() ); im::Separator(); - //im::SameLine(); im::Text( "(ctrl + s)" ); if( im::Button( "reload" ) ) { reload(); @@ -294,7 +297,6 @@ void AudioTestsApp::updateImGui() } im::End(); // "General" - //mSuite.updateUI(); if( mCurrentTest ) { im::SetNextWindowPos( { 400, 100 }, ImGuiCond_FirstUseEver ); im::SetNextWindowSize( { 800, 600 }, ImGuiCond_FirstUseEver ); diff --git a/test/_audio/AudioTests/src/DeviceTest.cpp b/test/_audio/AudioTests/src/DeviceTest.cpp new file mode 100644 index 0000000000..7065dbe5a3 --- /dev/null +++ b/test/_audio/AudioTests/src/DeviceTest.cpp @@ -0,0 +1,699 @@ +#include "DeviceTest.h" + +#include "cinder/app/App.h" +#include "cinder/gl/draw.h" +#include "cinder/gl/scoped.h" +#include "cinder/Log.h" +#include "cinder/Timeline.h" +#include "cinder/CinderImGui.h" + + +#include "cinder/audio/Context.h" +#include "cinder/audio/GenNode.h" +#include "cinder/audio/GainNode.h" +#include "cinder/audio/ChannelRouterNode.h" +#include "cinder/audio/MonitorNode.h" +#include "cinder/audio/SampleRecorderNode.h" +#include "cinder/audio/dsp/Dsp.h" +#include "cinder/audio/Exception.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +const double RECORD_SECONDS = 4.0; + +using namespace ci; +using namespace std; +namespace im = ImGui; + + +DeviceTest::DeviceTest() +{ + mSubTests = { + "sinewave", + "noise", + "input (pulled)", + "I/O (clean)", + "I/O (processed)", + "I/O and sine", + "send", + "send stereo" + }; + + // TODO: show this in the GUI + app::console() << audio::Device::printDevicesToString() << endl; + + auto ctx = audio::master(); + + mMonitor = ctx->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 480 ) ) ); + mGain = ctx->makeNode( new audio::GainNode() ); + //mGain = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 1 ) ) ); // force mix down to mono + mGain->setValue( 0.8f ); + + mGain->connect( mMonitor ); + + setOutputDevice( audio::Device::getDefaultOutput() ); +// setOutputDevice( audio::Device::getDefaultOutput(), 1 ); + //setOutputDevice( audio::Device::findOutputByName( "1-2 (OCTA-CAPTURE)" ) ); + + setInputDevice( audio::Device::getDefaultInput() ); + //setInputDevice( audio::Device::getDefaultInput(), 1 ); + //setupRolandOctaCaptureInputMonitoring(); + + //setupMultiChannelDevice( "PreSonus FIREPOD (1431)" ); + //setupMultiChannelDeviceWindows( "MOTU Analog (MOTU Audio Wave for 64 bit)" ); + + mRecorder = ctx->makeNode( new audio::BufferRecorderNode( RECORD_SECONDS * ctx->getSampleRate() ) ); + mRecorder->setEnabled( false ); + mGain >> mRecorder; + + setupSubTest( mSubTests[mCurrentSubTest] ); + + //setupInputPulled(); + //setupIOClean(); +} + +void DeviceTest::setOutputDevice( const audio::DeviceRef &device, size_t numChannels ) +{ + if( ! device ) { + CI_LOG_E( "Empty DeviceRef" ); + return; + } + + if( SET_FRAMES_PER_BLOCK ) { + device->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); + } + + auto ctx = audio::master(); + + ctx->uninitializeAllNodes(); + + audio::Node::Format format; + if( numChannels ) + format.channels( numChannels ); + + mOutputDeviceNode = ctx->createOutputDeviceNode( device, format ); + + mOutputDeviceNode->getDevice()->getSignalParamsDidChange().connect( -1, + [this] { + CI_LOG_I( "OutputDeviceNode params changed:" ); + printDeviceDetails( mOutputDeviceNode->getDevice() ); + updateUIParams(); + //PRINT_GRAPH( audio::master() ); + } ); + + + // TODO: if this call is moved to after the mMonitor->connect(), there is a chance that initialization can + // take place with samplerate / frames-per-block derived from the default OutputNode (ses default Device) + // Double check this doesn't effect anyone, if it does then setOutput may need to do more work to update Nodes. + ctx->setOutput( mOutputDeviceNode ); + + mMonitor->connect( mOutputDeviceNode ); + + ctx->initializeAllNodes(); + + CI_LOG_I( "OutputDeviceNode device properties: " ); + printDeviceDetails( device ); + + // TODO: considering doing this automatically in Context::setOutput, but then also have to worry about initialize() + // - also may do a ScopedEnable that handles Context as well. + if( mPlayButton.mEnabled ) + mOutputDeviceNode->enable(); +} + +void DeviceTest::setInputDevice( const audio::DeviceRef &device, size_t numChannels ) +{ + if( ! device ) { + CI_LOG_E( "Empty DeviceRef" ); + return; + } + + audio::ScopedEnableNode enableNodeScope( mInputDeviceNode, false ); + + if( SET_FRAMES_PER_BLOCK ) { + device->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); + } + + if( mInputDeviceNode ) + mInputDeviceNode->disconnectAllOutputs(); + + auto format = audio::Node::Format().autoEnable(); + if( numChannels ) + format.channels( numChannels ); + + mInputDeviceNode = audio::master()->createInputDeviceNode( device, format ); + + CI_LOG_I( "InputDeviceNode device properties: " ); + printDeviceDetails( device ); +} + +void DeviceTest::setupMultiChannelDevice( const string &deviceName ) +{ + auto dev = audio::Device::findDeviceByName( deviceName ); + CI_ASSERT( dev ); + +// setOutputDevice( dev ); +// setInputDevice( dev ); + + setOutputDevice( dev, dev->getNumOutputChannels() ); + setInputDevice( dev, dev->getNumInputChannels() ); +} + +void DeviceTest::setupMultiChannelDeviceWindows( const string &deviceName ) +{ + auto outputDev = audio::Device::findOutputByName( deviceName ); + if( outputDev ) + setOutputDevice( outputDev, outputDev->getNumOutputChannels() ); + else + CI_LOG_E( "could not find output device named: " << deviceName ); + + auto inputDev = audio::Device::findInputByName( deviceName ); + if( inputDev ) + setInputDevice( inputDev, inputDev->getNumInputChannels() ); + else + CI_LOG_E( "could not find input device named: " << deviceName ); +} + +void DeviceTest::setupRolandOctaCaptureInputMonitoring() +{ + vector deviceNames = { + "1-2 (OCTA-CAPTURE)", + "3-4 (OCTA-CAPTURE)", + "5-6 (OCTA-CAPTURE)"//, + //"7-8 (OCTA-CAPTURE)", + //"9-10 (OCTA-CAPTURE)" + }; + + size_t numChannels = deviceNames.size() * 2; + auto channelRouter = audio::master()->makeNode( audio::Node::Format().channels( numChannels ) ); + + channelRouter >> mGain; + + for( size_t i = 0; i < deviceNames.size(); i++ ) { + auto devName = deviceNames[i]; + auto inputDev = audio::Device::findInputByName( devName ); + if( inputDev ) { + if( SET_FRAMES_PER_BLOCK ) { + inputDev->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); + } + + auto inputNode = audio::master()->createInputDeviceNode( inputDev ); + inputNode >> channelRouter->route( 0, i * 2 ); + inputNode->enable(); + } + else + CI_LOG_E( "could not find input device named: " << devName ); + } +} + +void DeviceTest::printDeviceDetails( const audio::DeviceRef &device ) +{ + app::console() << "\t name: " << device->getName() << endl; + app::console() << "\t output channels: " << device->getNumOutputChannels() << endl; + app::console() << "\t input channels: " << device->getNumInputChannels() << endl; + app::console() << "\t samplerate: " << device->getSampleRate() << endl; + app::console() << "\t frames per block: " << device->getFramesPerBlock() << endl; + + bool isSyncIO = mInputDeviceNode && mOutputDeviceNode && ( mInputDeviceNode->getDevice() == mOutputDeviceNode->getDevice() && ( mInputDeviceNode->getNumChannels() == mOutputDeviceNode->getNumChannels() ) ); + + app::console() << "\t sync IO: " << boolalpha << isSyncIO << dec << endl; +} + +void DeviceTest::setupSine() +{ + mGen = audio::master()->makeNode( new audio::GenSineNode() ); + mGen->setFreq( 440 ); + + mGen->connect( mGain ); + mGen->enable(); +} + +void DeviceTest::setupNoise() +{ + mGen = audio::master()->makeNode( new audio::GenNoiseNode() ); + + mGen->connect( mGain ); + mGen->enable(); +} + +void DeviceTest::setupInputPulled() +{ + if( ! mInputDeviceNode ) { + CI_LOG_E( "no InputDeviceNode" ); + return; + } + + mOutputDeviceNode->disconnectAllInputs(); + + mInputDeviceNode >> mGain >> mMonitor; + mInputDeviceNode->enable(); +} + +void DeviceTest::setupIOClean() +{ + if( ! mInputDeviceNode ) { + CI_LOG_E( "no InputDeviceNode" ); + return; + } + + mInputDeviceNode->connect( mGain ); + mInputDeviceNode->enable(); +} + +void DeviceTest::setupIOProcessed() +{ + if( ! mInputDeviceNode ) { + CI_LOG_E( "no InputDeviceNode" ); + return; + } + + auto ctx = audio::master(); + auto mod = ctx->makeNode( new audio::GenSineNode( audio::Node::Format().autoEnable() ) ); + mod->setFreq( 200 ); + + auto ringMod = audio::master()->makeNode( new audio::GainNode ); + ringMod->setName( "RingModGain" ); + ringMod->getParam()->setProcessor( mod ); + + mGain->disconnectAllInputs(); + mInputDeviceNode >> ringMod >> mGain; + + mInputDeviceNode->enable(); +} + +void DeviceTest::setupIOAndSine() +{ + mGen = audio::master()->makeNode( new audio::GenSineNode() ); + mGen->setFreq( 440 ); + + mGen->connect( mGain ); + mGen->enable(); + + if( ! mInputDeviceNode ) { + CI_LOG_E( "no InputDeviceNode" ); + return; + } + + mInputDeviceNode->connect( mGain ); + mInputDeviceNode->enable(); +} + +void DeviceTest::setupSend() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( mOutputDeviceNode->getNumChannels() ) ) ); + + mGen = audio::master()->makeNode( new audio::GenSineNode( 440 ) ); + + auto input = mGen; + + int channelIndex = mSendChannelInput.getValue(); + CI_LOG_I( "routing input to channel: " << channelIndex ); + + input >> mGain >> router->route( 0, channelIndex ); + router >> mMonitor >> ctx->getOutput(); + + mGen->enable(); +} + +void DeviceTest::setupSendStereo() +{ + auto ctx = audio::master(); + ctx->disconnectAllNodes(); + + auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( mOutputDeviceNode->getNumChannels() ) ) ); + auto upmix = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); + + int channelIndex = mSendChannelInput.getValue(); + CI_LOG_I( "routing input to channel: " << channelIndex ); + + mGen >> upmix >> mGain >> router->route( 0, channelIndex ); + router >> mMonitor >> ctx->getOutput(); + + mGen->enable(); +} + +void DeviceTest::startRecording() +{ + CI_LOG_I( "begin record..." ); + + mRecorder->start(); + app::timeline().add( [this] { + writeRecordedToFile(); + mRecorder->disable(); + }, app::timeline().getCurrentTime() + RECORD_SECONDS ); +} + +void DeviceTest::writeRecordedToFile() +{ + const string fileName = "recorder_out.wav"; + CI_LOG_I( "writing to: " << fileName ); + + mRecorder->writeToFile( fileName ); + + CI_LOG_I( "...complete." ); +} + +#if 0 +void DeviceTest::setupUI() +{ + mInputDeviceNodeUnderrunFade = mInputDeviceNodeOverrunFade = mOutputDeviceNodeClipFade = 0; + mViewYOffset = 0; + + mPlayButton = Button( true, "stopped", "playing" ); + mWidgets.push_back( &mPlayButton ); + + mRecordButton = Button( false, "record" ); + mWidgets.push_back( &mRecordButton ); + + mTestSelector.mSegments.push_back( "sinewave" ); + mTestSelector.mSegments.push_back( "noise" ); + mTestSelector.mSegments.push_back( "input (pulled)" ); + mTestSelector.mSegments.push_back( "I/O (clean)" ); + mTestSelector.mSegments.push_back( "I/O (processed)" ); + mTestSelector.mSegments.push_back( "I/O and sine" ); + mTestSelector.mSegments.push_back( "send" ); + mTestSelector.mSegments.push_back( "send stereo" ); + mTestSelector.mCurrentSectionIndex = 0; + mWidgets.push_back( &mTestSelector ); + +#if defined( CINDER_COCOA_TOUCH ) + mPlayButton.mBounds = Rectf( 0, 0, 120, 60 ); + mRecordButton.mBounds = Rectf( 130, 0, 190, 34 ); + mTestSelector.mBounds = Rectf( getWindowWidth() - 190, 0, getWindowWidth(), 180 ); +#else + mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); + mRecordButton.mBounds = Rectf( 210, 0, 310, 40 ); +#endif + mTestSelector.mBounds = Rectf( (float)getWindowWidth() - 210, 0, (float)getWindowWidth(), 180 ); + + mGainSlider.mBounds = Rectf( mTestSelector.mBounds.x1, mTestSelector.mBounds.y2 + 10, mTestSelector.mBounds.x2, mTestSelector.mBounds.y2 + 50 ); + mGainSlider.mTitle = "GainNode"; + mGainSlider.set( mGain->getValue() ); + mWidgets.push_back( &mGainSlider ); + + mOutputSelector.mTitle = "Output Devices"; + mOutputSelector.mBounds = Rectf( mTestSelector.mBounds.x1, getWindowCenter().y + 40, (float)getWindowWidth(), (float)getWindowHeight() ); + if( mOutputDeviceNode ) { + for( const auto &dev : audio::Device::getOutputDevices() ) { + if( dev == mOutputDeviceNode->getDevice() ) + mOutputSelector.mCurrentSectionIndex = mOutputSelector.mSegments.size(); + mOutputSelector.mSegments.push_back( dev->getName() ); + } + } + mWidgets.push_back( &mOutputSelector ); + + mInputSelector.mTitle = "Input Devices"; + mInputSelector.mBounds = mOutputSelector.mBounds - vec2( mOutputSelector.mBounds.getWidth() + 10, 0 ); + if( mInputDeviceNode ) { + for( const auto &dev : audio::Device::getInputDevices() ) { + if( dev == mInputDeviceNode->getDevice() ) + mInputSelector.mCurrentSectionIndex = mInputSelector.mSegments.size(); + mInputSelector.mSegments.push_back( dev->getName() ); + } + } + mWidgets.push_back( &mInputSelector ); + + Rectf textInputBounds( 0, getWindowCenter().y + 40, 200, getWindowCenter().y + 70 ); + mSamplerateInput.mBounds = textInputBounds; + mSamplerateInput.mTitle = "samplerate"; + mSamplerateInput.setValue( audio::master()->getSampleRate() ); + mWidgets.push_back( &mSamplerateInput ); + + textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); + mFramesPerBlockInput.mBounds = textInputBounds; + mFramesPerBlockInput.mTitle = "frames per block"; + mFramesPerBlockInput.setValue( audio::master()->getFramesPerBlock() ); + mWidgets.push_back( &mFramesPerBlockInput ); + + textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); + mNumInChannelsInput.mBounds = textInputBounds; + mNumInChannelsInput.mTitle = "num inputs"; + if( mInputDeviceNode ) + mNumInChannelsInput.setValue( mInputDeviceNode->getNumChannels() ); + mWidgets.push_back( &mNumInChannelsInput ); + + textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); + mNumOutChannelsInput.mBounds = textInputBounds; + mNumOutChannelsInput.mTitle = "num outputs"; + if( mOutputDeviceNode ) + mNumOutChannelsInput.setValue( mOutputDeviceNode->getNumChannels() ); + mWidgets.push_back( &mNumOutChannelsInput ); + + textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); + mSendChannelInput.mBounds = textInputBounds; + mSendChannelInput.mTitle = "send channel"; + mSendChannelInput.setValue( 2 ); + mWidgets.push_back( &mSendChannelInput ); + + vec2 xrunSize( 80, 26 ); + mUnderrunRect = Rectf( 0, mPlayButton.mBounds.y2 + 10, xrunSize.x, mPlayButton.mBounds.y2 + xrunSize.y + 10 ); + mOverrunRect = mUnderrunRect + vec2( xrunSize.x + 10, 0 ); + mClipRect = mOverrunRect + vec2( xrunSize.x + 10, 0 ); + + getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); + getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); + getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); + getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { + for( const TouchEvent::Touch &touch : getActiveTouches() ) + processDrag( touch.getPos() ); + } ); + +#if defined( CINDER_COCOA_TOUCH ) + getSignalKeyboardWillShow().connect( [this] { timeline().apply( &mViewYOffset, -100.0f, 0.3f, EaseInOutCubic() ); } ); + getSignalKeyboardWillHide().connect( [this] { timeline().apply( &mViewYOffset, 0.0f, 0.3f, EaseInOutCubic() ); } ); +#endif + + gl::enableAlphaBlending(); +} + +void DeviceTest::processDrag( ivec2 pos ) +{ + if( mGainSlider.hitTest( pos ) ) + mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.025f ); +} + +void DeviceTest::processTap( ivec2 pos ) +{ +// TextInput *selectedInput = false; + if( mPlayButton.hitTest( pos ) ) + audio::master()->setEnabled( ! audio::master()->isEnabled() ); + else if( mRecordButton.hitTest( pos ) ) + startRecording(); + else if( mSamplerateInput.hitTest( pos ) ) { + } + else if( mFramesPerBlockInput.hitTest( pos ) ) { + } + else if( mNumInChannelsInput.hitTest( pos ) ) { + } + else if( mNumOutChannelsInput.hitTest( pos ) ) { + } + else if( mSendChannelInput.hitTest( pos ) ) { + } + +#if defined( CINDER_COCOA_TOUCH ) + TextInput *currentSelected = TextInput::getCurrentSelected(); + if( currentSelected ) + showKeyboard( KeyboardOptions().type( KeyboardType::NUMERICAL ).initialString( currentSelected->mInputString ) ); +#endif + + size_t currentTestIndex = mTestSelector.mCurrentSectionIndex; + if( mTestSelector.hitTest( pos ) && currentTestIndex != mTestSelector.mCurrentSectionIndex ) { + string currentTest = mTestSelector.currentSection(); + CI_LOG_I( "selected: " << currentTest ); + + setupTest( currentTest ); + return; + } + + size_t currentOutputIndex = mOutputSelector.mCurrentSectionIndex; + if( mOutputSelector.hitTest( pos ) && currentOutputIndex != mOutputSelector.mCurrentSectionIndex ) { + auto dev = audio::Device::findOutputByName( mOutputSelector.mSegments[mOutputSelector.mCurrentSectionIndex] ); + CI_LOG_I( "selected output device named: " << dev->getName() << ", key: " << dev->getKey() ); + + setOutputDevice( dev ); + // Don't need to reset test as the Device will be updated on the Context's OutputDeviceNode and the change will propagate through the graph + return; + } + + size_t currentInputIndex = mInputSelector.mCurrentSectionIndex; + if( mInputSelector.hitTest( pos ) && currentInputIndex != mInputSelector.mCurrentSectionIndex ) { + auto dev = audio::Device::findInputByName( mInputSelector.mSegments[mInputSelector.mCurrentSectionIndex] ); + CI_LOG_I( "selected input named: " << dev->getName() << ", key: " << dev->getKey() ); + + setInputDevice( dev ); + setupTest( mTestSelector.currentSection() ); // need to reset the test so that we construct the InputDeviceNode with the proper Device + return; + } +} + +#endif + +void DeviceTest::setupSubTest( const string &test ) +{ + CI_LOG_I( "test: " << test ); + + audio::ScopedEnableContext disableContext( audio::master(), false ); + mGain->disconnectAllInputs(); + + if( test == "sinewave" ) + setupSine(); + else if( test == "noise" ) + setupNoise(); + else if( test == "input (pulled)" ) + setupInputPulled(); + else if( test == "I/O (clean)" ) + setupIOClean(); + else if( test == "I/O (processed)" ) + setupIOProcessed(); + else if( test == "I/O and sine" ) + setupIOAndSine(); + else if( test == "send" ) + setupSend(); + else if( test == "send stereo" ) + setupSendStereo(); + else + CI_ASSERT_NOT_REACHABLE(); +} + +#if 0 +void DeviceTest::keyDown( KeyEvent event ) +{ + TextInput *currentSelected = TextInput::getCurrentSelected(); + if( ! currentSelected ) + return; + + if( event.getCode() == KeyEvent::KEY_RETURN ) { +#if defined( CINDER_COCOA_TOUCH ) + hideKeyboard(); +#endif + + try { + if( currentSelected == &mSamplerateInput ) { + int sr = currentSelected->getValue(); + CI_LOG_I( "updating samplerate from: " << mOutputDeviceNode->getSampleRate() << " to: " << sr ); + mOutputDeviceNode->getDevice()->updateFormat( audio::Device::Format().sampleRate( sr ) ); + } + else if( currentSelected == &mFramesPerBlockInput ) { + int frames = currentSelected->getValue(); + CI_LOG_I( "updating frames per block from: " << mOutputDeviceNode->getFramesPerBlock() << " to: " << frames ); + mOutputDeviceNode->getDevice()->updateFormat( audio::Device::Format().framesPerBlock( frames ) ); + } + else if( currentSelected == &mNumInChannelsInput ) { + int numChannels = currentSelected->getValue(); + CI_LOG_I( "updating nnm input channels from: " << mInputDeviceNode->getNumChannels() << " to: " << numChannels ); + setInputDevice( mInputDeviceNode->getDevice(), numChannels ); + } + else if( currentSelected == &mNumOutChannelsInput ) { + int numChannels = currentSelected->getValue(); + CI_LOG_I( "updating nnm output channels from: " << mOutputDeviceNode->getNumChannels() << " to: " << numChannels ); + setOutputDevice( mOutputDeviceNode->getDevice(), numChannels ); + } + else if( currentSelected == &mSendChannelInput ) { + if( mTestSelector.currentSection() == "send" || mTestSelector.currentSection() == "send stereo" ) + setupTest( mTestSelector.currentSection() ); + } + else + CI_LOG_E( "unhandled return for string: " << currentSelected->mInputString ); + } + catch( audio::AudioDeviceExc &exc ) { + CI_LOG_E( "AudioDeviceExc caught, what: " << exc.what() ); + auto ctx = audio::master(); + mSamplerateInput.setValue( ctx->getSampleRate() ); + mFramesPerBlockInput.setValue( ctx->getFramesPerBlock() ); + return; + } + } + else { + if( event.getCode() == KeyEvent::KEY_BACKSPACE ) + currentSelected->processBackspace(); + else { + currentSelected->processChar( event.getChar() ); + } + } +} + +#endif + +void DeviceTest::update() +{ + const float xrunFadeTime = 1.3f; + + if( mInputDeviceNode ) { + if( mInputDeviceNode->getLastUnderrun() ) + app::timeline().apply( &mInputDeviceNodeUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); + if( mInputDeviceNode->getLastOverrun() ) + app::timeline().apply( &mInputDeviceNodeOverrunFade, 1.0f, 0.0f, xrunFadeTime ); + } + + if( mOutputDeviceNode ) { + if( mOutputDeviceNode->getLastClip() ) + app::timeline().apply( &mOutputDeviceNodeClipFade, 1.0f, 0.0f, xrunFadeTime ); + } + + //if( getElapsedFrames() % 20 == 0 ) { + // CI_LOG_I( "framerate: " << to_string( getAverageFps() ) ); + //} +} + +void DeviceTest::updateUIParams() +{ + auto ctx = audio::master(); + + if( mSamplerateInput.getValue() != ctx->getSampleRate() ) { + mSamplerateInput.setValue( ctx->getSampleRate() ); + } + if( mFramesPerBlockInput.getValue() != ctx->getFramesPerBlock() ) { + mFramesPerBlockInput.setValue( ctx->getFramesPerBlock() ); + } +} + +void DeviceTest::draw() +{ + gl::ScopedMatrices scopedMat; + + gl::pushMatrices(); + gl::translate( 0, mViewYOffset ); + + if( mMonitor && mMonitor->isEnabled() ) { + + Rectf scopeRect( 10, 10, (float)app::getWindowWidth() - 10, (float)app::getWindowHeight() - 10 ); + drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); + + float volume = mMonitor->getVolume(); + const float padding = 20; + Rectf volumeRect( mGainSlider.mBounds.x1, mGainSlider.mBounds.y2 + padding, mGainSlider.mBounds.x1 + mGainSlider.mBounds.getWidth() * volume, mGainSlider.mBounds.y2 + padding + 20 ); + gl::drawSolidRect( volumeRect ); + } + + //drawWidgets( mWidgets ); + + if( mInputDeviceNodeUnderrunFade > 0.0001f ) { + gl::color( ColorA( 0.8f, 0.2f, 0, mInputDeviceNodeUnderrunFade ) ); + gl::drawSolidRect( mUnderrunRect ); + gl::drawStringCentered( "in underrun", mUnderrunRect.getCenter(), Color::black() ); + } + if( mInputDeviceNodeOverrunFade > 0.0001f ) { + gl::color( ColorA( 0.8f, 0.2f, 0, mInputDeviceNodeOverrunFade ) ); + gl::drawSolidRect( mOverrunRect ); + gl::drawStringCentered( "in overrun", mOverrunRect.getCenter(), Color::black() ); + } + if( mOutputDeviceNodeClipFade > 0.0001f ) { + gl::color( ColorA( 0.8f, 0.2f, 0, mOutputDeviceNodeClipFade ) ); + gl::drawSolidRect( mClipRect ); + gl::drawStringCentered( "out clip", mClipRect.getCenter(), Color::black() ); + } + + gl::popMatrices(); +} + + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void DeviceTest::updateUI() +{ +} + diff --git a/test/_audio/AudioTests/src/DeviceTest.h b/test/_audio/AudioTests/src/DeviceTest.h new file mode 100644 index 0000000000..e07b07b753 --- /dev/null +++ b/test/_audio/AudioTests/src/DeviceTest.h @@ -0,0 +1,65 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/Rect.h" +#include "cinder/Tween.h" + +#include "cinder/audio/GainNode.h" +#include "cinder/audio/GenNode.h" +#include "cinder/audio/OutputNode.h" +#include "cinder/audio/MonitorNode.h" +#include "cinder/audio/SampleRecorderNode.h" + +const bool SET_FRAMES_PER_BLOCK = 0; // TODO: move to main app +const size_t FRAMES_PER_BLOCK = 256; // TODO: move to main app + +class DeviceTest : public AudioTest { + public: + DeviceTest(); + + void update() override; + void draw() override; + void updateUI() override; + + void setOutputDevice( const ci::audio::DeviceRef &device, size_t numChannels = 0 ); + void setInputDevice( const ci::audio::DeviceRef &device, size_t numChannels = 0 ); + void setupMultiChannelDevice( const std::string &deviceName ); + void setupMultiChannelDeviceWindows( const std::string &deviceName ); + void setupRolandOctaCaptureInputMonitoring(); + void printDeviceDetails( const ci::audio::DeviceRef &device ); + void startRecording(); + void writeRecordedToFile(); + + void setupSine(); + void setupNoise(); + void setupInputPulled(); + void setupIOClean(); + void setupIOProcessed(); + void setupIOAndSine(); + void setupSend(); + void setupSendStereo(); + void updateUIParams(); + + void setupSubTest( const std::string &testName ); + + int mCurrentSubTest = 0; + std::vector mSubTests; + + ci::audio::InputDeviceNodeRef mInputDeviceNode; + ci::audio::OutputDeviceNodeRef mOutputDeviceNode; + ci::audio::MonitorNodeRef mMonitor; + ci::audio::BufferRecorderNodeRef mRecorder; + ci::audio::GainNodeRef mGain; + ci::audio::GenNodeRef mGen; + + //vector mWidgets; + //VSelector mTestSelector, mInputSelector, mOutputSelector; + //Button mPlayButton, mRecordButton; + //HSlider mGainSlider; + //TextInput mSamplerateInput, mFramesPerBlockInput, mNumInChannelsInput, mNumOutChannelsInput, mSendChannelInput; + + ci::Anim mInputDeviceNodeUnderrunFade, mInputDeviceNodeOverrunFade, mOutputDeviceNodeClipFade; + ci::Anim mViewYOffset; // for iOS keyboard + ci::Rectf mUnderrunRect, mOverrunRect, mClipRect; +}; From d9d8283ceb15abfd8741e6fd048e7779c32db9fc Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Fri, 13 Sep 2024 20:43:33 -0700 Subject: [PATCH 10/38] made audio::Context::getAutoPulledNodes() public Useful for inspection if nothing else --- include/cinder/audio/Context.h | 4 +++- test/_audio/AudioTests/src/AudioTestsApp.cpp | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/cinder/audio/Context.h b/include/cinder/audio/Context.h index 20400c1f52..b9ee63ed6f 100644 --- a/include/cinder/audio/Context.h +++ b/include/cinder/audio/Context.h @@ -133,6 +133,9 @@ class CI_API Context : public std::enable_shared_from_this { //! Returns the time in seconds spent during the last process loop. double getTimeDuringLastProcessLoop() const { return mTimeDuringLastProcessLoop; } + //! Returns nodes that are pulled by the graph (not connected to the output) + const std::vector& getAutoPulledNodes(); + //! Returns a string representation of the Node graph for debugging purposes. std::string printGraphToString(); @@ -155,7 +158,6 @@ class CI_API Context : public std::enable_shared_from_this { void disconnectRecursive( const NodeRef &node, std::set &traversedNodes ); void initRecursisve( const NodeRef &node, std::set &traversedNodes ); void uninitRecursive( const NodeRef &node, std::set &traversedNodes ); - const std::vector& getAutoPulledNodes(); // called if there are any nodes besides output that need to be pulled void processAutoPulledNodes(); void preProcessScheduledEvents(); void postProcessScheduledEvents(); diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 9a2d834ab1..48338c9355 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -337,15 +337,14 @@ void AudioTestsApp::updateContextUI() audio::Node *hovered = nullptr; printNodeFn( ctx->getOutput().get(), expand, &hovered ); -#if defined( CI_AUDIO_DEBUG_NODE_ALLOCATIONS ) - if( ! ctx->getAutoPulledNodes().empty() ) { + size_t numAutoPulledNodes = ctx->getAutoPulledNodes().size(); + if( numAutoPulledNodes ) { im::Separator(); - im::Text( "auto pulled nodes: %d", ctx->getAutoPulledNodes().size() ); + im::Text( "auto pulled nodes: %d", numAutoPulledNodes ); for( const auto& node : ctx->getAutoPulledNodes() ) { printNodeFn( node, expand, &hovered ); } } -#endif im::EndChild(); From c8a45543ba067337fac345b964db5206165dbd64 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Fri, 13 Sep 2024 21:00:45 -0700 Subject: [PATCH 11/38] fleshed out DeviceTest --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 4 +- test/_audio/AudioTests/src/DeviceTest.cpp | 55 ++++++++++---------- test/_audio/AudioTests/src/DeviceTest.h | 11 +--- 3 files changed, 32 insertions(+), 38 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 48338c9355..b80e500884 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -12,13 +12,14 @@ #include "NodeBasicTest.h" #include "NodeEffectsTest.h" #include "ParamTest.h" +#include "DeviceTest.h" using namespace ci; using namespace std; namespace im = ImGui; #define TEST_LOW_LATENCY 0 -#define WASAPI_EXCLUSIVE_MODE 1 // MSW only +#define WASAPI_EXCLUSIVE_MODE 0 // MSW only #if WASAPI_EXCLUSIVE_MODE && defined( CINDER_MSW ) #include "cinder/audio/msw/ContextWasapi.h" @@ -82,6 +83,7 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Node Basic" ); mTestFactory.registerBuilder( "Node Effects" ); mTestFactory.registerBuilder( "Param" ); + mTestFactory.registerBuilder( "Device" ); auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/DeviceTest.cpp b/test/_audio/AudioTests/src/DeviceTest.cpp index 7065dbe5a3..3b368bb5fd 100644 --- a/test/_audio/AudioTests/src/DeviceTest.cpp +++ b/test/_audio/AudioTests/src/DeviceTest.cpp @@ -19,6 +19,8 @@ #include "../../../../samples/_audio/common/AudioDrawUtils.h" +const bool SET_FRAMES_PER_BLOCK = false; +const size_t FRAMES_PER_BLOCK = 256; const double RECORD_SECONDS = 4.0; using namespace ci; @@ -47,7 +49,7 @@ DeviceTest::DeviceTest() mMonitor = ctx->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 480 ) ) ); mGain = ctx->makeNode( new audio::GainNode() ); //mGain = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 1 ) ) ); // force mix down to mono - mGain->setValue( 0.8f ); + mGain->setValue( 0.4f ); mGain->connect( mMonitor ); @@ -97,7 +99,7 @@ void DeviceTest::setOutputDevice( const audio::DeviceRef &device, size_t numChan [this] { CI_LOG_I( "OutputDeviceNode params changed:" ); printDeviceDetails( mOutputDeviceNode->getDevice() ); - updateUIParams(); + //updateUIParams(); //PRINT_GRAPH( audio::master() ); } ); @@ -113,11 +115,6 @@ void DeviceTest::setOutputDevice( const audio::DeviceRef &device, size_t numChan CI_LOG_I( "OutputDeviceNode device properties: " ); printDeviceDetails( device ); - - // TODO: considering doing this automatically in Context::setOutput, but then also have to worry about initialize() - // - also may do a ScopedEnable that handles Context as well. - if( mPlayButton.mEnabled ) - mOutputDeviceNode->enable(); } void DeviceTest::setInputDevice( const audio::DeviceRef &device, size_t numChannels ) @@ -308,10 +305,9 @@ void DeviceTest::setupSend() auto input = mGen; - int channelIndex = mSendChannelInput.getValue(); - CI_LOG_I( "routing input to channel: " << channelIndex ); + CI_LOG_I( "routing input to channel: " << mSendChannel ); - input >> mGain >> router->route( 0, channelIndex ); + input >> mGain >> router->route( 0, mSendChannel ); router >> mMonitor >> ctx->getOutput(); mGen->enable(); @@ -325,10 +321,9 @@ void DeviceTest::setupSendStereo() auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( mOutputDeviceNode->getNumChannels() ) ) ); auto upmix = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); - int channelIndex = mSendChannelInput.getValue(); - CI_LOG_I( "routing input to channel: " << channelIndex ); + CI_LOG_I( "routing input to channel: " << mSendChannel ); - mGen >> upmix >> mGain >> router->route( 0, channelIndex ); + mGen >> upmix >> mGain >> router->route( 0, mSendChannel ); router >> mMonitor >> ctx->getOutput(); mGen->enable(); @@ -537,6 +532,10 @@ void DeviceTest::setupSubTest( const string &test ) audio::ScopedEnableContext disableContext( audio::master(), false ); mGain->disconnectAllInputs(); + if( im::Button( "record" ) ) { + startRecording(); + } + if( test == "sinewave" ) setupSine(); else if( test == "noise" ) @@ -637,18 +636,6 @@ void DeviceTest::update() //} } -void DeviceTest::updateUIParams() -{ - auto ctx = audio::master(); - - if( mSamplerateInput.getValue() != ctx->getSampleRate() ) { - mSamplerateInput.setValue( ctx->getSampleRate() ); - } - if( mFramesPerBlockInput.getValue() != ctx->getFramesPerBlock() ) { - mFramesPerBlockInput.setValue( ctx->getFramesPerBlock() ); - } -} - void DeviceTest::draw() { gl::ScopedMatrices scopedMat; @@ -663,12 +650,10 @@ void DeviceTest::draw() float volume = mMonitor->getVolume(); const float padding = 20; - Rectf volumeRect( mGainSlider.mBounds.x1, mGainSlider.mBounds.y2 + padding, mGainSlider.mBounds.x1 + mGainSlider.mBounds.getWidth() * volume, mGainSlider.mBounds.y2 + padding + 20 ); + Rectf volumeRect( padding, padding, padding * 2, padding + volume * 200 ); gl::drawSolidRect( volumeRect ); } - //drawWidgets( mWidgets ); - if( mInputDeviceNodeUnderrunFade > 0.0001f ) { gl::color( ColorA( 0.8f, 0.2f, 0, mInputDeviceNodeUnderrunFade ) ); gl::drawSolidRect( mUnderrunRect ); @@ -695,5 +680,19 @@ void DeviceTest::draw() void DeviceTest::updateUI() { + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } + + auto ctx = audio::master(); + + int sampleRate = ctx->getSampleRate(); + + int framesPerBlock = ctx->getFramesPerBlock(); + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } } diff --git a/test/_audio/AudioTests/src/DeviceTest.h b/test/_audio/AudioTests/src/DeviceTest.h index e07b07b753..eb69147955 100644 --- a/test/_audio/AudioTests/src/DeviceTest.h +++ b/test/_audio/AudioTests/src/DeviceTest.h @@ -11,9 +11,6 @@ #include "cinder/audio/MonitorNode.h" #include "cinder/audio/SampleRecorderNode.h" -const bool SET_FRAMES_PER_BLOCK = 0; // TODO: move to main app -const size_t FRAMES_PER_BLOCK = 256; // TODO: move to main app - class DeviceTest : public AudioTest { public: DeviceTest(); @@ -39,7 +36,6 @@ class DeviceTest : public AudioTest { void setupIOAndSine(); void setupSend(); void setupSendStereo(); - void updateUIParams(); void setupSubTest( const std::string &testName ); @@ -53,11 +49,8 @@ class DeviceTest : public AudioTest { ci::audio::GainNodeRef mGain; ci::audio::GenNodeRef mGen; - //vector mWidgets; - //VSelector mTestSelector, mInputSelector, mOutputSelector; - //Button mPlayButton, mRecordButton; - //HSlider mGainSlider; - //TextInput mSamplerateInput, mFramesPerBlockInput, mNumInChannelsInput, mNumOutChannelsInput, mSendChannelInput; + + int mSendChannel = 2; ci::Anim mInputDeviceNodeUnderrunFade, mInputDeviceNodeOverrunFade, mOutputDeviceNodeClipFade; ci::Anim mViewYOffset; // for iOS keyboard From b9b0192eb33dc3341028891f72db284af1214108 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Fri, 13 Sep 2024 21:19:05 -0700 Subject: [PATCH 12/38] wip moving over SampleTest and SpectralTest, audio files now loaded as assets --- .../{data => AudioTests/assets}/tone440.mp3 | Bin .../{data => AudioTests/assets}/tone440.ogg | Bin .../{data => AudioTests/assets}/tone440.wav | Bin .../assets}/tone440L220R.mp3 | Bin .../assets}/tone440L220R.ogg | Bin .../assets}/tone440L220R.wav | Bin .../assets}/tone440_float.wav | Bin .../assets}/tone440_loop.wav | Bin .../AudioTests/proj/vc2019/AudioTests.vcxproj | 4 + .../proj/vc2019/AudioTests.vcxproj.filters | 12 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 4 + .../_audio/AudioTests/src/NodeEffectsTest.cpp | 1 - .../AudioTests/src/SamplePlayerTest.cpp | 590 ++++++++++++++++++ test/_audio/AudioTests/src/SamplePlayerTest.h | 66 ++ test/_audio/AudioTests/src/SpectralTest.cpp | 285 +++++++++ test/_audio/AudioTests/src/SpectralTest.h | 43 ++ 16 files changed, 1004 insertions(+), 1 deletion(-) rename test/_audio/{data => AudioTests/assets}/tone440.mp3 (100%) rename test/_audio/{data => AudioTests/assets}/tone440.ogg (100%) rename test/_audio/{data => AudioTests/assets}/tone440.wav (100%) rename test/_audio/{data => AudioTests/assets}/tone440L220R.mp3 (100%) rename test/_audio/{data => AudioTests/assets}/tone440L220R.ogg (100%) rename test/_audio/{data => AudioTests/assets}/tone440L220R.wav (100%) rename test/_audio/{data => AudioTests/assets}/tone440_float.wav (100%) rename test/_audio/{data => AudioTests/assets}/tone440_loop.wav (100%) create mode 100644 test/_audio/AudioTests/src/SamplePlayerTest.cpp create mode 100644 test/_audio/AudioTests/src/SamplePlayerTest.h create mode 100644 test/_audio/AudioTests/src/SpectralTest.cpp create mode 100644 test/_audio/AudioTests/src/SpectralTest.h diff --git a/test/_audio/data/tone440.mp3 b/test/_audio/AudioTests/assets/tone440.mp3 similarity index 100% rename from test/_audio/data/tone440.mp3 rename to test/_audio/AudioTests/assets/tone440.mp3 diff --git a/test/_audio/data/tone440.ogg b/test/_audio/AudioTests/assets/tone440.ogg similarity index 100% rename from test/_audio/data/tone440.ogg rename to test/_audio/AudioTests/assets/tone440.ogg diff --git a/test/_audio/data/tone440.wav b/test/_audio/AudioTests/assets/tone440.wav similarity index 100% rename from test/_audio/data/tone440.wav rename to test/_audio/AudioTests/assets/tone440.wav diff --git a/test/_audio/data/tone440L220R.mp3 b/test/_audio/AudioTests/assets/tone440L220R.mp3 similarity index 100% rename from test/_audio/data/tone440L220R.mp3 rename to test/_audio/AudioTests/assets/tone440L220R.mp3 diff --git a/test/_audio/data/tone440L220R.ogg b/test/_audio/AudioTests/assets/tone440L220R.ogg similarity index 100% rename from test/_audio/data/tone440L220R.ogg rename to test/_audio/AudioTests/assets/tone440L220R.ogg diff --git a/test/_audio/data/tone440L220R.wav b/test/_audio/AudioTests/assets/tone440L220R.wav similarity index 100% rename from test/_audio/data/tone440L220R.wav rename to test/_audio/AudioTests/assets/tone440L220R.wav diff --git a/test/_audio/data/tone440_float.wav b/test/_audio/AudioTests/assets/tone440_float.wav similarity index 100% rename from test/_audio/data/tone440_float.wav rename to test/_audio/AudioTests/assets/tone440_float.wav diff --git a/test/_audio/data/tone440_loop.wav b/test/_audio/AudioTests/assets/tone440_loop.wav similarity index 100% rename from test/_audio/data/tone440_loop.wav rename to test/_audio/AudioTests/assets/tone440_loop.wav diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index f631ebfa8b..ba6c221345 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -25,6 +25,8 @@ + + @@ -35,6 +37,8 @@ + + {242B9F1A-CC82-4E3A-A21E-0533ABD26074} diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index c939731570..619cd1043d 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -27,6 +27,12 @@ src + + src + + + src + @@ -53,5 +59,11 @@ src + + src + + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index b80e500884..476d95d01b 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -13,6 +13,8 @@ #include "NodeEffectsTest.h" #include "ParamTest.h" #include "DeviceTest.h" +#include "SamplePlayerTest.h" +#include "SpectralTest.h" using namespace ci; using namespace std; @@ -84,6 +86,8 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Node Effects" ); mTestFactory.registerBuilder( "Param" ); mTestFactory.registerBuilder( "Device" ); + mTestFactory.registerBuilder( "Samples" ); + mTestFactory.registerBuilder( "Spectral" ); auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp index ee4a54413c..f9a05cf4b3 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.cpp +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -9,7 +9,6 @@ using namespace ci; using namespace std; namespace im = ImGui; - NodeEffectsTest::NodeEffectsTest() { mSubTests = { diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.cpp b/test/_audio/AudioTests/src/SamplePlayerTest.cpp new file mode 100644 index 0000000000..890f2c27a7 --- /dev/null +++ b/test/_audio/AudioTests/src/SamplePlayerTest.cpp @@ -0,0 +1,590 @@ +#include "SamplePlayerTest.h" + +#include "cinder/app/App.h" +#include "cinder/Timeline.h" +#include "cinder/Timer.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" + +#define TEST_STEREO_INPUT_PANNING 0 +#define INITIAL_AUDIO_SAMPLE "tone440L220R.wav" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +SamplePlayerTest::SamplePlayerTest() +{ + mUnderrunFade = mOverrunFade = mRecorderOverrunFade = 0; + mSamplePlayerNodeEnabledState = false; + + printSupportedExtensions(); + + setSourceFile( app::loadAsset( INITIAL_AUDIO_SAMPLE ) ); + + auto ctx = audio::master(); + + mPan = ctx->makeNode( new audio::Pan2dNode() ); +#if TEST_STEREO_INPUT_PANNING + mPan->setStereoInputModeEnabled( true ); +#endif + + mGain = ctx->makeNode( new audio::GainNode() ); + mGain->setValue( 0.6f ); + + mGain >> mPan >> ctx->getOutput(); + + setupBufferPlayerNode(); +// setupFilePlayerNode(); + + ctx->enable(); + mEnableSamplePlayerNodeButton.setEnabled( true ); + + CI_LOG_V( "context samplerate: " << ctx->getSampleRate() ); +} + +void SamplePlayerTest::setupBufferPlayerNode() +{ + auto bufferPlayer = audio::master()->makeNode( new audio::BufferPlayerNode() ); + + auto loadFn = [bufferPlayer, this] { + bufferPlayer->loadBuffer( mSourceFile->clone() ); + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); + CI_LOG_V( "loaded source buffer, frames: " << bufferPlayer->getBuffer()->getNumFrames() ); + + }; + + auto connectFn = [bufferPlayer, this] { + mGain->disconnectAllInputs(); + mSamplePlayerNode = bufferPlayer; + mSamplePlayerNode >> mGain >> mPan >> audio::master()->getOutput(); + //PRINT_GRAPH( audio::master() ); + mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); + mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); + mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); + }; + + bool asyncLoad = mAsyncButton.mEnabled; + CI_LOG_V( "async load: " << boolalpha << asyncLoad << dec ); + if( asyncLoad ) { + mWaveformPlot.clear(); + mAsyncLoadFuture = std::async( [=] { + loadFn(); + dispatchAsync( [=] { + connectFn(); + } ); + } ); + } + else { + loadFn(); + connectFn(); + }; +} + +void SamplePlayerTest::setupFilePlayerNode() +{ + mGain->disconnectAllInputs(); + + auto ctx = audio::master(); + +// mSourceFile->setMaxFramesPerRead( 8192 ); + bool asyncRead = mAsyncButton.mEnabled; + CI_LOG_V( "async read: " << asyncRead ); + mSamplePlayerNode = ctx->makeNode( new audio::FilePlayerNode( mSourceFile->clone(), asyncRead ) ); + + // TODO: it is pretty surprising when you recreate mMonitor here without checking if there has already been one added. + // - user will no longer see the old mMonitor, but the context still owns a reference to it, so another gets added each time we call this method. + if( ! mMonitor ) + mMonitor = ctx->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 1024 ) ) ); + + // when these connections are called, some (GainNode and Pan) will already be connected, but this is okay, they should silently no-op. + + // or connect in series (it is added to the Context's 'auto pulled list') + mSamplePlayerNode >> mGain >> mPan >> ctx->getOutput(); + mPan >> mMonitor; + + mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); + mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); + mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); + + PRINT_GRAPH( audio::master() ); +} + +void SamplePlayerTest::setupBufferRecorderNode() +{ + auto ctx = audio::master(); + + mRecorder = ctx->makeNode( new audio::BufferRecorderNode( 2 * ctx->getSampleRate() ) ); +// mRecorder->setNumSeconds( 2 ); // can also set seconds afterwards, which causes a lock and buffer resize + + CI_ASSERT( mSamplePlayerNode ); + + mSamplePlayerNode >> mRecorder; + + PRINT_GRAPH( audio::master() ); +} + +void SamplePlayerTest::setSourceFile( const DataSourceRef &dataSource ) +{ + mSourceFile = audio::load( dataSource, audio::master()->getSampleRate() ); + + getWindow()->setTitle( dataSource->getFilePath().filename().string() ); + + CI_LOG_V( "SourceFile info: " ); + console() << "samplerate: " << mSourceFile->getSampleRate() << endl; + console() << "native samplerate: " << mSourceFile->getSampleRateNative() << endl; + console() << "channels: " << mSourceFile->getNumChannels() << endl; + console() << "frames: " << mSourceFile->getNumFrames() << endl; + console() << "metadata:\n" << mSourceFile->getMetaData() << endl; +} + +void SamplePlayerTest::writeRecordedToFile() +{ + const string fileName = "recorder_out.wav"; + CI_LOG_V( "writing to: " << fileName ); + + mRecorder->writeToFile( fileName ); + + CI_LOG_V( "...complete." ); +} + +void SamplePlayerTest::triggerStartStop( bool start ) +{ + float delaySeconds = mTriggerDelaySlider.mValueScaled; + if( delaySeconds <= 0.001f ) { + if( start ) + mSamplePlayerNode->start(); + else + mSamplePlayerNode->stop(); + } + else { + CI_LOG_V( "scheduling " << ( start ? "start" : "stop" ) << " with delay: " << delaySeconds + << "\n\tprocessed frames: " << audio::master()->getNumProcessedFrames() << ", seconds: " << audio::master()->getNumProcessedSeconds() ); + + double when = audio::master()->getNumProcessedSeconds() + delaySeconds; + if( start ) + mSamplePlayerNode->start( when ); + else + mSamplePlayerNode->stop( when ); + } +} + +void SamplePlayerTest::setupUI() +{ + const float padding = 6.0f; + + auto buttonRect = Rectf( padding, padding, 160, 50 ); + mEnableSamplePlayerNodeButton.mIsToggle = true; + mEnableSamplePlayerNodeButton.mTitleNormal = "player off"; + mEnableSamplePlayerNodeButton.mTitleEnabled = "player on"; + mEnableSamplePlayerNodeButton.mBounds = buttonRect; + mWidgets.push_back( &mEnableSamplePlayerNodeButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + mStartPlaybackButton.mIsToggle = false; + mStartPlaybackButton.mTitleNormal = "start"; + mStartPlaybackButton.mBounds = buttonRect; + mWidgets.push_back( &mStartPlaybackButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + mStopPlaybackButton.mIsToggle = false; + mStopPlaybackButton.mTitleNormal = "stop"; + mStopPlaybackButton.mBounds = buttonRect; + mWidgets.push_back( &mStopPlaybackButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + buttonRect.x2 -= 30; + mLoopButton.mIsToggle = true; + mLoopButton.mTitleNormal = "loop off"; + mLoopButton.mTitleEnabled = "loop on"; + mLoopButton.setEnabled( mSamplePlayerNode->isLoopEnabled() ); + mLoopButton.mBounds = buttonRect; + mWidgets.push_back( &mLoopButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + mAsyncButton.mIsToggle = true; + mAsyncButton.mTitleNormal = "async off"; + mAsyncButton.mTitleEnabled = "async on"; + mAsyncButton.mBounds = buttonRect; + mWidgets.push_back( &mAsyncButton ); + + buttonRect = Rectf( padding, buttonRect.y2 + padding, padding + buttonRect.getWidth(), buttonRect.y2 + buttonRect.getHeight() + padding ); + mRecordButton.mIsToggle = true; + mRecordButton.mTitleNormal = "record off"; + mRecordButton.mTitleEnabled = "record on"; + mRecordButton.mBounds = buttonRect; + mWidgets.push_back( &mRecordButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + mWriteButton.mIsToggle = false; + mWriteButton.mTitleNormal = "write to file"; + mWriteButton.mBounds = buttonRect; + mWidgets.push_back( &mWriteButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); + mAutoResizeButton.mIsToggle = true; + mAutoResizeButton.mTitleNormal = "auto resize off"; + mAutoResizeButton.mTitleEnabled = "auto resize on"; + mAutoResizeButton.mBounds = buttonRect; + mWidgets.push_back( &mAutoResizeButton ); + + vec2 sliderSize( 200, 30 ); + Rectf selectorRect( getWindowWidth() - sliderSize.x - padding, padding, getWindowWidth() - padding, sliderSize.y * 3 + padding ); + mTestSelector.mSegments.push_back( "BufferPlayerNode" ); + mTestSelector.mSegments.push_back( "FilePlayerNode" ); + mTestSelector.mSegments.push_back( "recorder" ); + mTestSelector.mBounds = selectorRect; + mWidgets.push_back( &mTestSelector ); + + Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); + mGainSlider.mBounds = sliderRect; + mGainSlider.mTitle = "GainNode"; + mGainSlider.set( mGain->getValue() ); + mWidgets.push_back( &mGainSlider ); + + sliderRect += vec2( 0, sliderRect.getHeight() + padding ); + mPanSlider.mBounds = sliderRect; + mPanSlider.mTitle = "Pan"; + mPanSlider.set( mPan->getPos() ); + mWidgets.push_back( &mPanSlider ); + + sliderRect += vec2( 0, sliderRect.getHeight() + padding ); + mLoopBeginSlider.mBounds = sliderRect; + mLoopBeginSlider.mTitle = "Loop Begin"; + mLoopBeginSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); + mLoopBeginSlider.set( (float)mSamplePlayerNode->getLoopBeginTime() ); + mWidgets.push_back( &mLoopBeginSlider ); + + sliderRect += vec2( 0, sliderRect.getHeight() + padding ); + mLoopEndSlider.mBounds = sliderRect; + mLoopEndSlider.mTitle = "Loop End"; + mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); + mLoopEndSlider.set( (float)mSamplePlayerNode->getLoopEndTime() ); + mWidgets.push_back( &mLoopEndSlider ); + + sliderRect += vec2( 0, sliderRect.getHeight() + padding ); + mTriggerDelaySlider.mBounds = sliderRect; + mTriggerDelaySlider.mTitle = "Trigger Delay"; + mTriggerDelaySlider.mMin = 0.0f; // TODO: test negative numbers don't blow up + mTriggerDelaySlider.mMax = 5.0f; + mTriggerDelaySlider.set( 0 ); + mWidgets.push_back( &mTriggerDelaySlider ); + + vec2 xrunSize( 80, 26 ); + mUnderrunRect = Rectf( padding, getWindowHeight() - xrunSize.y - padding, xrunSize.x + padding, getWindowHeight() - padding ); + mOverrunRect = mUnderrunRect + vec2( xrunSize.x + padding, 0 ); + mRecorderOverrunRect = mOverrunRect + vec2( xrunSize.x + padding, 0 ); + + getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); + getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); + getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); + getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { + for( const TouchEvent::Touch &touch : getActiveTouches() ) + processDrag( touch.getPos() ); + } ); + + gl::enableAlphaBlending(); +} + +void SamplePlayerTest::processDrag( ivec2 pos ) +{ + if( mGainSlider.hitTest( pos ) ) + mGain->setValue( mGainSlider.mValueScaled ); + else if( mPanSlider.hitTest( pos ) ) { +#if TEST_STEREO_INPUT_PANNING + mPan->getParamPos()->applyRamp( mPanSlider.mValueScaled, 0.6f ); +#else + mPan->setPos( mPanSlider.mValueScaled ); +#endif + } + else if( mLoopBeginSlider.hitTest( pos ) ) + mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); + else if( mLoopEndSlider.hitTest( pos ) ) + mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled ); + else if( mTriggerDelaySlider.hitTest( pos ) ) { + } + else if( pos.y > getWindowCenter().y ) + seek( pos.x ); +} + +void SamplePlayerTest::processTap( ivec2 pos ) +{ + if( mEnableSamplePlayerNodeButton.hitTest( pos ) ) + mSamplePlayerNode->setEnabled( ! mSamplePlayerNode->isEnabled() ); + else if( mStartPlaybackButton.hitTest( pos ) ) + triggerStartStop( true ); + else if( mStopPlaybackButton.hitTest( pos ) ) + triggerStartStop( false ); + else if( mLoopButton.hitTest( pos ) ) + mSamplePlayerNode->setLoopEnabled( ! mSamplePlayerNode->isLoopEnabled() ); + else if( mRecordButton.hitTest( pos ) ) { + if( mRecordButton.mEnabled ) + mRecorder->start(); + else + mRecorder->disable(); + } + else if( mWriteButton.hitTest( pos ) ) + writeRecordedToFile(); + else if( mAutoResizeButton.hitTest( pos ) ) + ; + else if( mAsyncButton.hitTest( pos ) ) + ; + else if( pos.y > getWindowCenter().y ) + seek( pos.x ); + + size_t currentIndex = mTestSelector.mCurrentSectionIndex; + if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { + string currentTest = mTestSelector.currentSection(); + CI_LOG_V( "selected: " << currentTest ); + + if( currentTest == "BufferPlayerNode" ) + setupBufferPlayerNode(); + if( currentTest == "FilePlayerNode" ) + setupFilePlayerNode(); + if( currentTest == "recorder" ) + setupBufferRecorderNode(); + } +} + +void SamplePlayerTest::seek( size_t xPos ) +{ + mSamplePlayerNode->seek( mSamplePlayerNode->getNumFrames() * xPos / getWindowWidth() ); +} + +void SamplePlayerTest::printBufferSamples( size_t xPos ) +{ + auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); + if( ! bufferPlayer ) + return; + + auto buffer = bufferPlayer->getBuffer(); + size_t step = buffer->getNumFrames() / getWindowWidth(); + size_t xScaled = xPos * step; + CI_LOG_V( "samples starting at " << xScaled << ":" ); + for( int i = 0; i < 100; i++ ) { + if( buffer->getNumChannels() == 1 ) + console() << buffer->getChannel( 0 )[xScaled + i] << ", "; + else + console() << "[" << buffer->getChannel( 0 )[xScaled + i] << ", " << buffer->getChannel( 0 )[xScaled + i] << "], "; + } + console() << endl; +} + +void SamplePlayerTest::printSupportedExtensions() +{ + CI_LOG_V( "supported SourceFile extensions: " ); + for( const auto &ext : audio::SourceFile::getSupportedExtensions() ) + console() << ext << ", "; + + console() << endl; +} + +void SamplePlayerTest::mouseDown( MouseEvent event ) +{ +// printBufferSamples( event.getX() ); +} + +void SamplePlayerTest::keyDown( KeyEvent event ) +{ + if( event.getCode() == KeyEvent::KEY_c ) + testConverter(); + if( event.getCode() == KeyEvent::KEY_w ) + testWrite(); + if( event.getCode() == KeyEvent::KEY_s ) + mSamplePlayerNode->seekToTime( 1.0 ); +} + +void SamplePlayerTest::fileDrop( FileDropEvent event ) +{ + const fs::path &filePath = event.getFile( 0 ); + CI_LOG_V( "File dropped: " << filePath ); + + setSourceFile( loadFile( filePath ) ); + mSamplePlayerNode->seek( 0 ); + + CI_LOG_V( "output samplerate: " << mSourceFile->getSampleRate() ); + + auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); + if( bufferPlayer ) { + bufferPlayer->loadBuffer( mSourceFile->clone() ); + mWaveformPlot.load( bufferPlayer->getBuffer(), getWindowBounds() ); + } + else { + auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); + CI_ASSERT_MSG( filePlayer, "expected sample player to be either BufferPlayerNode or FilePlayerNode" ); + + filePlayer->setSourceFile( mSourceFile->clone() ); + } + + mLoopBeginSlider.mMax = mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); + mLoopBeginSlider.set( mSamplePlayerNode->getLoopBeginTime() ); + mLoopEndSlider.set( mSamplePlayerNode->getLoopEndTime() ); + + CI_LOG_V( "loaded and set new source buffer, channels: " << mSourceFile->getNumChannels() << ", frames: " << mSourceFile->getNumFrames() ); + PRINT_GRAPH( audio::master() ); +} + + +void SamplePlayerTest::update() +{ + // light up rects if an xrun was detected + const float xrunFadeTime = 1.3f; + auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); + if( filePlayer ) { + if( filePlayer->getLastUnderrun() ) + timeline().apply( &mUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); + if( filePlayer->getLastOverrun() ) + timeline().apply( &mOverrunFade, 1.0f, 0.0f, xrunFadeTime ); + } + + // print SamplePlayerNode start / stop times + if( mSamplePlayerNodeEnabledState != mSamplePlayerNode->isEnabled() ) { + mSamplePlayerNodeEnabledState = mSamplePlayerNode->isEnabled(); + string stateStr = mSamplePlayerNodeEnabledState ? "started" : "stopped"; + CI_LOG_V( "mSamplePlayerNode " << stateStr << " at " << getElapsedSeconds() << ", isEof: " << boolalpha << mSamplePlayerNode->isEof() << dec ); + } + + bool testIsRecorder = ( mTestSelector.currentSection() == "recorder" ); + mRecordButton.mHidden = mWriteButton.mHidden = mAutoResizeButton.mHidden = ! testIsRecorder; + + // test auto resizing the Recorder's buffer depending on how full it is + if( testIsRecorder && mAutoResizeButton.mEnabled ) { + CI_ASSERT( mRecorder ); + + size_t writePos = mRecorder->getWritePosition(); + size_t numFrames = mRecorder->getNumFrames(); + + if( writePos + mRecorder->getSampleRate() / 2 > numFrames ) { + size_t resizeFrames = numFrames + mRecorder->getSampleRate(); + CI_LOG_V( "writePos: " << writePos << ", numFrames: " << numFrames << ", resizing frames to: " << resizeFrames ); + mRecorder->setNumFrames( resizeFrames ); + } + + if( mRecorder->getLastOverrun() ) + timeline().apply( &mRecorderOverrunFade, 1.0f, 0.0f, xrunFadeTime ); + } + +} + +void SamplePlayerTest::draw() +{ + gl::clear(); + + if( mTestSelector.currentSection() == "recorder" ) { + audio::BufferRef recordedBuffer = mRecorder->getRecordedCopy(); + drawAudioBuffer( *recordedBuffer, getWindowBounds() ); + } + else { + auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); + if( bufferPlayer ) + mWaveformPlot.draw(); + else if( mMonitor && mMonitor->isInitialized() ) + drawAudioBuffer( mMonitor->getBuffer(), getWindowBounds() ); + + float readPos = (float)getWindowWidth() * mSamplePlayerNode->getReadPosition() / mSamplePlayerNode->getNumFrames(); + gl::color( ColorA( 0, 1, 0, 0.7f ) ); + gl::drawSolidRect( Rectf( readPos - 2, 0, readPos + 2, (float)getWindowHeight() ) ); + } + + if( mUnderrunFade > 0.0001f ) { + gl::color( ColorA( 1, 0.5f, 0, mUnderrunFade ) ); + gl::drawSolidRect( mUnderrunRect ); + gl::drawStringCentered( "play underrun", mUnderrunRect.getCenter(), Color::black() ); + } + if( mOverrunFade > 0.0001f ) { + gl::color( ColorA( 1, 0.5f, 0, mOverrunFade ) ); + gl::drawSolidRect( mOverrunRect ); + gl::drawStringCentered( "play overrun", mOverrunRect.getCenter(), Color::black() ); + } + + if( mRecorderOverrunFade > 0.0001f ) { + gl::color( ColorA( 1, 0.5f, 0, mRecorderOverrunFade ) ); + gl::drawSolidRect( mRecorderOverrunRect ); + gl::drawStringCentered( "rec overrun", mRecorderOverrunRect.getCenter(), Color::black() ); + } +} + +void SamplePlayerTest::testConverter() +{ + audio::BufferRef audioBuffer = mSourceFile->loadBuffer(); + + size_t destSampleRate = 48000; + size_t destChannels = 1; + size_t sourceMaxFramesPerBlock = 512; + auto converter = audio::dsp::Converter::create( mSourceFile->getSampleRate(), destSampleRate, mSourceFile->getNumChannels(), destChannels, sourceMaxFramesPerBlock ); + + CI_LOG_V( "FROM samplerate: " << converter->getSourceSampleRate() << ", channels: " << converter->getSourceNumChannels() << ", frames per block: " << converter->getSourceMaxFramesPerBlock() ); + CI_LOG_V( "TO samplerate: " << converter->getDestSampleRate() << ", channels: " << converter->getDestNumChannels() << ", frames per block: " << converter->getDestMaxFramesPerBlock() ); + + audio::BufferDynamic sourceBuffer( converter->getSourceMaxFramesPerBlock(), converter->getSourceNumChannels() ); + audio::Buffer destBuffer( converter->getDestMaxFramesPerBlock(), converter->getDestNumChannels() ); + + audio::TargetFileRef target = audio::TargetFile::create( "resampled.wav", converter->getDestSampleRate(), converter->getDestNumChannels() ); + + size_t numFramesConverted = 0; + + Timer timer( true ); + + while( numFramesConverted < audioBuffer->getNumFrames() ) { + if( audioBuffer->getNumFrames() - numFramesConverted > sourceMaxFramesPerBlock ) { + for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) + memcpy( sourceBuffer.getChannel( ch ), audioBuffer->getChannel( ch ) + numFramesConverted, sourceMaxFramesPerBlock * sizeof( float ) ); + //copy( audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getChannel( ch ) + numFramesConverted + sourceMaxFramesPerBlock, sourceBuffer.getChannel( ch ) ); + } + else { + // EOF, shrink sourceBuffer to match remaining + sourceBuffer.setNumFrames( audioBuffer->getNumFrames() - numFramesConverted ); + for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) + memcpy( sourceBuffer.getChannel( ch ), audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getNumFrames() * sizeof( float ) ); + //copy( audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getChannel( ch ) + audioBuffer->getNumFrames(), sourceBuffer.getChannel( ch ) ); + } + + pair result = converter->convert( &sourceBuffer, &destBuffer ); + numFramesConverted += result.first; + + target->write( &destBuffer, 0, result.second ); + } + + CI_LOG_V( "seconds: " << timer.getSeconds() ); +} + +void SamplePlayerTest::testWrite() +{ + audio::BufferRef audioBuffer = mSourceFile->loadBuffer(); + + try { + const string fileName = "out.wav"; + audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels() ); // INT_16 + // audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels(), audio::SampleType::FLOAT_32 ); + + CI_LOG_V( "writing " << audioBuffer->getNumFrames() << " frames at samplerate: " << mSourceFile->getSampleRate() << ", num channels: " << mSourceFile->getNumChannels() ); + target->write( audioBuffer.get() ); + CI_LOG_V( "...complete." ); + +// size_t writeCount = 0; +// while( numFramesConverted < audioBuffer->getNumFrames() ) { +// for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) +// copy( audioBuffer->getChannel( ch ) + writeCount, audioBuffer->getChannel( ch ) + writeCount + sourceFormat.getFramesPerBlock(), sourceBuffer.getChannel( ch ) ); +// } + } + catch( audio::AudioFileExc &exc ) { + CI_LOG_E( "AudioFileExc, what: " << exc.what() ); + } +} + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void SamplePlayerTest::updateUI() +{ + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } + + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.h b/test/_audio/AudioTests/src/SamplePlayerTest.h new file mode 100644 index 0000000000..45c9236893 --- /dev/null +++ b/test/_audio/AudioTests/src/SamplePlayerTest.h @@ -0,0 +1,66 @@ +#pragma once + +#include "AudioTest.h" +#include "cinder/Tween.h" + +#include "cinder/audio/Source.h" +#include "cinder/audio/Target.h" +#include "cinder/audio/dsp/Converter.h" +#include "cinder/audio/SamplePlayerNode.h" +#include "cinder/audio/SampleRecorderNode.h" +#include "cinder/audio/NodeEffects.h" +#include "cinder/audio/MonitorNode.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +class SamplePlayerTest : public AudioTest { + public: + SamplePlayerTest(); + + void mouseDown( MouseEvent event ) override; + + //void keyDown( KeyEvent event ) override; + void fileDrop( FileDropEvent event ) override; + + void update() override; + void draw() override; + void updateUI() override; + + private: + void setupBufferPlayerNode(); + void setupFilePlayerNode(); + void setupBufferRecorderNode(); + void setSourceFile( const ci::DataSourceRef &dataSource ); + void writeRecordedToFile(); + void triggerStartStop( bool start ); + + //void setupUI(); + //void processDrag( ivec2 pos ); + //void processTap( ivec2 pos ); + + void seek( size_t xPos ); + void printBufferSamples( size_t xPos ); + void printSupportedExtensions(); + + void testConverter(); + void testWrite(); + + ci::audio::SamplePlayerNodeRef mSamplePlayerNode; + ci::audio::SourceFileRef mSourceFile; + ci::audio::MonitorNodeRef mMonitor; + ci::audio::GainNodeRef mGain; + ci::audio::Pan2dNodeRef mPan; + ci::audio::BufferRecorderNodeRef mRecorder; + + WaveformPlot mWaveformPlot; + + //vector mWidgets; + //Button mEnableSamplePlayerNodeButton, mStartPlaybackButton, mStopPlaybackButton, mLoopButton, mAsyncButton, mRecordButton, mWriteButton, mAutoResizeButton; + //VSelector mTestSelector; + //HSlider mGainSlider, mPanSlider, mLoopBeginSlider, mLoopEndSlider, mTriggerDelaySlider; + + ci::Anim mUnderrunFade, mOverrunFade, mRecorderOverrunFade; + ci::Rectf mUnderrunRect, mOverrunRect, mRecorderOverrunRect; + bool mSamplePlayerNodeEnabledState; + std::future mAsyncLoadFuture; +}; diff --git a/test/_audio/AudioTests/src/SpectralTest.cpp b/test/_audio/AudioTests/src/SpectralTest.cpp new file mode 100644 index 0000000000..2c66e21a58 --- /dev/null +++ b/test/_audio/AudioTests/src/SpectralTest.cpp @@ -0,0 +1,285 @@ +#include "SpectralTest.h" + +#include "cinder/app/App.h" +#include "cinder/app/RendererGl.h" +#include "cinder/Utilities.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" +#include "cinder/gl/gl.h" + +// TODO: make these runtime configurable +#define FFT_SIZE 2048 +#define WINDOW_SIZE 1024 +#define WINDOW_TYPE audio::dsp::WindowType::BLACKMAN + +using namespace ci; +using namespace std; +namespace im = ImGui; + +SpectralTest::SpectralTest() +{ + auto ctx = audio::master(); + + auto format = audio::MonitorSpectralNode::Format().fftSize( FFT_SIZE ).windowSize( WINDOW_SIZE ).windowType( WINDOW_TYPE ); + mMonitorSpectralNode = ctx->makeNode( new audio::MonitorSpectralNode( format ) ); + mMonitorSpectralNode->setAutoEnabled(); + + mGen = ctx->makeNode( new audio::GenSineNode() ); + //mGen = ctx->makeNode( new audio::GenTriangleNode() ); + mGen->setFreq( 440.0f ); + + mSourceFile = audio::load( app::loadAsset( "tone440L220R.mp3" ), ctx->getSampleRate() ); + + auto audioBuffer = mSourceFile->loadBuffer(); + CI_LOG_V( "loaded source buffer, frames: " << audioBuffer->getNumFrames() ); + + mPlayerNode = ctx->makeNode( new audio::BufferPlayerNode( audioBuffer ) ); + + setupSine(); + + setupUI(); + + ctx->enable(); + mEnableGraphButton.setEnabled( true ); + + mScaleDecibelsButton.setEnabled( mSpectrumPlot.getScaleDecibels() ); + + CI_LOG_V( "MonitorSpectralNode fftSize: " << mMonitorSpectralNode->getFftSize() << ", windowSize: " << mMonitorSpectralNode->getWindowSize() ); +} + +void SpectralTest::setupSine() +{ + mGen >> mMonitorSpectralNode >> audio::master()->getOutput(); + if( mPlaybackButton.mEnabled ) + mGen->enable(); +} + +void SpectralTest::setupSineNoOutput() +{ + mGen->connect( mMonitorSpectralNode ); + if( mPlaybackButton.mEnabled ) + mGen->enable(); +} + +void SpectralTest::setupSample() +{ + mPlayerNode >> mMonitorSpectralNode >> audio::master()->getOutput(); + if( mPlaybackButton.mEnabled ) + mPlayerNode->enable(); +} + +#if 0 +void SpectralTest::setupUI() +{ + Rectf buttonRect( 0.0f, 0.0f, 200.0f, mSpectroMargin - 2.0f ); + float padding = 10.0f; + mEnableGraphButton.mIsToggle = true; + mEnableGraphButton.mTitleNormal = "graph off"; + mEnableGraphButton.mTitleEnabled = "graph on"; + mEnableGraphButton.mBounds = buttonRect; + mWidgets.push_back( &mEnableGraphButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); + mPlaybackButton.mIsToggle = true; + mPlaybackButton.mTitleNormal = "play"; + mPlaybackButton.mTitleEnabled = "stop"; + mPlaybackButton.mBounds = buttonRect; + mWidgets.push_back( &mPlaybackButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); + mLoopButton.mIsToggle = true; + mLoopButton.mTitleNormal = "loop off"; + mLoopButton.mTitleEnabled = "loop on"; + mLoopButton.mBounds = buttonRect; + mWidgets.push_back( &mLoopButton ); + + buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); + mScaleDecibelsButton.mIsToggle = true; + mScaleDecibelsButton.mTitleNormal = "linear"; + mScaleDecibelsButton.mTitleEnabled = "decibels"; + mScaleDecibelsButton.mBounds = buttonRect; + mWidgets.push_back( &mScaleDecibelsButton ); + + vec2 sliderSize( 200.0f, 30.0f ); + Rectf selectorRect( getWindowWidth() - sliderSize.x - mSpectroMargin, buttonRect.y2 + padding, getWindowWidth() - mSpectroMargin, buttonRect.y2 + padding + sliderSize.y * 3 ); + mTestSelector.mSegments.push_back( "sine" ); + mTestSelector.mSegments.push_back( "sine (no output)" ); + mTestSelector.mSegments.push_back( "sample" ); + mTestSelector.mBounds = selectorRect; + mWidgets.push_back( &mTestSelector ); + + Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); + mSmoothingFactorSlider.mBounds = sliderRect; + mSmoothingFactorSlider.mTitle = "Smoothing"; + mSmoothingFactorSlider.mMin = 0.0f; + mSmoothingFactorSlider.mMax = 1.0f; + mSmoothingFactorSlider.set( mMonitorSpectralNode->getSmoothingFactor() ); + mWidgets.push_back( &mSmoothingFactorSlider ); + + sliderRect += vec2( 0.0f, sliderSize.y + padding ); + mFreqSlider.mBounds = sliderRect; + mFreqSlider.mTitle = "Sine Freq"; + mFreqSlider.mMin = 0.0f; +// mFreqSlider.mMax = mContext->getSampleRate() / 2.0f; + mFreqSlider.mMax = 800; + mFreqSlider.set( mGen->getFreq() ); + mWidgets.push_back( &mFreqSlider ); + + + getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); + getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); + getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); + getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { + for( const TouchEvent::Touch &touch : getActiveTouches() ) + processDrag( touch.getPos() ); + } ); + + gl::enableAlphaBlending(); +} + +// TODO: currently makes sense to enable processor + tap together - consider making these enabled together. +// - possible solution: add a silent flag that is settable by client +void SpectralTest::processTap( ivec2 pos ) +{ + auto ctx = audio::master(); + if( mEnableGraphButton.hitTest( pos ) ) + ctx->setEnabled( ! ctx->isEnabled() ); + else if( mPlaybackButton.hitTest( pos ) ) { + if( mTestSelector.currentSection() == "sine" || mTestSelector.currentSection() == "sine (no output)" ) + mGen->setEnabled( mPlaybackButton.mEnabled ); + else { + if( mPlaybackButton.mEnabled ) + mPlayerNode->start(); + else + mPlayerNode->stop(); + } + } + else if( mLoopButton.hitTest( pos ) ) + mPlayerNode->setLoopEnabled( ! mPlayerNode->isLoopEnabled() ); + else if( mScaleDecibelsButton.hitTest( pos ) ) + mSpectrumPlot.enableScaleDecibels( ! mSpectrumPlot.getScaleDecibels() ); + else + printBinFreq( pos.x ); + + size_t currentIndex = mTestSelector.mCurrentSectionIndex; + if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { + string currentTest = mTestSelector.currentSection(); + CI_LOG_V( "selected: " << currentTest ); + + bool enabled = ctx->isEnabled(); + ctx->disconnectAllNodes(); + + if( currentTest == "sine" ) + setupSine(); + if( currentTest == "sine (no output)" ) + setupSineNoOutput(); + if( currentTest == "sample" ) + setupSample(); + + ctx->setEnabled( enabled ); + } + +} + +void SpectralTest::processDrag( ivec2 pos ) +{ + if( mSmoothingFactorSlider.hitTest( pos ) ) + mMonitorSpectralNode->setSmoothingFactor( mSmoothingFactorSlider.mValueScaled ); + if( mFreqSlider.hitTest( pos ) ) + mGen->setFreq( mFreqSlider.mValueScaled ); +} + +#endif + +void SpectralTest::fileDrop( FileDropEvent event ) +{ + const fs::path &filePath = event.getFile( 0 ); + CI_LOG_V( "File dropped: " << filePath ); + + mSourceFile = audio::load( loadFile( filePath ), audio::master()->getSampleRate() ); + + mPlayerNode->setBuffer( mSourceFile->loadBuffer() ); + + CI_LOG_V( "loaded and set new source buffer, frames: " << mSourceFile->getNumFrames() ); +} + +void SpectralTest::printBinFreq( size_t xPos ) +{ + if( xPos < mSpectroMargin || xPos > app::getWindowWidth() - mSpectroMargin ) + return; + + // freq = bin * samplerate / sizeFft + + size_t numBins = mMonitorSpectralNode->getFftSize() / 2; + size_t spectroWidth = app::getWindowWidth() - mSpectroMargin * 2; + size_t bin = ( numBins * ( xPos - mSpectroMargin ) ) / spectroWidth; + float freq = bin * audio::master()->getSampleRate() / float( mMonitorSpectralNode->getFftSize() ); + + CI_LOG_V( "bin: " << bin << ", freq: " << freq ); +} + +void SpectralTest::resize() +{ + mSpectrumPlot.setBounds( Rectf( mSpectroMargin, mSpectroMargin, app::getWindowWidth() - mSpectroMargin, app::getWindowHeight() - mSpectroMargin ) ); +} + +void SpectralTest::update() +{ + // update playback button, since the player node may stop itself at the end of a file. + if( mTestSelector.currentSection() == "sample" && ! mPlayerNode->isEnabled() ) + mPlaybackButton.setEnabled( false ); +} + +void SpectralTest::draw() +{ + gl::clear(); + + // draw magnitude spectrum + auto &mag = mMonitorSpectralNode->getMagSpectrum(); + mSpectrumPlot.draw( mag ); + + if( ! mag.empty() ) { + auto min = min_element( mag.begin(), mag.end() ); + auto max = max_element( mag.begin(), mag.end() ); + + string info = string( "min: " ) + toString( *min ) + string( ", max: " ) + toString( *max ); + gl::drawString( info, vec2( mSpectroMargin, getWindowHeight() - 30.0f ) ); + } + + // draw vertical line for spectral centroid + { + float spectralCentroid = mMonitorSpectralNode->getSpectralCentroid(); + float nyquist = (float)audio::master()->getSampleRate() / 2.0f; + Rectf bounds = mSpectrumPlot.getBounds(); + + float freqNormalized = spectralCentroid / nyquist; + float barCenter = bounds.x1 + freqNormalized * bounds.getWidth(); + Rectf bar = { barCenter - 2, bounds.y1, barCenter + 2, bounds.y2 }; + + gl::ScopedColor colorScope( 0.85f, 0.45f, 0, 0.4f ); + gl::drawSolidRect( bar ); + + //if( app::getElapsedFrames() % 30 == 0 ) { + // CI_LOG_I( "spectralCentroid: " << spectralCentroid ); + //} + } + +} + + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void SpectralTest::updateUI() +{ + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } + + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} diff --git a/test/_audio/AudioTests/src/SpectralTest.h b/test/_audio/AudioTests/src/SpectralTest.h new file mode 100644 index 0000000000..ba038fca10 --- /dev/null +++ b/test/_audio/AudioTests/src/SpectralTest.h @@ -0,0 +1,43 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/GenNode.h" +#include "cinder/audio/MonitorNode.h" +#include "cinder/audio/SamplePlayerNode.h" +#include "cinder/audio/dsp/Dsp.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +class SpectralTest : public AudioTest { + public: + SpectralTest(); + + void fileDrop( FileDropEvent event ) override; + void resize() override; + void update() override; + void draw() override; + void updateUI() override; + + private: + void setupSine(); + void setupSineNoOutput(); + void setupSample(); + void setupUI(); + void processTap( ci::ivec2 pos ); + void processDrag( ci::ivec2 pos ); + void printBinFreq( size_t xPos ); + + + ci::audio::BufferPlayerNodeRef mPlayerNode; + ci::audio::GenNodeRef mGen; + ci::audio::MonitorSpectralNodeRef mMonitorSpectralNode; + ci::audio::SourceFileRef mSourceFile; + + //vector mWidgets; + //Button mEnableGraphButton, mPlaybackButton, mLoopButton, mScaleDecibelsButton; + //VSelector mTestSelector; + //HSlider mSmoothingFactorSlider, mFreqSlider; + SpectrumPlot mSpectrumPlot; + float mSpectroMargin = 40; +}; From fd91c73105df3bfbab586af6b065c3745a17c249 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 18 Sep 2024 21:22:48 -0700 Subject: [PATCH 13/38] Samples and Spectral tests building and running --- test/_audio/AudioTests/src/AudioTest.h | 6 +- test/_audio/AudioTests/src/AudioTestsApp.cpp | 14 +- test/_audio/AudioTests/src/DeviceTest.cpp | 12 +- .../_audio/AudioTests/src/NodeEffectsTest.cpp | 1 - .../AudioTests/src/SamplePlayerTest.cpp | 237 +++++++++++------- test/_audio/AudioTests/src/SamplePlayerTest.h | 25 +- test/_audio/AudioTests/src/SpectralTest.cpp | 84 ++++--- test/_audio/AudioTests/src/SpectralTest.h | 18 +- 8 files changed, 239 insertions(+), 158 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTest.h b/test/_audio/AudioTests/src/AudioTest.h index 427c0097d0..a692e987e2 100644 --- a/test/_audio/AudioTests/src/AudioTest.h +++ b/test/_audio/AudioTests/src/AudioTest.h @@ -1,6 +1,9 @@ #pragma once #include "cinder/Vector.h" +#include "cinder/Filesystem.h" + +#include using AudioTestRef = std::shared_ptr; @@ -9,7 +12,8 @@ class AudioTest { virtual void setup() {} virtual void resize() {} - + virtual void openFile( const ci::fs::path &fullPath ) {} + virtual void update() {} virtual void draw() {} virtual void updateUI() {} diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 476d95d01b..9315e0da18 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -41,6 +41,7 @@ class AudioTestsApp : public app::App { public: void setup() override; void keyDown( app::KeyEvent event ) override; + void fileDrop( app::FileDropEvent event ) override; void resize() override; void update() override; void draw() override; @@ -164,6 +165,15 @@ void AudioTestsApp::keyDown( app::KeyEvent event ) //} } +void AudioTestsApp::fileDrop( app::FileDropEvent event ) +{ + if( mCurrentTest ) { + const fs::path &filePath = event.getFile( 0 ); + CI_LOG_I( "opening file: " << filePath ); + mCurrentTest->openFile( filePath ); + } +} + void AudioTestsApp::resize() { if( mCurrentTest ) { @@ -286,12 +296,12 @@ void AudioTestsApp::updateImGui() im::Text( "Audio" ); bool audioEnabled = audio::master()->isEnabled(); - if( im::Checkbox( "enabled", &audioEnabled ) ) { + if( im::Checkbox( "enabled ('/')", &audioEnabled ) ) { audio::master()->setEnabled( audioEnabled ); } static vector sTests = mTestFactory.getAllKeys(); - if( im::Combo( "tests", &mCurrenTestIndex, sTests, sTests.size() ) ) { + if( im::Combo( "tests", &mCurrenTestIndex, sTests ) ) { reload(); } diff --git a/test/_audio/AudioTests/src/DeviceTest.cpp b/test/_audio/AudioTests/src/DeviceTest.cpp index 3b368bb5fd..078ff2cf49 100644 --- a/test/_audio/AudioTests/src/DeviceTest.cpp +++ b/test/_audio/AudioTests/src/DeviceTest.cpp @@ -532,10 +532,6 @@ void DeviceTest::setupSubTest( const string &test ) audio::ScopedEnableContext disableContext( audio::master(), false ); mGain->disconnectAllInputs(); - if( im::Button( "record" ) ) { - startRecording(); - } - if( test == "sinewave" ) setupSine(); else if( test == "noise" ) @@ -685,11 +681,9 @@ void DeviceTest::updateUI() mGain->setValue( gain ); } - auto ctx = audio::master(); - - int sampleRate = ctx->getSampleRate(); - - int framesPerBlock = ctx->getFramesPerBlock(); + if( im::Button( "record" ) ) { + startRecording(); + } if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp index f9a05cf4b3..cbb6b5de98 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.cpp +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -31,7 +31,6 @@ NodeEffectsTest::NodeEffectsTest() //setupEcho(); } - void NodeEffectsTest::setupSubTest( const string &testName ) { auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.cpp b/test/_audio/AudioTests/src/SamplePlayerTest.cpp index 890f2c27a7..4eaac66a0d 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.cpp +++ b/test/_audio/AudioTests/src/SamplePlayerTest.cpp @@ -4,6 +4,7 @@ #include "cinder/Timeline.h" #include "cinder/Timer.h" #include "cinder/Log.h" +#include "cinder/gl/draw.h" #include "cinder/CinderImGui.h" #define TEST_STEREO_INPUT_PANNING 0 @@ -15,6 +16,12 @@ namespace im = ImGui; SamplePlayerTest::SamplePlayerTest() { + mSubTests = { + "BufferPlayerNode", + "FilePlayerNode", + "recorder", + }; + mUnderrunFade = mOverrunFade = mRecorderOverrunFade = 0; mSamplePlayerNodeEnabledState = false; @@ -25,6 +32,8 @@ SamplePlayerTest::SamplePlayerTest() auto ctx = audio::master(); mPan = ctx->makeNode( new audio::Pan2dNode() ); + + // TODO: make a runtime bool and move this to makeNodes() method that can be triggered from gui #if TEST_STEREO_INPUT_PANNING mPan->setStereoInputModeEnabled( true ); #endif @@ -37,10 +46,29 @@ SamplePlayerTest::SamplePlayerTest() setupBufferPlayerNode(); // setupFilePlayerNode(); - ctx->enable(); - mEnableSamplePlayerNodeButton.setEnabled( true ); + //ctx->enable(); + + //CI_LOG_V( "context samplerate: " << ctx->getSampleRate() ); +} + +void SamplePlayerTest::setupSubTest( const string &testName ) +{ + auto ctx = audio::master(); + + bool enabled = ctx->isEnabled(); + ctx->disable(); + ctx->disconnectAllNodes(); + + if( testName == "BufferPlayerNode" ) + setupBufferPlayerNode(); + else if( testName == "FilePlayerNode" ) + setupFilePlayerNode(); + else if( testName == "recorder" ) + setupBufferRecorderNode(); + + ctx->setEnabled( enabled ); - CI_LOG_V( "context samplerate: " << ctx->getSampleRate() ); + CI_LOG_I( "Finished setup for test: " << testName ); } void SamplePlayerTest::setupBufferPlayerNode() @@ -55,22 +83,22 @@ void SamplePlayerTest::setupBufferPlayerNode() }; auto connectFn = [bufferPlayer, this] { + bool loopEnabled = mSamplePlayerNode ? mSamplePlayerNode->isLoopEnabled() : false; + mGain->disconnectAllInputs(); mSamplePlayerNode = bufferPlayer; mSamplePlayerNode >> mGain >> mPan >> audio::master()->getOutput(); - //PRINT_GRAPH( audio::master() ); - mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); + + mSamplePlayerNode->setLoopEnabled( loopEnabled ); + mSamplePlayerNode->setLoopBeginTime( 0 ); + mSamplePlayerNode->setLoopEndTime( mSamplePlayerNode->getNumSeconds() ); }; - bool asyncLoad = mAsyncButton.mEnabled; - CI_LOG_V( "async load: " << boolalpha << asyncLoad << dec ); - if( asyncLoad ) { + if( mLoadAsync ) { mWaveformPlot.clear(); mAsyncLoadFuture = std::async( [=] { loadFn(); - dispatchAsync( [=] { + app::App::get()->dispatchAsync( [=] { connectFn(); } ); } ); @@ -83,14 +111,16 @@ void SamplePlayerTest::setupBufferPlayerNode() void SamplePlayerTest::setupFilePlayerNode() { + bool loopEnabled = mSamplePlayerNode ? mSamplePlayerNode->isLoopEnabled() : false; + double loopBegin = mSamplePlayerNode ? mSamplePlayerNode->getLoopBeginTime() : 0.0; + double loopEnd = mSamplePlayerNode ? mSamplePlayerNode->getLoopEndTime() : 0.0; + mGain->disconnectAllInputs(); auto ctx = audio::master(); // mSourceFile->setMaxFramesPerRead( 8192 ); - bool asyncRead = mAsyncButton.mEnabled; - CI_LOG_V( "async read: " << asyncRead ); - mSamplePlayerNode = ctx->makeNode( new audio::FilePlayerNode( mSourceFile->clone(), asyncRead ) ); + mSamplePlayerNode = ctx->makeNode( new audio::FilePlayerNode( mSourceFile->clone(), mLoadAsync ) ); // TODO: it is pretty surprising when you recreate mMonitor here without checking if there has already been one added. // - user will no longer see the old mMonitor, but the context still owns a reference to it, so another gets added each time we call this method. @@ -103,11 +133,9 @@ void SamplePlayerTest::setupFilePlayerNode() mSamplePlayerNode >> mGain >> mPan >> ctx->getOutput(); mPan >> mMonitor; - mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); - - PRINT_GRAPH( audio::master() ); + mSamplePlayerNode->setLoopEnabled( loopEnabled ); + mSamplePlayerNode->setLoopBeginTime( loopBegin ); + mSamplePlayerNode->setLoopEndTime( loopEnd ); } void SamplePlayerTest::setupBufferRecorderNode() @@ -120,22 +148,20 @@ void SamplePlayerTest::setupBufferRecorderNode() CI_ASSERT( mSamplePlayerNode ); mSamplePlayerNode >> mRecorder; - - PRINT_GRAPH( audio::master() ); } void SamplePlayerTest::setSourceFile( const DataSourceRef &dataSource ) { mSourceFile = audio::load( dataSource, audio::master()->getSampleRate() ); - getWindow()->setTitle( dataSource->getFilePath().filename().string() ); + app::getWindow()->setTitle( dataSource->getFilePath().filename().string() ); - CI_LOG_V( "SourceFile info: " ); - console() << "samplerate: " << mSourceFile->getSampleRate() << endl; - console() << "native samplerate: " << mSourceFile->getSampleRateNative() << endl; - console() << "channels: " << mSourceFile->getNumChannels() << endl; - console() << "frames: " << mSourceFile->getNumFrames() << endl; - console() << "metadata:\n" << mSourceFile->getMetaData() << endl; + CI_LOG_I( "SourceFile info: " ); + app::console() << "samplerate: " << mSourceFile->getSampleRate() << endl; + app::console() << "native samplerate: " << mSourceFile->getSampleRateNative() << endl; + app::console() << "channels: " << mSourceFile->getNumChannels() << endl; + app::console() << "frames: " << mSourceFile->getNumFrames() << endl; + app::console() << "metadata:\n" << mSourceFile->getMetaData() << endl; } void SamplePlayerTest::writeRecordedToFile() @@ -150,18 +176,17 @@ void SamplePlayerTest::writeRecordedToFile() void SamplePlayerTest::triggerStartStop( bool start ) { - float delaySeconds = mTriggerDelaySlider.mValueScaled; - if( delaySeconds <= 0.001f ) { + if( mTriggerDelaySeconds <= 0.001f ) { if( start ) mSamplePlayerNode->start(); else mSamplePlayerNode->stop(); } else { - CI_LOG_V( "scheduling " << ( start ? "start" : "stop" ) << " with delay: " << delaySeconds + CI_LOG_I( "scheduling " << ( start ? "start" : "stop" ) << " with delay: " << mTriggerDelaySeconds << "\n\tprocessed frames: " << audio::master()->getNumProcessedFrames() << ", seconds: " << audio::master()->getNumProcessedSeconds() ); - double when = audio::master()->getNumProcessedSeconds() + delaySeconds; + double when = audio::master()->getNumProcessedSeconds() + (double)mTriggerDelaySeconds; if( start ) mSamplePlayerNode->start( when ); else @@ -169,6 +194,7 @@ void SamplePlayerTest::triggerStartStop( bool start ) } } +#if 0 void SamplePlayerTest::setupUI() { const float padding = 6.0f; @@ -345,10 +371,11 @@ void SamplePlayerTest::processTap( ivec2 pos ) setupBufferRecorderNode(); } } +#endif void SamplePlayerTest::seek( size_t xPos ) { - mSamplePlayerNode->seek( mSamplePlayerNode->getNumFrames() * xPos / getWindowWidth() ); + mSamplePlayerNode->seek( mSamplePlayerNode->getNumFrames() * xPos / app::getWindowWidth() ); } void SamplePlayerTest::printBufferSamples( size_t xPos ) @@ -358,56 +385,48 @@ void SamplePlayerTest::printBufferSamples( size_t xPos ) return; auto buffer = bufferPlayer->getBuffer(); - size_t step = buffer->getNumFrames() / getWindowWidth(); + size_t step = buffer->getNumFrames() / app::getWindowWidth(); size_t xScaled = xPos * step; - CI_LOG_V( "samples starting at " << xScaled << ":" ); + CI_LOG_I( "samples starting at " << xScaled << ":" ); for( int i = 0; i < 100; i++ ) { if( buffer->getNumChannels() == 1 ) - console() << buffer->getChannel( 0 )[xScaled + i] << ", "; + app::console() << buffer->getChannel( 0 )[xScaled + i] << ", "; else - console() << "[" << buffer->getChannel( 0 )[xScaled + i] << ", " << buffer->getChannel( 0 )[xScaled + i] << "], "; + app::console() << "[" << buffer->getChannel( 0 )[xScaled + i] << ", " << buffer->getChannel( 0 )[xScaled + i] << "], "; } - console() << endl; + app::console() << endl; } void SamplePlayerTest::printSupportedExtensions() { - CI_LOG_V( "supported SourceFile extensions: " ); + CI_LOG_I( "supported SourceFile extensions: " ); for( const auto &ext : audio::SourceFile::getSupportedExtensions() ) - console() << ext << ", "; - - console() << endl; -} - -void SamplePlayerTest::mouseDown( MouseEvent event ) -{ -// printBufferSamples( event.getX() ); -} + app::console() << ext << ", "; -void SamplePlayerTest::keyDown( KeyEvent event ) -{ - if( event.getCode() == KeyEvent::KEY_c ) - testConverter(); - if( event.getCode() == KeyEvent::KEY_w ) - testWrite(); - if( event.getCode() == KeyEvent::KEY_s ) - mSamplePlayerNode->seekToTime( 1.0 ); + app::console() << endl; } -void SamplePlayerTest::fileDrop( FileDropEvent event ) +// TODO: if mLoadAsync is true then use std::async like in setupBufferPlayerNode() +// - for setSourceFile() +// - for bufferPlayer->loadBuffer() +void SamplePlayerTest::openFile( const ci::fs::path &fullPath ) { - const fs::path &filePath = event.getFile( 0 ); - CI_LOG_V( "File dropped: " << filePath ); + try { + setSourceFile( loadFile( fullPath ) ); + CI_LOG_I( "loaded and set new source buffer, frames: " << mSourceFile->getNumFrames() ); + } + catch( exception &e ) { + CI_LOG_EXCEPTION( "failed to load sample file at path: " << fullPath, e ); + } - setSourceFile( loadFile( filePath ) ); mSamplePlayerNode->seek( 0 ); - CI_LOG_V( "output samplerate: " << mSourceFile->getSampleRate() ); + CI_LOG_I( "output samplerate: " << mSourceFile->getSampleRate() ); auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); if( bufferPlayer ) { bufferPlayer->loadBuffer( mSourceFile->clone() ); - mWaveformPlot.load( bufferPlayer->getBuffer(), getWindowBounds() ); + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); } else { auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); @@ -416,15 +435,11 @@ void SamplePlayerTest::fileDrop( FileDropEvent event ) filePlayer->setSourceFile( mSourceFile->clone() ); } - mLoopBeginSlider.mMax = mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopBeginSlider.set( mSamplePlayerNode->getLoopBeginTime() ); - mLoopEndSlider.set( mSamplePlayerNode->getLoopEndTime() ); + mSamplePlayerNode->setLoopEndTime( mSamplePlayerNode->getNumSeconds() ); - CI_LOG_V( "loaded and set new source buffer, channels: " << mSourceFile->getNumChannels() << ", frames: " << mSourceFile->getNumFrames() ); - PRINT_GRAPH( audio::master() ); + CI_LOG_I( "loaded and set new source buffer, channels: " << mSourceFile->getNumChannels() << ", frames: " << mSourceFile->getNumFrames() ); } - void SamplePlayerTest::update() { // light up rects if an xrun was detected @@ -432,23 +447,20 @@ void SamplePlayerTest::update() auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); if( filePlayer ) { if( filePlayer->getLastUnderrun() ) - timeline().apply( &mUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); + app::timeline().apply( &mUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); if( filePlayer->getLastOverrun() ) - timeline().apply( &mOverrunFade, 1.0f, 0.0f, xrunFadeTime ); + app::timeline().apply( &mOverrunFade, 1.0f, 0.0f, xrunFadeTime ); } - // print SamplePlayerNode start / stop times + // testing delayed trigger: print SamplePlayerNode start / stop times if( mSamplePlayerNodeEnabledState != mSamplePlayerNode->isEnabled() ) { mSamplePlayerNodeEnabledState = mSamplePlayerNode->isEnabled(); string stateStr = mSamplePlayerNodeEnabledState ? "started" : "stopped"; - CI_LOG_V( "mSamplePlayerNode " << stateStr << " at " << getElapsedSeconds() << ", isEof: " << boolalpha << mSamplePlayerNode->isEof() << dec ); + CI_LOG_I( "mSamplePlayerNode " << stateStr << " at " << app::getElapsedSeconds() << ", isEof: " << boolalpha << mSamplePlayerNode->isEof() << dec ); } - bool testIsRecorder = ( mTestSelector.currentSection() == "recorder" ); - mRecordButton.mHidden = mWriteButton.mHidden = mAutoResizeButton.mHidden = ! testIsRecorder; - // test auto resizing the Recorder's buffer depending on how full it is - if( testIsRecorder && mAutoResizeButton.mEnabled ) { + if( ( mSubTests[mCurrentSubTest] == "recorder" ) && mRecordAutoResize ) { CI_ASSERT( mRecorder ); size_t writePos = mRecorder->getWritePosition(); @@ -456,12 +468,12 @@ void SamplePlayerTest::update() if( writePos + mRecorder->getSampleRate() / 2 > numFrames ) { size_t resizeFrames = numFrames + mRecorder->getSampleRate(); - CI_LOG_V( "writePos: " << writePos << ", numFrames: " << numFrames << ", resizing frames to: " << resizeFrames ); + CI_LOG_I( "writePos: " << writePos << ", numFrames: " << numFrames << ", resizing frames to: " << resizeFrames ); mRecorder->setNumFrames( resizeFrames ); } if( mRecorder->getLastOverrun() ) - timeline().apply( &mRecorderOverrunFade, 1.0f, 0.0f, xrunFadeTime ); + app::timeline().apply( &mRecorderOverrunFade, 1.0f, 0.0f, xrunFadeTime ); } } @@ -470,20 +482,20 @@ void SamplePlayerTest::draw() { gl::clear(); - if( mTestSelector.currentSection() == "recorder" ) { + if( mSubTests[mCurrentSubTest] == "recorder" ) { audio::BufferRef recordedBuffer = mRecorder->getRecordedCopy(); - drawAudioBuffer( *recordedBuffer, getWindowBounds() ); + drawAudioBuffer( *recordedBuffer, app::getWindowBounds() ); } else { auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); if( bufferPlayer ) mWaveformPlot.draw(); else if( mMonitor && mMonitor->isInitialized() ) - drawAudioBuffer( mMonitor->getBuffer(), getWindowBounds() ); + drawAudioBuffer( mMonitor->getBuffer(), app::getWindowBounds() ); - float readPos = (float)getWindowWidth() * mSamplePlayerNode->getReadPosition() / mSamplePlayerNode->getNumFrames(); + float readPos = (float)app::getWindowWidth() * mSamplePlayerNode->getReadPosition() / mSamplePlayerNode->getNumFrames(); gl::color( ColorA( 0, 1, 0, 0.7f ) ); - gl::drawSolidRect( Rectf( readPos - 2, 0, readPos + 2, (float)getWindowHeight() ) ); + gl::drawSolidRect( Rectf( readPos - 2, 0, readPos + 2, (float)app::getWindowHeight() ) ); } if( mUnderrunFade > 0.0001f ) { @@ -496,7 +508,6 @@ void SamplePlayerTest::draw() gl::drawSolidRect( mOverrunRect ); gl::drawStringCentered( "play overrun", mOverrunRect.getCenter(), Color::black() ); } - if( mRecorderOverrunFade > 0.0001f ) { gl::color( ColorA( 1, 0.5f, 0, mRecorderOverrunFade ) ); gl::drawSolidRect( mRecorderOverrunRect ); @@ -513,8 +524,8 @@ void SamplePlayerTest::testConverter() size_t sourceMaxFramesPerBlock = 512; auto converter = audio::dsp::Converter::create( mSourceFile->getSampleRate(), destSampleRate, mSourceFile->getNumChannels(), destChannels, sourceMaxFramesPerBlock ); - CI_LOG_V( "FROM samplerate: " << converter->getSourceSampleRate() << ", channels: " << converter->getSourceNumChannels() << ", frames per block: " << converter->getSourceMaxFramesPerBlock() ); - CI_LOG_V( "TO samplerate: " << converter->getDestSampleRate() << ", channels: " << converter->getDestNumChannels() << ", frames per block: " << converter->getDestMaxFramesPerBlock() ); + CI_LOG_I( "FROM samplerate: " << converter->getSourceSampleRate() << ", channels: " << converter->getSourceNumChannels() << ", frames per block: " << converter->getSourceMaxFramesPerBlock() ); + CI_LOG_I( "TO samplerate: " << converter->getDestSampleRate() << ", channels: " << converter->getDestNumChannels() << ", frames per block: " << converter->getDestMaxFramesPerBlock() ); audio::BufferDynamic sourceBuffer( converter->getSourceMaxFramesPerBlock(), converter->getSourceNumChannels() ); audio::Buffer destBuffer( converter->getDestMaxFramesPerBlock(), converter->getDestNumChannels() ); @@ -545,7 +556,7 @@ void SamplePlayerTest::testConverter() target->write( &destBuffer, 0, result.second ); } - CI_LOG_V( "seconds: " << timer.getSeconds() ); + CI_LOG_I( "seconds: " << timer.getSeconds() ); } void SamplePlayerTest::testWrite() @@ -557,9 +568,9 @@ void SamplePlayerTest::testWrite() audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels() ); // INT_16 // audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels(), audio::SampleType::FLOAT_32 ); - CI_LOG_V( "writing " << audioBuffer->getNumFrames() << " frames at samplerate: " << mSourceFile->getSampleRate() << ", num channels: " << mSourceFile->getNumChannels() ); + CI_LOG_I( "writing " << audioBuffer->getNumFrames() << " frames at samplerate: " << mSourceFile->getSampleRate() << ", num channels: " << mSourceFile->getNumChannels() ); target->write( audioBuffer.get() ); - CI_LOG_V( "...complete." ); + CI_LOG_I( "...complete." ); // size_t writeCount = 0; // while( numFramesConverted < audioBuffer->getNumFrames() ) { @@ -582,7 +593,55 @@ void SamplePlayerTest::updateUI() if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { mGain->setValue( gain ); } + float pan = mPan->getPos(); + if( im::SliderFloat( "pan", &pan, 0, 1 ) ) { + mPan->setPos( pan ); + } + + im::Checkbox( "load async", &mLoadAsync ); + + im::Separator(); + im::Text( "SamplePlayer" ); + if( mSamplePlayerNode ) { + bool playerEnabled = mSamplePlayerNode->isEnabled(); + if( im::Checkbox( "enabled", &playerEnabled ) ) { + mSamplePlayerNode->setEnabled( playerEnabled ); + } + im::SameLine(); + bool loopEnabled = mSamplePlayerNode->isLoopEnabled(); + if( im::Checkbox( "loop", &loopEnabled ) ) { + mSamplePlayerNode->setLoopEnabled( loopEnabled ); + } + float readPos = (float)mSamplePlayerNode->getReadPositionTime(); + if( im::SliderFloat( "read pos (s)", &readPos, 0, mSamplePlayerNode->getNumSeconds() ) ) { + mSamplePlayerNode->seekToTime( readPos ); + } + float loopBegin = (float)mSamplePlayerNode->getLoopBeginTime(); + float loopEnd = (float)mSamplePlayerNode->getLoopEndTime(); + if( im::SliderFloat( "loop begin (s)", &loopBegin, 0, mSamplePlayerNode->getNumSeconds() ) ) { + loopBegin - min( loopBegin, loopEnd ); + mSamplePlayerNode->setLoopBeginTime( loopBegin ); + } + if( im::SliderFloat( "loop end (s)", &loopEnd, 0, mSamplePlayerNode->getNumSeconds() ) ) { + loopEnd = max( loopBegin, loopEnd ); + mSamplePlayerNode->setLoopEndTime( loopEnd ); + } + } + + im::Separator(); + im::DragFloat( "start / stop delay (s)", &mTriggerDelaySeconds, 0.02f, 0.0f, 5.0f ); + + if( mSubTests[mCurrentSubTest] == "recorder" ) { + im::Separator(); + im::Text( "Recording" ); + im::Checkbox( "record", &mRecording ); + im::SameLine(); + im::Checkbox( "auto-resize", &mRecordAutoResize ); + if( im::Button( "write to file" ) ) { + writeRecordedToFile(); + } + } if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.h b/test/_audio/AudioTests/src/SamplePlayerTest.h index 45c9236893..798773caac 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.h +++ b/test/_audio/AudioTests/src/SamplePlayerTest.h @@ -17,16 +17,13 @@ class SamplePlayerTest : public AudioTest { public: SamplePlayerTest(); - void mouseDown( MouseEvent event ) override; - - //void keyDown( KeyEvent event ) override; - void fileDrop( FileDropEvent event ) override; - + void openFile( const ci::fs::path &fullPath ) override; void update() override; void draw() override; void updateUI() override; private: + void setupSubTest( const std::string &testName ); void setupBufferPlayerNode(); void setupFilePlayerNode(); void setupBufferRecorderNode(); @@ -34,10 +31,6 @@ class SamplePlayerTest : public AudioTest { void writeRecordedToFile(); void triggerStartStop( bool start ); - //void setupUI(); - //void processDrag( ivec2 pos ); - //void processTap( ivec2 pos ); - void seek( size_t xPos ); void printBufferSamples( size_t xPos ); void printSupportedExtensions(); @@ -54,13 +47,15 @@ class SamplePlayerTest : public AudioTest { WaveformPlot mWaveformPlot; - //vector mWidgets; - //Button mEnableSamplePlayerNodeButton, mStartPlaybackButton, mStopPlaybackButton, mLoopButton, mAsyncButton, mRecordButton, mWriteButton, mAutoResizeButton; - //VSelector mTestSelector; - //HSlider mGainSlider, mPanSlider, mLoopBeginSlider, mLoopEndSlider, mTriggerDelaySlider; + std::vector mSubTests; + int mCurrentSubTest = 0; - ci::Anim mUnderrunFade, mOverrunFade, mRecorderOverrunFade; - ci::Rectf mUnderrunRect, mOverrunRect, mRecorderOverrunRect; + ci::Anim mUnderrunFade, mOverrunFade, mRecorderOverrunFade; + ci::Rectf mUnderrunRect, mOverrunRect, mRecorderOverrunRect; bool mSamplePlayerNodeEnabledState; + bool mLoadAsync = false; + bool mRecording = false; + bool mRecordAutoResize = true; + float mTriggerDelaySeconds = 1.0f; std::future mAsyncLoadFuture; }; diff --git a/test/_audio/AudioTests/src/SpectralTest.cpp b/test/_audio/AudioTests/src/SpectralTest.cpp index 2c66e21a58..97a6dc3185 100644 --- a/test/_audio/AudioTests/src/SpectralTest.cpp +++ b/test/_audio/AudioTests/src/SpectralTest.cpp @@ -7,6 +7,8 @@ #include "cinder/CinderImGui.h" #include "cinder/gl/gl.h" +#include "cinder/audio/Context.h" + // TODO: make these runtime configurable #define FFT_SIZE 2048 #define WINDOW_SIZE 1024 @@ -18,6 +20,12 @@ namespace im = ImGui; SpectralTest::SpectralTest() { + mSubTests = { + "sine", + "sine (no output)", + "sample", + }; + auto ctx = audio::master(); auto format = audio::MonitorSpectralNode::Format().fftSize( FFT_SIZE ).windowSize( WINDOW_SIZE ).windowType( WINDOW_TYPE ); @@ -37,34 +45,47 @@ SpectralTest::SpectralTest() setupSine(); - setupUI(); + CI_LOG_V( "MonitorSpectralNode fftSize: " << mMonitorSpectralNode->getFftSize() << ", windowSize: " << mMonitorSpectralNode->getWindowSize() ); +} - ctx->enable(); - mEnableGraphButton.setEnabled( true ); +void SpectralTest::setupSubTest( const string &testName ) +{ + auto ctx = audio::master(); - mScaleDecibelsButton.setEnabled( mSpectrumPlot.getScaleDecibels() ); + bool enabled = ctx->isEnabled(); + ctx->disable(); + ctx->disconnectAllNodes(); - CI_LOG_V( "MonitorSpectralNode fftSize: " << mMonitorSpectralNode->getFftSize() << ", windowSize: " << mMonitorSpectralNode->getWindowSize() ); + if( testName == "sine" ) + setupSine(); + else if( testName == "sine (no output)" ) + setupSineNoOutput(); + else if( testName == "sample" ) + setupSample(); + + ctx->setEnabled( enabled ); + + CI_LOG_I( "Finished setup for test: " << testName ); } void SpectralTest::setupSine() { mGen >> mMonitorSpectralNode >> audio::master()->getOutput(); - if( mPlaybackButton.mEnabled ) + if( mPlaybackEnabled ) mGen->enable(); } void SpectralTest::setupSineNoOutput() { mGen->connect( mMonitorSpectralNode ); - if( mPlaybackButton.mEnabled ) + if( mPlaybackEnabled ) mGen->enable(); } void SpectralTest::setupSample() { mPlayerNode >> mMonitorSpectralNode >> audio::master()->getOutput(); - if( mPlaybackButton.mEnabled ) + if( mPlaybackEnabled ) mPlayerNode->enable(); } @@ -178,7 +199,6 @@ void SpectralTest::processTap( ivec2 pos ) ctx->setEnabled( enabled ); } - } void SpectralTest::processDrag( ivec2 pos ) @@ -191,24 +211,24 @@ void SpectralTest::processDrag( ivec2 pos ) #endif -void SpectralTest::fileDrop( FileDropEvent event ) +void SpectralTest::openFile( const ci::fs::path &fullPath ) { - const fs::path &filePath = event.getFile( 0 ); - CI_LOG_V( "File dropped: " << filePath ); - - mSourceFile = audio::load( loadFile( filePath ), audio::master()->getSampleRate() ); - - mPlayerNode->setBuffer( mSourceFile->loadBuffer() ); - - CI_LOG_V( "loaded and set new source buffer, frames: " << mSourceFile->getNumFrames() ); + try { + mSourceFile = audio::load( loadFile( fullPath ), audio::master()->getSampleRate() ); + mPlayerNode->setBuffer( mSourceFile->loadBuffer() ); + CI_LOG_I( "loaded and set new source buffer, frames: " << mSourceFile->getNumFrames() ); + } + catch( exception &e ) { + CI_LOG_EXCEPTION( "failed to load sample file at path: " << fullPath, e ); + } } +// freq = bin * samplerate / sizeFft void SpectralTest::printBinFreq( size_t xPos ) { if( xPos < mSpectroMargin || xPos > app::getWindowWidth() - mSpectroMargin ) return; - // freq = bin * samplerate / sizeFft size_t numBins = mMonitorSpectralNode->getFftSize() / 2; size_t spectroWidth = app::getWindowWidth() - mSpectroMargin * 2; @@ -223,17 +243,8 @@ void SpectralTest::resize() mSpectrumPlot.setBounds( Rectf( mSpectroMargin, mSpectroMargin, app::getWindowWidth() - mSpectroMargin, app::getWindowHeight() - mSpectroMargin ) ); } -void SpectralTest::update() -{ - // update playback button, since the player node may stop itself at the end of a file. - if( mTestSelector.currentSection() == "sample" && ! mPlayerNode->isEnabled() ) - mPlaybackButton.setEnabled( false ); -} - void SpectralTest::draw() { - gl::clear(); - // draw magnitude spectrum auto &mag = mMonitorSpectralNode->getMagSpectrum(); mSpectrumPlot.draw( mag ); @@ -243,7 +254,7 @@ void SpectralTest::draw() auto max = max_element( mag.begin(), mag.end() ); string info = string( "min: " ) + toString( *min ) + string( ", max: " ) + toString( *max ); - gl::drawString( info, vec2( mSpectroMargin, getWindowHeight() - 30.0f ) ); + gl::drawString( info, vec2( mSpectroMargin, app::getWindowHeight() - 30.0f ) ); } // draw vertical line for spectral centroid @@ -259,11 +270,7 @@ void SpectralTest::draw() gl::ScopedColor colorScope( 0.85f, 0.45f, 0, 0.4f ); gl::drawSolidRect( bar ); - //if( app::getElapsedFrames() % 30 == 0 ) { - // CI_LOG_I( "spectralCentroid: " << spectralCentroid ); - //} } - } @@ -273,11 +280,16 @@ void SpectralTest::draw() void SpectralTest::updateUI() { - float gain = mGain->getValue(); - if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { - mGain->setValue( gain ); + //float gain = mGain->getValue(); + //if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + // mGain->setValue( gain ); + //} + + if( im::Checkbox( "play", &mPlaybackEnabled ) ) { + mGen->enable(); } + im::Text( "spectral centroid: %0.3f", mMonitorSpectralNode->getSpectralCentroid() ); if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); diff --git a/test/_audio/AudioTests/src/SpectralTest.h b/test/_audio/AudioTests/src/SpectralTest.h index ba038fca10..beb656b263 100644 --- a/test/_audio/AudioTests/src/SpectralTest.h +++ b/test/_audio/AudioTests/src/SpectralTest.h @@ -13,13 +13,13 @@ class SpectralTest : public AudioTest { public: SpectralTest(); - void fileDrop( FileDropEvent event ) override; + void openFile( const ci::fs::path &fullPath ) override; void resize() override; - void update() override; void draw() override; void updateUI() override; private: + void setupSubTest( const std::string &testName ); void setupSine(); void setupSineNoOutput(); void setupSample(); @@ -34,10 +34,18 @@ class SpectralTest : public AudioTest { ci::audio::MonitorSpectralNodeRef mMonitorSpectralNode; ci::audio::SourceFileRef mSourceFile; - //vector mWidgets; - //Button mEnableGraphButton, mPlaybackButton, mLoopButton, mScaleDecibelsButton; - //VSelector mTestSelector; + std::vector mSubTests; + int mCurrentSubTest = 0; + + // TODO: add gui for these + //Button mLoopButton, mScaleDecibelsButton; //HSlider mSmoothingFactorSlider, mFreqSlider; + SpectrumPlot mSpectrumPlot; float mSpectroMargin = 40; + bool mUseScaleDecibels = true; + bool mPlaybackEnabled = false; + bool mLoopEnabled = false; + float mLoopBegin = 0; + float mLoopEnd = 1; }; From a6a9c2df7da60a2a9a4323e5376b60e6ef7a831c Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 24 Sep 2024 22:02:44 -0700 Subject: [PATCH 14/38] switched Factory's internal storage to std::vector so order added is retained --- test/_audio/AudioTests/src/Factory.h | 33 +++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/test/_audio/AudioTests/src/Factory.h b/test/_audio/AudioTests/src/Factory.h index 15be492d7a..af675dace6 100644 --- a/test/_audio/AudioTests/src/Factory.h +++ b/test/_audio/AudioTests/src/Factory.h @@ -23,8 +23,9 @@ #include "cinder/Exception.h" -#include +#include #include +#include #include namespace mason { @@ -37,7 +38,10 @@ class FactoryException : public cinder::Exception { {} }; -//! Allows for constructing shared_ptr objects by string, passing \a Args to T's constructor. +//! Utility for constructing shared_ptr objects by string, passing \a Args to T's constructor. +//! Keys are stored internally using a std::vector to preserve the order that they were added, +//! which can be useful for showing in GUIs or selecting by index. +//! The resulting object gets built as `T( args... )` template class Factory { public: @@ -47,27 +51,25 @@ class Factory { { static_assert( std::is_base_of::value, "Y must inherit from T" ); - mBuilderMap[key] = Builder(); + mKeys.push_back( key ); + mBuilders.push_back( Builder() ); } //! Builds an object that inherits from T, which is associated with \a key via registerBuilder(), returning it in a shared_ptr. std::shared_ptr build( const std::string &key, const Args&... args ) { - auto builderFnIt = mBuilderMap.find( key ); - if( builderFnIt == mBuilderMap.end() ) - throw FactoryException( key ); + for( size_t i = 0; i < mKeys.size(); i++ ) { + if( mKeys[i] == key ) { + return mBuilders[i]( args... ); + } + } - return builderFnIt->second( args... ); + throw FactoryException( key ); } - std::vector getAllKeys() const + const std::vector& getAllKeys() const { - std::vector result; - for( const auto &mp : mBuilderMap ) { - result.push_back( mp.first ); - } - - return result; + return mKeys; } private: @@ -83,7 +85,8 @@ class Factory { typedef std::function( Args... )> BuilderFn; - std::map mBuilderMap; + std::vector mKeys; + std::vector mBuilders; }; } // namespace mason From 8fd329b8f812b2819abfe9a65cd3ca4a766ee35b Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 24 Sep 2024 22:06:42 -0700 Subject: [PATCH 15/38] Factory: throw exception when a duplicate key is detected --- test/_audio/AudioTests/src/Factory.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/test/_audio/AudioTests/src/Factory.h b/test/_audio/AudioTests/src/Factory.h index af675dace6..aeac71cb5a 100644 --- a/test/_audio/AudioTests/src/Factory.h +++ b/test/_audio/AudioTests/src/Factory.h @@ -31,13 +31,20 @@ namespace mason { //! Exception thrown when Factory cannot build an object for the requested key -class FactoryException : public cinder::Exception { +class FactoryExceptionBuilderNotFound : public cinder::Exception { public: - FactoryException( const std::string &key ) + FactoryExceptionBuilderNotFound( const std::string &key ) : Exception( "no Builder for key: " + key ) {} }; +class FactoryExceptionDuplicateKey : public cinder::Exception { +public: + FactoryExceptionDuplicateKey( const std::string &key ) + : Exception( "Duplicate key: " + key ) + {} +}; + //! Utility for constructing shared_ptr objects by string, passing \a Args to T's constructor. //! Keys are stored internally using a std::vector to preserve the order that they were added, //! which can be useful for showing in GUIs or selecting by index. @@ -51,6 +58,11 @@ class Factory { { static_assert( std::is_base_of::value, "Y must inherit from T" ); + auto keyIt = std::find( mKeys.begin(), mKeys.end(), key ); + if( keyIt != mKeys.end() ) { + throw FactoryExceptionDuplicateKey( key ); + } + mKeys.push_back( key ); mBuilders.push_back( Builder() ); } @@ -64,7 +76,7 @@ class Factory { } } - throw FactoryException( key ); + throw FactoryExceptionBuilderNotFound( key ); } const std::vector& getAllKeys() const From a70dd10a53a0f914f5afc225d9e99cd1aff478fe Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 24 Sep 2024 22:07:11 -0700 Subject: [PATCH 16/38] DeviceTest: show input / output devices in UI --- test/_audio/AudioTests/src/DeviceTest.cpp | 37 ++++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/test/_audio/AudioTests/src/DeviceTest.cpp b/test/_audio/AudioTests/src/DeviceTest.cpp index 078ff2cf49..7e286e8828 100644 --- a/test/_audio/AudioTests/src/DeviceTest.cpp +++ b/test/_audio/AudioTests/src/DeviceTest.cpp @@ -626,10 +626,6 @@ void DeviceTest::update() if( mOutputDeviceNode->getLastClip() ) app::timeline().apply( &mOutputDeviceNodeClipFade, 1.0f, 0.0f, xrunFadeTime ); } - - //if( getElapsedFrames() % 20 == 0 ) { - // CI_LOG_I( "framerate: " << to_string( getAverageFps() ) ); - //} } void DeviceTest::draw() @@ -685,6 +681,39 @@ void DeviceTest::updateUI() startRecording(); } + if( im::Button( "print devices" ) ) { + app::console() << audio::Device::printDevicesToString() << endl; + } + + const int maxVisibleDevices = 8; + + const auto &inputDevices = audio::Device::getInputDevices(); + int currentInputIndex = 0; + vector inputNames; + for( int i = 0; i < inputDevices.size(); i++ ) { + inputNames.push_back( inputDevices[i]->getName() ); + if( mOutputDeviceNode->getDevice()->getName() == inputNames.back() ) { + currentInputIndex = i; + } + } + if( im::ListBox( "input devices", ¤tInputIndex, inputNames, std::min( maxVisibleDevices, inputNames.size() ) ) ) { + // TODO: handle change + } + + const auto &outputDevices = audio::Device::getOutputDevices(); + int currentOutputIndex = 0; + vector outputNames; + for( int i = 0; i < outputDevices.size(); i++ ) { + outputNames.push_back( outputDevices[i]->getName() ); + if( mOutputDeviceNode->getDevice()->getName() == outputNames.back() ) { + currentOutputIndex = i; + } + } + if( im::ListBox( "output devices", ¤tOutputIndex, outputNames, std::min( maxVisibleDevices, outputNames.size() ) ) ) { + // TODO: handle change + } + + im::Separator(); if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); } From 6b6d98a58316e478f066b90aa787a2ce3e17e62b Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 25 Sep 2024 14:55:11 -0700 Subject: [PATCH 17/38] fleshed out SpectralTest UI, mag spectrum showing again --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 11 +- test/_audio/AudioTests/src/SpectralTest.cpp | 187 ++++++------------- test/_audio/AudioTests/src/SpectralTest.h | 2 + 3 files changed, 68 insertions(+), 132 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 9315e0da18..2f8d990476 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -114,10 +114,16 @@ void AudioTestsApp::reload() audio::ScopedEnableContext scopedDisableCtx( ctx, false ); ctx->disconnectAllNodes(); + auto firstRun = mCurrentTest == nullptr; + string testName = mTestFactory.getAllKeys()[mCurrenTestIndex]; mCurrentTest = mTestFactory.build( testName ); mCurrentTest->setName( testName ); + if( ! firstRun ) { + mCurrentTest->resize(); + } + CI_LOG_I( "finished building test '" << testName << "', type: " << System::demangleTypeName( typeid( *mCurrentTest.get() ).name() ) ); } @@ -310,6 +316,9 @@ void AudioTestsApp::updateImGui() app::console() << "--------------------------------------------------" << endl; app::console() << "-------------- Graph configuration: --------------" << endl; } + if( im::Button( "print default output" ) ) { + printDefaultOutput(); + } } im::End(); // "General" @@ -341,7 +350,7 @@ void AudioTestsApp::updateContextUI() auto ctx = audio::master(); - im::Text( "dsp %s, samplerate: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate() ); + im::Text( "dsp %s, samplerate: %d, frames per black: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate(), (int)ctx->getFramesPerBlock() ); im::Separator(); im::Text( "Context Graph:" ); im::SameLine(); diff --git a/test/_audio/AudioTests/src/SpectralTest.cpp b/test/_audio/AudioTests/src/SpectralTest.cpp index 97a6dc3185..b8523e1d68 100644 --- a/test/_audio/AudioTests/src/SpectralTest.cpp +++ b/test/_audio/AudioTests/src/SpectralTest.cpp @@ -38,6 +38,9 @@ SpectralTest::SpectralTest() mSourceFile = audio::load( app::loadAsset( "tone440L220R.mp3" ), ctx->getSampleRate() ); + mGain = ctx->makeNode( new audio::GainNode() ); + mGain->setValue( 0.6f ); + auto audioBuffer = mSourceFile->loadBuffer(); CI_LOG_V( "loaded source buffer, frames: " << audioBuffer->getNumFrames() ); @@ -70,7 +73,7 @@ void SpectralTest::setupSubTest( const string &testName ) void SpectralTest::setupSine() { - mGen >> mMonitorSpectralNode >> audio::master()->getOutput(); + mGen >> mMonitorSpectralNode >> mGain >> audio::master()->getOutput(); if( mPlaybackEnabled ) mGen->enable(); } @@ -84,133 +87,11 @@ void SpectralTest::setupSineNoOutput() void SpectralTest::setupSample() { - mPlayerNode >> mMonitorSpectralNode >> audio::master()->getOutput(); + mPlayerNode >> mMonitorSpectralNode >> mGain >> audio::master()->getOutput(); if( mPlaybackEnabled ) mPlayerNode->enable(); } -#if 0 -void SpectralTest::setupUI() -{ - Rectf buttonRect( 0.0f, 0.0f, 200.0f, mSpectroMargin - 2.0f ); - float padding = 10.0f; - mEnableGraphButton.mIsToggle = true; - mEnableGraphButton.mTitleNormal = "graph off"; - mEnableGraphButton.mTitleEnabled = "graph on"; - mEnableGraphButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableGraphButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mPlaybackButton.mIsToggle = true; - mPlaybackButton.mTitleNormal = "play"; - mPlaybackButton.mTitleEnabled = "stop"; - mPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mLoopButton.mIsToggle = true; - mLoopButton.mTitleNormal = "loop off"; - mLoopButton.mTitleEnabled = "loop on"; - mLoopButton.mBounds = buttonRect; - mWidgets.push_back( &mLoopButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mScaleDecibelsButton.mIsToggle = true; - mScaleDecibelsButton.mTitleNormal = "linear"; - mScaleDecibelsButton.mTitleEnabled = "decibels"; - mScaleDecibelsButton.mBounds = buttonRect; - mWidgets.push_back( &mScaleDecibelsButton ); - - vec2 sliderSize( 200.0f, 30.0f ); - Rectf selectorRect( getWindowWidth() - sliderSize.x - mSpectroMargin, buttonRect.y2 + padding, getWindowWidth() - mSpectroMargin, buttonRect.y2 + padding + sliderSize.y * 3 ); - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "sine (no output)" ); - mTestSelector.mSegments.push_back( "sample" ); - mTestSelector.mBounds = selectorRect; - mWidgets.push_back( &mTestSelector ); - - Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); - mSmoothingFactorSlider.mBounds = sliderRect; - mSmoothingFactorSlider.mTitle = "Smoothing"; - mSmoothingFactorSlider.mMin = 0.0f; - mSmoothingFactorSlider.mMax = 1.0f; - mSmoothingFactorSlider.set( mMonitorSpectralNode->getSmoothingFactor() ); - mWidgets.push_back( &mSmoothingFactorSlider ); - - sliderRect += vec2( 0.0f, sliderSize.y + padding ); - mFreqSlider.mBounds = sliderRect; - mFreqSlider.mTitle = "Sine Freq"; - mFreqSlider.mMin = 0.0f; -// mFreqSlider.mMax = mContext->getSampleRate() / 2.0f; - mFreqSlider.mMax = 800; - mFreqSlider.set( mGen->getFreq() ); - mWidgets.push_back( &mFreqSlider ); - - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -// TODO: currently makes sense to enable processor + tap together - consider making these enabled together. -// - possible solution: add a silent flag that is settable by client -void SpectralTest::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - if( mEnableGraphButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mPlaybackButton.hitTest( pos ) ) { - if( mTestSelector.currentSection() == "sine" || mTestSelector.currentSection() == "sine (no output)" ) - mGen->setEnabled( mPlaybackButton.mEnabled ); - else { - if( mPlaybackButton.mEnabled ) - mPlayerNode->start(); - else - mPlayerNode->stop(); - } - } - else if( mLoopButton.hitTest( pos ) ) - mPlayerNode->setLoopEnabled( ! mPlayerNode->isLoopEnabled() ); - else if( mScaleDecibelsButton.hitTest( pos ) ) - mSpectrumPlot.enableScaleDecibels( ! mSpectrumPlot.getScaleDecibels() ); - else - printBinFreq( pos.x ); - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - bool enabled = ctx->isEnabled(); - ctx->disconnectAllNodes(); - - if( currentTest == "sine" ) - setupSine(); - if( currentTest == "sine (no output)" ) - setupSineNoOutput(); - if( currentTest == "sample" ) - setupSample(); - - ctx->setEnabled( enabled ); - } -} - -void SpectralTest::processDrag( ivec2 pos ) -{ - if( mSmoothingFactorSlider.hitTest( pos ) ) - mMonitorSpectralNode->setSmoothingFactor( mSmoothingFactorSlider.mValueScaled ); - if( mFreqSlider.hitTest( pos ) ) - mGen->setFreq( mFreqSlider.mValueScaled ); -} - -#endif - void SpectralTest::openFile( const ci::fs::path &fullPath ) { try { @@ -280,17 +161,61 @@ void SpectralTest::draw() void SpectralTest::updateUI() { - //float gain = mGain->getValue(); - //if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { - // mGain->setValue( gain ); - //} + if( mSpectrumPlot.getScaleDecibels() ) { + if( im::Button( "decibels scale" ) ) { + mSpectrumPlot.enableScaleDecibels( false ); + } + } + else { + if( im::Button( "linear scale" ) ) { + mSpectrumPlot.enableScaleDecibels( true ); + } + } + im::SameLine(); + im::Text( "Spectral centroid: %0.3f", mMonitorSpectralNode->getSpectralCentroid() ); - if( im::Checkbox( "play", &mPlaybackEnabled ) ) { - mGen->enable(); + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->getParam()->applyRamp( gain, 0.3f ); + } + float smoothing = mMonitorSpectralNode->getSmoothingFactor(); + if( im::SliderFloat( "spectral smoothing", &smoothing, 0, 1 ) ) { + mMonitorSpectralNode->setSmoothingFactor( smoothing ); + } + + im::Checkbox( "playing", &mPlaybackEnabled ); + + im::Separator(); + + if( mSubTests[mCurrentSubTest] == "sample" ) { + mPlayerNode->setEnabled( mPlaybackEnabled ); + im::Text( "Sample" ); + bool loopEnabled = mPlayerNode->isLoopEnabled(); + if( im::Checkbox( "loop", &loopEnabled ) ) { + mPlayerNode->setLoopEnabled( loopEnabled ); + } + im::SameLine(); + if( im::Button( "reset" ) ) { + mPlayerNode->seek( 0 ); + } + + float readPos = (float)mPlayerNode->getReadPositionTime(); + if( im::SliderFloat( "read pos (s)", &readPos, 0, mPlayerNode->getNumSeconds() ) ) { + mPlayerNode->seekToTime( readPos ); + } + + } + else { + mGen->setEnabled( mPlaybackEnabled ); + im::Text( "Gen" ); + float genFreq = mGen->getFreq(); + if( im::SliderFloat( "Gen Freqency", &genFreq, -200, 1200 ) ) { + mGen->getParamFreq()->applyRamp( genFreq, 0.05f ); + } } - im::Text( "spectral centroid: %0.3f", mMonitorSpectralNode->getSpectralCentroid() ); + im::Separator(); if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); } diff --git a/test/_audio/AudioTests/src/SpectralTest.h b/test/_audio/AudioTests/src/SpectralTest.h index beb656b263..2530967398 100644 --- a/test/_audio/AudioTests/src/SpectralTest.h +++ b/test/_audio/AudioTests/src/SpectralTest.h @@ -3,6 +3,7 @@ #include "AudioTest.h" #include "cinder/audio/GenNode.h" +#include "cinder/audio/GainNode.h" #include "cinder/audio/MonitorNode.h" #include "cinder/audio/SamplePlayerNode.h" #include "cinder/audio/dsp/Dsp.h" @@ -30,6 +31,7 @@ class SpectralTest : public AudioTest { ci::audio::BufferPlayerNodeRef mPlayerNode; + ci::audio::GainNodeRef mGain; ci::audio::GenNodeRef mGen; ci::audio::MonitorSpectralNodeRef mMonitorSpectralNode; ci::audio::SourceFileRef mSourceFile; From 99c5d55fbcd041f16d55c186e4fd808c52368625 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Sun, 29 Sep 2024 13:32:33 -0700 Subject: [PATCH 18/38] added WaveTableTest --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 11 +- test/_audio/AudioTests/src/WaveTableTest.cpp | 212 ++++++++++++++++++ test/_audio/AudioTests/src/WaveTableTest.h | 38 ++++ 5 files changed, 264 insertions(+), 5 deletions(-) create mode 100644 test/_audio/AudioTests/src/WaveTableTest.cpp create mode 100644 test/_audio/AudioTests/src/WaveTableTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index ba6c221345..44efd636e3 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -27,6 +27,7 @@ + @@ -39,6 +40,7 @@ + {242B9F1A-CC82-4E3A-A21E-0533ABD26074} diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 619cd1043d..59f5fbe2fa 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -33,6 +33,9 @@ src + + src + @@ -65,5 +68,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 2f8d990476..d505505c0f 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -15,6 +15,7 @@ #include "DeviceTest.h" #include "SamplePlayerTest.h" #include "SpectralTest.h" +#include "WaveTableTest.h" using namespace ci; using namespace std; @@ -33,7 +34,7 @@ namespace im = ImGui; #include "LPP_API_x64_CPP.h" #endif -const int SCREEN_INDEX = 1; +const int SCREEN_INDEX = 2; const ivec2 WINDOW_POS = { 2000, 50 }; const ivec2 WINDOW_SIZE = { 1600, 1000 }; @@ -89,6 +90,7 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Device" ); mTestFactory.registerBuilder( "Samples" ); mTestFactory.registerBuilder( "Spectral" ); + mTestFactory.registerBuilder( "WaveTable" ); auto ctx = audio::master(); @@ -189,13 +191,12 @@ void AudioTestsApp::resize() void AudioTestsApp::update() { - if( mCurrentTest ) { - mCurrentTest->update(); - } - if( mImGuiEnabled ) { updateImGui(); } + if( mCurrentTest ) { + mCurrentTest->update(); + } } void AudioTestsApp::draw() diff --git a/test/_audio/AudioTests/src/WaveTableTest.cpp b/test/_audio/AudioTests/src/WaveTableTest.cpp new file mode 100644 index 0000000000..71dd476c6a --- /dev/null +++ b/test/_audio/AudioTests/src/WaveTableTest.cpp @@ -0,0 +1,212 @@ +#include "WaveTableTest.h" + +#include "cinder/app/App.h" +#include "cinder/CinderAssert.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" + +#include "cinder/audio/Utilities.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +const float sDefaultFreq = 100; + +WaveTableTest::WaveTableTest() +{ + mSubTests = { + "sine", + "square", + "sawtooth", + "triangle", + "pulse", + "sine (table)", + "triangle (calc)" + }; + + auto ctx = audio::master(); + mGain = ctx->makeNode( new audio::GainNode ); + mGain->setValue( 0.075f ); + + mMonitor = audio::master()->makeNode( new audio::MonitorSpectralNode( audio::MonitorSpectralNode::Format().fftSize( 1024 ).windowSize( 2048 ) ) ); + mMonitor->setSmoothingFactor( 0 ); + + setupOsc( audio::WaveformType::SINE ); +// setupTable(); +// setupPulse(); + + mGen >> mMonitor >> mGain >> ctx->getOutput(); +} + +void WaveTableTest::setupSubTest( const std::string &testName ) +{ + mGen = mGenPulse = mGenOsc = nullptr; + + mMonitor->disconnectAllInputs(); + + if( testName == "sine" ) + setupOsc( audio::WaveformType::SINE ); + else if( testName == "square" ) + setupOsc( audio::WaveformType::SQUARE ); + else if( testName == "sawtooth" ) + setupOsc( audio::WaveformType::SAWTOOTH ); + else if( testName == "triangle" ) + setupOsc( audio::WaveformType::TRIANGLE ); + else if( testName == "pulse" ) + setupPulse(); + else if( testName == "sine (table)" ) + setupTable(); + else if( testName == "triangle (calc)" ) + setupTriangleCalc(); + + mGen >> mMonitor; +} + +void WaveTableTest::setupTable() +{ + auto ctx = audio::master(); + float freq = mGen ? mGen->getFreq() : sDefaultFreq; + + auto gen = ctx->makeNode( new audio::GenTableNode ); + gen->setFreq( freq ); + gen->enable(); + + mGen = gen; +} + +void WaveTableTest::setupOsc( audio::WaveformType type ) +{ + auto ctx = audio::master(); + float freq = mGen ? mGen->getFreq() : sDefaultFreq; + + mGenOsc = ctx->makeNode( new audio::GenOscNode( type ) ); + mGenOsc->setFreq( freq ); + mGenOsc->enable(); + + mGen = mGenOsc; +} + +void WaveTableTest::setupPulse() +{ + float freq = mGen ? mGen->getFreq() : sDefaultFreq; + + if( ! mGenPulse ) { + mGenPulse = audio::master()->makeNode( new audio::GenPulseNode ); + mGenPulse->setFreq( freq ); + mGenPulse->enable(); + } + + if( mGenOsc ) + mGenOsc->disconnectAll(); + + mGenPulse >> mMonitor; + mGen = mGenPulse; + +#if 1 + // pwm + auto mod = audio::master()->makeNode( new audio::GenTableNode ); + + audio::master()->initializeNode( mod ); + + vector table( mod->getWaveTable()->getTableSize() ); + + mod->getWaveTable()->copyTo( table.data() ); + + // scale to [0.05 : 0.95] + audio::dsp::mul( table.data(), 0.45f, table.data(), table.size() ); + audio::dsp::add( table.data(), 0.5f, table.data(), table.size() ); + +// mTableCopy.setNumFrames( table.size() ); +// memmove( mTableCopy.getData(), table.data(), table.size() * sizeof( float ) ); + + mod->getWaveTable()->copyFrom( table.data() ); + mod->setFreq( 0.6f ); + mod->enable(); + + mGenPulse->getParamWidth()->setProcessor( mod ); +#endif +} + +// for comparison with GenOscNode's triangle spectra +void WaveTableTest::setupTriangleCalc() +{ + auto ctx = audio::master(); + float freq = mGen ? mGen->getFreq() : sDefaultFreq; + + auto gen = ctx->makeNode( new audio::GenTriangleNode ); + gen->setFreq( freq ); + gen->enable(); + + mGen = gen; +} + +void WaveTableTest::update() +{ + if( mGenOsc ) { + mTableCopy.setNumFrames( mGenOsc->getTableSize() ); + mGenOsc->getWaveTable()->copyTo( mTableCopy.getData(), (size_t)mGenOsc->getWaveTable()->calcBandlimitedTableIndex( mGenOsc->getFreq() ) ); + } + if( mGenPulse ) { + // TODO: add to UI + //mPulseWidthSlider.set( mGenPulse->getWidth() ); + } +} + +void WaveTableTest::draw() +{ + gl::clear(); + + const float padding = 10; + const float scopeHeight = ( app::getWindowHeight() - padding * 4 ) / 3.0f; + + Rectf rect( padding, padding, app::getWindowWidth() - padding, scopeHeight + padding ); + drawAudioBuffer( mTableCopy, rect, true ); + + rect += vec2( 0, scopeHeight + padding ); + drawAudioBuffer( mMonitor->getBuffer(), rect, true ); + + rect += vec2( 0, scopeHeight + padding ); + mSpectrumPlot.setBounds( rect ); + mSpectrumPlot.draw( mMonitor->getMagSpectrum() ); +} + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void WaveTableTest::updateUI() +{ + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->getParam()->applyRamp( gain, 0.3f ); + } + + static float genRampTime = 0.2f; + float freq = mGen->getFreq(); + if( im::SliderFloat( "qen freq", &freq, -200, 1200 ) ) { + mGen->getParamFreq()->applyRamp( freq, genRampTime ); + } + im::DragFloat( "freq ramp time", &genRampTime, 0.01f, 0, 5 ); + + if( mGenPulse ) { + float w = mGenPulse->getWidth(); + if( im::SliderFloat( "pulse width", &w, 0, 1 ) ) { + mGenPulse->getParamWidth()->applyRamp( w, 0.2f ); + } + } + + // TODO: UI + logic for modifying the WaveTable WaveTable2d + // - will have to create a new WaveTable for thread-safety + // - would be nice to do it async + //int tableSize = mGenOsc->getTableSize(); + //if( im::InputInt( "table size", &tableSize, 100, 1000 ) ) { + // mGenOsc->setWaveform( mGenOsc->getWaveForm(), tableSize ); + //} + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, (int)mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/WaveTableTest.h b/test/_audio/AudioTests/src/WaveTableTest.h new file mode 100644 index 0000000000..509bc5b21e --- /dev/null +++ b/test/_audio/AudioTests/src/WaveTableTest.h @@ -0,0 +1,38 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/GenNode.h" +#include "cinder/audio/GainNode.h" +#include "cinder/audio/MonitorNode.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +class WaveTableTest : public AudioTest { + public: + WaveTableTest(); + + void update() override; + void draw() override; + + void updateUI() override; + +private: + void setupSubTest( const std::string &testName ); + void setupTable(); + void setupOsc( ci::audio::WaveformType type ); + void setupPulse(); + void setupTriangleCalc(); + + ci::audio::GainNodeRef mGain; + ci::audio::MonitorSpectralNodeRef mMonitor; + ci::audio::GenOscNodeRef mGenOsc; + ci::audio::GenPulseNodeRef mGenPulse; + ci::audio::GenNodeRef mGen; + + ci::audio::BufferDynamic mTableCopy; + SpectrumPlot mSpectrumPlot; + + std::vector mSubTests; + int mCurrentSubTest = 0; +}; From a3023b1b0e2d3b929258a4d818b9378bedac53e2 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 3 Oct 2024 13:42:05 -0700 Subject: [PATCH 19/38] Added VoiceTest --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 4 +- .../AudioTests/src/SamplePlayerTest.cpp | 3 +- test/_audio/AudioTests/src/SpectralTest.h | 3 - test/_audio/AudioTests/src/VoiceTest.cpp | 108 ++++++++++++++++++ test/_audio/AudioTests/src/VoiceTest.h | 32 ++++++ test/_audio/AudioTests/src/WaveTableTest.cpp | 6 +- test/_audio/AudioTests/src/WaveTableTest.h | 3 +- 9 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 test/_audio/AudioTests/src/VoiceTest.cpp create mode 100644 test/_audio/AudioTests/src/VoiceTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 44efd636e3..99172d84e3 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -27,6 +27,7 @@ + @@ -40,6 +41,7 @@ + diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index 59f5fbe2fa..fda32cdef6 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -36,6 +36,9 @@ src + + src + @@ -71,5 +74,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index d505505c0f..4b94473faa 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -16,6 +16,7 @@ #include "SamplePlayerTest.h" #include "SpectralTest.h" #include "WaveTableTest.h" +#include "VoiceTest.h" using namespace ci; using namespace std; @@ -34,7 +35,7 @@ namespace im = ImGui; #include "LPP_API_x64_CPP.h" #endif -const int SCREEN_INDEX = 2; +const int SCREEN_INDEX = 1; const ivec2 WINDOW_POS = { 2000, 50 }; const ivec2 WINDOW_SIZE = { 1600, 1000 }; @@ -91,6 +92,7 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Samples" ); mTestFactory.registerBuilder( "Spectral" ); mTestFactory.registerBuilder( "WaveTable" ); + mTestFactory.registerBuilder( "Voice" ); auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.cpp b/test/_audio/AudioTests/src/SamplePlayerTest.cpp index 4eaac66a0d..a1c1e5bf65 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.cpp +++ b/test/_audio/AudioTests/src/SamplePlayerTest.cpp @@ -8,7 +8,6 @@ #include "cinder/CinderImGui.h" #define TEST_STEREO_INPUT_PANNING 0 -#define INITIAL_AUDIO_SAMPLE "tone440L220R.wav" using namespace ci; using namespace std; @@ -27,7 +26,7 @@ SamplePlayerTest::SamplePlayerTest() printSupportedExtensions(); - setSourceFile( app::loadAsset( INITIAL_AUDIO_SAMPLE ) ); + setSourceFile( app::loadAsset( "tone440L220R.wav" ) ); auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/SpectralTest.h b/test/_audio/AudioTests/src/SpectralTest.h index 2530967398..45dacd5ca9 100644 --- a/test/_audio/AudioTests/src/SpectralTest.h +++ b/test/_audio/AudioTests/src/SpectralTest.h @@ -24,9 +24,6 @@ class SpectralTest : public AudioTest { void setupSine(); void setupSineNoOutput(); void setupSample(); - void setupUI(); - void processTap( ci::ivec2 pos ); - void processDrag( ci::ivec2 pos ); void printBinFreq( size_t xPos ); diff --git a/test/_audio/AudioTests/src/VoiceTest.cpp b/test/_audio/AudioTests/src/VoiceTest.cpp new file mode 100644 index 0000000000..fb41c22425 --- /dev/null +++ b/test/_audio/AudioTests/src/VoiceTest.cpp @@ -0,0 +1,108 @@ +#include "VoiceTest.h" + +#include "cinder/app/App.h" +#include "cinder/CinderAssert.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" + +#include "cinder/audio/Voice.h" +#include "cinder/audio/MonitorNode.h" +#include "cinder/audio/Utilities.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +const string DEFAULT_SOUNDFILE = "tone440.ogg"; + +VoiceTest::VoiceTest() +{ + mSubTests = { + "basic", + "basic stereo", + "file 2", + "scope", + }; + + setupBasic(); +} + +void VoiceTest::openFile( const ci::fs::path &fullPath ) +{ + mVoice = audio::Voice::create( audio::load( loadFile( fullPath ) ) ); + mVoice->setVolume( mVolume ); +} + +void VoiceTest::setupSubTest( const std::string &testName ) +{ + if( testName == "basic" ) + setupBasic(); + if( testName == "basic stereo" ) + setupBasicStereo(); + else if( testName == "scope" ) + setupScope(); + else if( testName == "file 2" ) + setupDifferentFile(); +} + +void VoiceTest::setupBasic() +{ + mVoice = audio::Voice::create( audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ) ); + mVoice->setVolume( mVolume ); +} + +void VoiceTest::setupBasicStereo() +{ + mVoice = audio::Voice::create( audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ), audio::Voice::Options().channels( 2 ) ); + mVoice->setVolume( mVolume ); +} + +void VoiceTest::setupDifferentFile() +{ + mVoice = audio::Voice::create( audio::load( app::loadAsset( "tone440L220R.mp3" ) ) ); + mVoice->setVolume( mVolume ); + +} +void VoiceTest::setupScope() +{ + auto sourceFile = audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ); + mVoice = audio::Voice::create( sourceFile, audio::Voice::Options().connectToMaster( false ) ); + mVoice->setVolume( mVolume ); + + auto ctx = audio::master(); + mMonitor = ctx->makeNode( new audio::MonitorNode ); + + mVoice->getOutputNode() >> mMonitor >> ctx->getOutput(); +} + +void VoiceTest::draw() +{ + if( mMonitor && mMonitor->getNumConnectedInputs() ) { + vec2 padding( 20, 4 ); + + Rectf scopeRect( padding.x, padding.y, app::getWindowWidth() - padding.x, app::getWindowHeight() - padding.y ); + drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); + } +} + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void VoiceTest::updateUI() +{ + if( im::Button( "start" ) ) { + mVoice->start(); + } + if( im::SliderFloat( "volume", &mVolume, 0, 1 ) ) { + mVoice->setVolume( mVolume ); + } + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } + + +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/VoiceTest.h b/test/_audio/AudioTests/src/VoiceTest.h new file mode 100644 index 0000000000..8abc05597e --- /dev/null +++ b/test/_audio/AudioTests/src/VoiceTest.h @@ -0,0 +1,32 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/Voice.h" +#include "cinder/audio/MonitorNode.h" + +class VoiceTest : public AudioTest { + public: + VoiceTest(); + + void openFile( const ci::fs::path &fullPath ) override; + void draw() override; + void updateUI() override; + + private: + void setupSubTest( const std::string &testName ); + void setupBasic(); + void setupBasicStereo(); + void setupDifferentFile(); + void setupScope(); + + ci::audio::VoiceRef mVoice; + ci::audio::MonitorNodeRef mMonitor; + + //enum InputBus { SINE, NOISE }; + + std::vector mSubTests; + int mCurrentSubTest = 0; + float mVolume = 0.4f; +}; + diff --git a/test/_audio/AudioTests/src/WaveTableTest.cpp b/test/_audio/AudioTests/src/WaveTableTest.cpp index 71dd476c6a..eea886b5ca 100644 --- a/test/_audio/AudioTests/src/WaveTableTest.cpp +++ b/test/_audio/AudioTests/src/WaveTableTest.cpp @@ -43,8 +43,10 @@ WaveTableTest::WaveTableTest() void WaveTableTest::setupSubTest( const std::string &testName ) { - mGen = mGenPulse = mGenOsc = nullptr; - + mGen = nullptr; + mGenPulse = nullptr; + mGenOsc = nullptr; + mMonitor->disconnectAllInputs(); if( testName == "sine" ) diff --git a/test/_audio/AudioTests/src/WaveTableTest.h b/test/_audio/AudioTests/src/WaveTableTest.h index 509bc5b21e..10e6be0ea4 100644 --- a/test/_audio/AudioTests/src/WaveTableTest.h +++ b/test/_audio/AudioTests/src/WaveTableTest.h @@ -10,11 +10,10 @@ class WaveTableTest : public AudioTest { public: - WaveTableTest(); + WaveTableTest(); void update() override; void draw() override; - void updateUI() override; private: From 2637514d3c9b60ea79eea6e176d8c0cd27f93090 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 3 Oct 2024 16:12:17 -0700 Subject: [PATCH 20/38] removed subtest state to AudioTest base class --- test/_audio/AudioTests/src/AudioTest.h | 4 ++++ test/_audio/AudioTests/src/DeviceTest.h | 3 --- test/_audio/AudioTests/src/NodeBasicTest.h | 3 --- test/_audio/AudioTests/src/NodeEffectsTest.h | 4 +--- test/_audio/AudioTests/src/ParamTest.h | 3 --- test/_audio/AudioTests/src/SamplePlayerTest.h | 3 --- test/_audio/AudioTests/src/SpectralTest.h | 8 -------- test/_audio/AudioTests/src/VoiceTest.h | 2 -- test/_audio/AudioTests/src/WaveTableTest.h | 3 --- 9 files changed, 5 insertions(+), 28 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTest.h b/test/_audio/AudioTests/src/AudioTest.h index a692e987e2..bc35b9f08d 100644 --- a/test/_audio/AudioTests/src/AudioTest.h +++ b/test/_audio/AudioTests/src/AudioTest.h @@ -4,6 +4,7 @@ #include "cinder/Filesystem.h" #include +#include using AudioTestRef = std::shared_ptr; @@ -23,4 +24,7 @@ class AudioTest { protected: std::string mName; + + std::vector mSubTests; + int mCurrentSubTest = 0; }; diff --git a/test/_audio/AudioTests/src/DeviceTest.h b/test/_audio/AudioTests/src/DeviceTest.h index eb69147955..60feb38ed0 100644 --- a/test/_audio/AudioTests/src/DeviceTest.h +++ b/test/_audio/AudioTests/src/DeviceTest.h @@ -39,9 +39,6 @@ class DeviceTest : public AudioTest { void setupSubTest( const std::string &testName ); - int mCurrentSubTest = 0; - std::vector mSubTests; - ci::audio::InputDeviceNodeRef mInputDeviceNode; ci::audio::OutputDeviceNodeRef mOutputDeviceNode; ci::audio::MonitorNodeRef mMonitor; diff --git a/test/_audio/AudioTests/src/NodeBasicTest.h b/test/_audio/AudioTests/src/NodeBasicTest.h index c24c845bee..2984dbe069 100644 --- a/test/_audio/AudioTests/src/NodeBasicTest.h +++ b/test/_audio/AudioTests/src/NodeBasicTest.h @@ -27,9 +27,6 @@ class NodeBasicTest : public AudioTest { void setupSplitStereo(); void setupSplitMerge(); - std::vector mSubTests; - int mCurrentSubTest = 0; - ci::audio::GainNodeRef mGain; ci::audio::MonitorNodeRef mMonitor; ci::audio::GenNodeRef mGen, mNoise; diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.h b/test/_audio/AudioTests/src/NodeEffectsTest.h index 4bff9c8c94..ea6c40544a 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.h +++ b/test/_audio/AudioTests/src/NodeEffectsTest.h @@ -27,9 +27,7 @@ class NodeEffectsTest : public AudioTest { void applyChirp(); - std::vector mSubTests; - int mCurrentSubTest = 0; - bool mUseSine = false; // if false, uses noise instead of sine + bool mUseSine = false; // if false, uses noise instead of sine ci::audio::GenNodeRef mGen; ci::audio::GainNodeRef mGain; diff --git a/test/_audio/AudioTests/src/ParamTest.h b/test/_audio/AudioTests/src/ParamTest.h index 4048251112..6897171086 100644 --- a/test/_audio/AudioTests/src/ParamTest.h +++ b/test/_audio/AudioTests/src/ParamTest.h @@ -30,9 +30,6 @@ class ParamTest : public AudioTest { void writeParamEval( ci::audio::Param *param ); - int mCurrentSubTest = 0; - std::vector mSubTests; - ci::audio::GenNodeRef mGen; ci::audio::GainNodeRef mGain; ci::audio::Pan2dNodeRef mPan; diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.h b/test/_audio/AudioTests/src/SamplePlayerTest.h index 798773caac..39b91f9d16 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.h +++ b/test/_audio/AudioTests/src/SamplePlayerTest.h @@ -47,9 +47,6 @@ class SamplePlayerTest : public AudioTest { WaveformPlot mWaveformPlot; - std::vector mSubTests; - int mCurrentSubTest = 0; - ci::Anim mUnderrunFade, mOverrunFade, mRecorderOverrunFade; ci::Rectf mUnderrunRect, mOverrunRect, mRecorderOverrunRect; bool mSamplePlayerNodeEnabledState; diff --git a/test/_audio/AudioTests/src/SpectralTest.h b/test/_audio/AudioTests/src/SpectralTest.h index 45dacd5ca9..0237377954 100644 --- a/test/_audio/AudioTests/src/SpectralTest.h +++ b/test/_audio/AudioTests/src/SpectralTest.h @@ -26,20 +26,12 @@ class SpectralTest : public AudioTest { void setupSample(); void printBinFreq( size_t xPos ); - ci::audio::BufferPlayerNodeRef mPlayerNode; ci::audio::GainNodeRef mGain; ci::audio::GenNodeRef mGen; ci::audio::MonitorSpectralNodeRef mMonitorSpectralNode; ci::audio::SourceFileRef mSourceFile; - std::vector mSubTests; - int mCurrentSubTest = 0; - - // TODO: add gui for these - //Button mLoopButton, mScaleDecibelsButton; - //HSlider mSmoothingFactorSlider, mFreqSlider; - SpectrumPlot mSpectrumPlot; float mSpectroMargin = 40; bool mUseScaleDecibels = true; diff --git a/test/_audio/AudioTests/src/VoiceTest.h b/test/_audio/AudioTests/src/VoiceTest.h index 8abc05597e..cf7786dbac 100644 --- a/test/_audio/AudioTests/src/VoiceTest.h +++ b/test/_audio/AudioTests/src/VoiceTest.h @@ -25,8 +25,6 @@ class VoiceTest : public AudioTest { //enum InputBus { SINE, NOISE }; - std::vector mSubTests; - int mCurrentSubTest = 0; float mVolume = 0.4f; }; diff --git a/test/_audio/AudioTests/src/WaveTableTest.h b/test/_audio/AudioTests/src/WaveTableTest.h index 10e6be0ea4..d5f7a095f1 100644 --- a/test/_audio/AudioTests/src/WaveTableTest.h +++ b/test/_audio/AudioTests/src/WaveTableTest.h @@ -31,7 +31,4 @@ class WaveTableTest : public AudioTest { ci::audio::BufferDynamic mTableCopy; SpectrumPlot mSpectrumPlot; - - std::vector mSubTests; - int mCurrentSubTest = 0; }; From 72e47bf9c4023bd9537c10c811d5d43e0d49f8e0 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 3 Oct 2024 16:13:54 -0700 Subject: [PATCH 21/38] Added StressTest --- .../AudioTests/proj/vc2019/AudioTests.vcxproj | 2 + .../proj/vc2019/AudioTests.vcxproj.filters | 6 + test/_audio/AudioTests/src/AudioTestsApp.cpp | 2 + test/_audio/AudioTests/src/StressTest.cpp | 173 ++++++++++++++++++ test/_audio/AudioTests/src/StressTest.h | 40 ++++ 5 files changed, 223 insertions(+) create mode 100644 test/_audio/AudioTests/src/StressTest.cpp create mode 100644 test/_audio/AudioTests/src/StressTest.h diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj index 99172d84e3..b751e1484a 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj @@ -27,6 +27,7 @@ + @@ -41,6 +42,7 @@ + diff --git a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters index fda32cdef6..a7a3c71e9f 100644 --- a/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters +++ b/test/_audio/AudioTests/proj/vc2019/AudioTests.vcxproj.filters @@ -39,6 +39,9 @@ src + + src + @@ -77,5 +80,8 @@ src + + src + \ No newline at end of file diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 4b94473faa..a38e347340 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -17,6 +17,7 @@ #include "SpectralTest.h" #include "WaveTableTest.h" #include "VoiceTest.h" +#include "StressTest.h" using namespace ci; using namespace std; @@ -93,6 +94,7 @@ void AudioTestsApp::setup() mTestFactory.registerBuilder( "Spectral" ); mTestFactory.registerBuilder( "WaveTable" ); mTestFactory.registerBuilder( "Voice" ); + mTestFactory.registerBuilder( "Stress" ); auto ctx = audio::master(); diff --git a/test/_audio/AudioTests/src/StressTest.cpp b/test/_audio/AudioTests/src/StressTest.cpp new file mode 100644 index 0000000000..0afdd113cd --- /dev/null +++ b/test/_audio/AudioTests/src/StressTest.cpp @@ -0,0 +1,173 @@ +#include "StressTest.h" + +#include "cinder/app/App.h" +#include "cinder/Rand.h" +#include "cinder/CinderAssert.h" +#include "cinder/Log.h" +#include "cinder/CinderImGui.h" + +#include "cinder/audio/Utilities.h" + +using namespace ci; +using namespace std; +namespace im = ImGui; + +StressTest::StressTest() +{ + mSubTests = { + "sine", + "triangle", + "osc sine", + "osc sawtooth", + "osc square", + "osc triangle", + }; + + auto ctx = audio::master(); + mGain = ctx->makeNode( new audio::GainNode ); + mGain->setValue( 0.1f ); + + mMonitor = audio::master()->makeNode( new audio::MonitorSpectralNode( audio::MonitorSpectralNode::Format().fftSize( 1024 ).windowSize( 2048 ) ) ); + mMonitor->setSmoothingFactor( 0.4f ); + + mGain >> mMonitor >> ctx->getOutput(); + + addGens(); +} + +void StressTest::setupSubTest( const string &testName ) +{ + if( testName == "sine" ) + mSelectedGenType = SINE; + else if( testName == "triangle" ) + mSelectedGenType = TRIANGLE; + else if( testName == "osc sine" ) { + mSelectedGenType = OSC_SINE; + mWaveTable.reset(); + } + else if( testName == "osc sawtooth" ) { + mSelectedGenType = OSC_SAW; + mWaveTable.reset(); + } + else if( testName == "osc square" ) { + mSelectedGenType = OSC_SQUARE; + mWaveTable.reset(); + } + else if( testName == "osc triangle" ) { + mSelectedGenType = OSC_TRIANGLE; + mWaveTable.reset(); + } +} + +void StressTest::addGens() +{ + auto ctx = audio::master(); + + for( size_t i = 0; i < mAddIncr; i++ ) { + auto gen = makeSelectedGenType(); + gen->setFreq( audio::midiToFreq( randInt( 40, 60 ) ) ); + + gen->connect( mGain ); + gen->enable(); + + mGenBank.push_back( gen ); + } +} + +void StressTest::removeGens() +{ + for( size_t i = 0; i < mAddIncr; i++ ) { + mGenBank.back()->disconnectAll(); + mGenBank.pop_back(); + } +} + +void StressTest::clearGens() +{ + while( ! mGenBank.empty() ) { + mGenBank.back()->disconnectAll(); + mGenBank.pop_back(); + } +} + +audio::GenNodeRef StressTest::makeSelectedGenType() +{ + switch( mSelectedGenType ) { + case SINE: return audio::master()->makeNode( new audio::GenSineNode ); + case TRIANGLE: return audio::master()->makeNode( new audio::GenTriangleNode ); + case OSC_SINE: return makeOsc( audio::WaveformType::SINE ); + case OSC_SAW: return makeOsc( audio::WaveformType::SAWTOOTH ); + case OSC_SQUARE: return makeOsc( audio::WaveformType::SQUARE ); + case OSC_TRIANGLE: return makeOsc( audio::WaveformType::TRIANGLE ); + default: CI_ASSERT_NOT_REACHABLE(); + } + + return {}; +} + +audio::GenNodeRef StressTest::makeOsc( audio::WaveformType type ) +{ + auto ctx = audio::master(); + auto result = ctx->makeNode( new audio::GenOscNode( type ) ); + + if( mWaveTable ) + result->setWaveTable( mWaveTable ); + else { + ctx->initializeNode( result ); + + mWaveTable = result->getWaveTable(); + } + + return result; +} + +void StressTest::draw() +{ + if( ! mDrawingEnabled ) { + return; + } + + const float padding = 10; + const float scopeHeight = ( app::getWindowHeight() - padding * 3 ) / 2; + + Rectf rect( padding, padding, app::getWindowWidth() - padding - 200, scopeHeight + padding ); + + drawAudioBuffer( mMonitor->getBuffer(), rect, true ); + + rect += vec2( 0, scopeHeight + padding ); + mSpectrumPlot.setBounds( rect ); + mSpectrumPlot.draw( mMonitor->getMagSpectrum() ); + +} + +// ----------------------------------------------------------------------- +// UI +// ----------------------------------------------------------------------- + +void StressTest::updateUI() +{ + im::Text( "Gen count: %d", mGenBank.size() ); + + float gain = mGain->getValue(); + if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { + mGain->setValue( gain ); + } + im::InputInt( "add incr", &mAddIncr, 1, 10 ); + if( im::Button( "add gens" ) ) { + addGens(); + } + im::SameLine(); + if( im::Button( "remove gens" ) ) { + removeGens(); + } + im::SameLine(); + if( im::Button( "clear" ) ) { + clearGens(); + } + + im::Checkbox( "draw waveforms", &mDrawingEnabled ); + + if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupSubTest( mSubTests[mCurrentSubTest] ); + } +} \ No newline at end of file diff --git a/test/_audio/AudioTests/src/StressTest.h b/test/_audio/AudioTests/src/StressTest.h new file mode 100644 index 0000000000..29280b35d8 --- /dev/null +++ b/test/_audio/AudioTests/src/StressTest.h @@ -0,0 +1,40 @@ +#pragma once + +#include "AudioTest.h" + +#include "cinder/audio/GenNode.h" +#include "cinder/audio/GainNode.h" +#include "cinder/audio/MonitorNode.h" + +#include "../../../../samples/_audio/common/AudioDrawUtils.h" + +class StressTest : public AudioTest { + public: + StressTest(); + + void draw() override; + void updateUI() override; + + private: + void addGens(); + void removeGens(); + void clearGens(); + + void setupSubTest( const std::string &testName ); + + ci::audio::GenNodeRef makeSelectedGenType(); + ci::audio::GenNodeRef makeOsc( ci::audio::WaveformType type ); + + ci::audio::GainNodeRef mGain; + ci::audio::MonitorSpectralNodeRef mMonitor; + ci::audio::WaveTable2dRef mWaveTable; + std::vector mGenBank; + + SpectrumPlot mSpectrumPlot; + + enum GenType { SINE, TRIANGLE, OSC_SINE, OSC_SAW, OSC_SQUARE, OSC_TRIANGLE }; + + bool mDrawingEnabled = true; + int mAddIncr = 1; + GenType mSelectedGenType = OSC_SQUARE; +}; From 6d0af2850c8bd1a285897561ca97d4257a0d54c7 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Sat, 5 Oct 2024 11:48:48 -0700 Subject: [PATCH 22/38] minor test UI improvements --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 10 ++++---- test/_audio/AudioTests/src/StressTest.cpp | 26 ++++++++++---------- test/_audio/AudioTests/src/StressTest.h | 2 +- test/_audio/AudioTests/src/VoiceTest.cpp | 10 +++++++- test/_audio/AudioTests/src/VoiceTest.h | 1 + 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index a38e347340..4a304c2a52 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -311,11 +311,6 @@ void AudioTestsApp::updateImGui() audio::master()->setEnabled( audioEnabled ); } - static vector sTests = mTestFactory.getAllKeys(); - if( im::Combo( "tests", &mCurrenTestIndex, sTests ) ) { - reload(); - } - if( im::Button( "print audio graph" ) ) { app::console() << audio::master()->printGraphToString(); app::console() << "--------------------------------------------------" << endl; @@ -324,6 +319,11 @@ void AudioTestsApp::updateImGui() if( im::Button( "print default output" ) ) { printDefaultOutput(); } + static vector sTests = mTestFactory.getAllKeys(); + if( im::ListBox( "tests", &mCurrenTestIndex, sTests, (int)sTests.size() ) ) { + reload(); + } + } im::End(); // "General" diff --git a/test/_audio/AudioTests/src/StressTest.cpp b/test/_audio/AudioTests/src/StressTest.cpp index 0afdd113cd..459a6c8f42 100644 --- a/test/_audio/AudioTests/src/StressTest.cpp +++ b/test/_audio/AudioTests/src/StressTest.cpp @@ -35,25 +35,25 @@ StressTest::StressTest() addGens(); } -void StressTest::setupSubTest( const string &testName ) +void StressTest::setupNextGenType( const string &genType ) { - if( testName == "sine" ) + if( genType == "sine" ) mSelectedGenType = SINE; - else if( testName == "triangle" ) + else if( genType == "triangle" ) mSelectedGenType = TRIANGLE; - else if( testName == "osc sine" ) { + else if( genType == "osc sine" ) { mSelectedGenType = OSC_SINE; mWaveTable.reset(); } - else if( testName == "osc sawtooth" ) { + else if( genType == "osc sawtooth" ) { mSelectedGenType = OSC_SAW; mWaveTable.reset(); } - else if( testName == "osc square" ) { + else if( genType == "osc square" ) { mSelectedGenType = OSC_SQUARE; mWaveTable.reset(); } - else if( testName == "osc triangle" ) { + else if( genType == "osc triangle" ) { mSelectedGenType = OSC_TRIANGLE; mWaveTable.reset(); } @@ -114,7 +114,6 @@ audio::GenNodeRef StressTest::makeOsc( audio::WaveformType type ) result->setWaveTable( mWaveTable ); else { ctx->initializeNode( result ); - mWaveTable = result->getWaveTable(); } @@ -148,9 +147,9 @@ void StressTest::updateUI() { im::Text( "Gen count: %d", mGenBank.size() ); - float gain = mGain->getValue(); - if( im::SliderFloat( "gain", &gain, 0, 1 ) ) { - mGain->setValue( gain ); + float gain = audio::linearToDecibel( mGain->getValue() ); + if( im::SliderFloat( "gain (db)", &gain, 0, 100 ) ) { + mGain->setValue( audio::decibelToLinear( gain ) ); } im::InputInt( "add incr", &mAddIncr, 1, 10 ); if( im::Button( "add gens" ) ) { @@ -167,7 +166,8 @@ void StressTest::updateUI() im::Checkbox( "draw waveforms", &mDrawingEnabled ); - if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { - setupSubTest( mSubTests[mCurrentSubTest] ); + // we're using mSubTests here for convenience, but this only affects Gens added in the future + if( im::ListBox( "next gen type", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { + setupNextGenType( mSubTests[mCurrentSubTest] ); } } \ No newline at end of file diff --git a/test/_audio/AudioTests/src/StressTest.h b/test/_audio/AudioTests/src/StressTest.h index 29280b35d8..020a63ada9 100644 --- a/test/_audio/AudioTests/src/StressTest.h +++ b/test/_audio/AudioTests/src/StressTest.h @@ -20,7 +20,7 @@ class StressTest : public AudioTest { void removeGens(); void clearGens(); - void setupSubTest( const std::string &testName ); + void setupNextGenType( const std::string &genType ); ci::audio::GenNodeRef makeSelectedGenType(); ci::audio::GenNodeRef makeOsc( ci::audio::WaveformType type ); diff --git a/test/_audio/AudioTests/src/VoiceTest.cpp b/test/_audio/AudioTests/src/VoiceTest.cpp index fb41c22425..7c172bc732 100644 --- a/test/_audio/AudioTests/src/VoiceTest.cpp +++ b/test/_audio/AudioTests/src/VoiceTest.cpp @@ -33,6 +33,7 @@ void VoiceTest::openFile( const ci::fs::path &fullPath ) { mVoice = audio::Voice::create( audio::load( loadFile( fullPath ) ) ); mVoice->setVolume( mVolume ); + mVoice->setPan( mPan ); } void VoiceTest::setupSubTest( const std::string &testName ) @@ -51,25 +52,29 @@ void VoiceTest::setupBasic() { mVoice = audio::Voice::create( audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ) ); mVoice->setVolume( mVolume ); + mVoice->setPan( mPan ); } void VoiceTest::setupBasicStereo() { mVoice = audio::Voice::create( audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ), audio::Voice::Options().channels( 2 ) ); mVoice->setVolume( mVolume ); + mVoice->setPan( mPan ); } void VoiceTest::setupDifferentFile() { mVoice = audio::Voice::create( audio::load( app::loadAsset( "tone440L220R.mp3" ) ) ); mVoice->setVolume( mVolume ); - + mVoice->setPan( mPan ); } + void VoiceTest::setupScope() { auto sourceFile = audio::load( app::loadAsset( DEFAULT_SOUNDFILE ) ); mVoice = audio::Voice::create( sourceFile, audio::Voice::Options().connectToMaster( false ) ); mVoice->setVolume( mVolume ); + mVoice->setPan( mPan ); auto ctx = audio::master(); mMonitor = ctx->makeNode( new audio::MonitorNode ); @@ -99,6 +104,9 @@ void VoiceTest::updateUI() if( im::SliderFloat( "volume", &mVolume, 0, 1 ) ) { mVoice->setVolume( mVolume ); } + if( im::SliderFloat( "pan", &mPan, 0, 1 ) ) { + mVoice->setPan( mPan ); + } if( im::ListBox( "sub-tests", &mCurrentSubTest, mSubTests, mSubTests.size() ) ) { setupSubTest( mSubTests[mCurrentSubTest] ); diff --git a/test/_audio/AudioTests/src/VoiceTest.h b/test/_audio/AudioTests/src/VoiceTest.h index cf7786dbac..7741f9c520 100644 --- a/test/_audio/AudioTests/src/VoiceTest.h +++ b/test/_audio/AudioTests/src/VoiceTest.h @@ -26,5 +26,6 @@ class VoiceTest : public AudioTest { //enum InputBus { SINE, NOISE }; float mVolume = 0.4f; + float mPan = 0.5f; }; From 8a6e218286c96769484e2ff4b62f24212ee2bae7 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Sat, 5 Oct 2024 11:52:28 -0700 Subject: [PATCH 23/38] Removed old test projects that have been replaced with AudioTests suite --- test/_audio/AudioTest.msw/AudioTest.sln | 298 ------- test/_audio/AudioTest.msw/PropertySheet.props | 20 - .../contents.xcworkspacedata | 70 -- test/_audio/DeviceTest/include/Resources.h | 12 - .../DeviceTest/proj/cmake/CMakeLists.txt | 14 - test/_audio/DeviceTest/src/DeviceTestApp.cpp | 771 ------------------ test/_audio/DeviceTest/vc2015/DeviceTest.sln | 21 - .../DeviceTest/vc2015/DeviceTest.vcxproj | 219 ----- .../vc2015/DeviceTest.vcxproj.filters | 25 - .../DeviceTest.xcodeproj/project.pbxproj | 405 --------- .../xcschemes/DeviceTest.xcscheme | 86 -- .../DeviceTest/xcode/DeviceTest_Prefix.pch | 13 - test/_audio/DeviceTest/xcode/Info.plist | 34 - .../DeviceTest/xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes .../DeviceTest.xcodeproj/project.pbxproj | 346 -------- .../xcschemes/DeviceTest-ios.xcscheme | 86 -- .../xcode_ios/DeviceTest_Prefix.pch | 17 - test/_audio/DeviceTest/xcode_ios/Info.plist | 60 -- .../src/NodeEffectsTestApp.cpp | 353 -------- .../vc2015/NodeEffectsTest.sln | 21 - .../vc2015/NodeEffectsTest.vcxproj | 220 ----- .../vc2015/NodeEffectsTest.vcxproj.filters | 29 - test/_audio/NodeEffectsTest/xcode/Info.plist | 34 - .../NodeEffectsTest.xcodeproj/project.pbxproj | 405 --------- .../xcschemes/NodeEffectsTest.xcscheme | 86 -- test/_audio/NodeEffectsTest/xcode/Prefix.pch | 13 - .../xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes .../NodeEffectsTest/xcode_ios/Info.plist | 60 -- .../NodeEffectsTest.xcodeproj/project.pbxproj | 341 -------- .../xcschemes/NodeEffectsTest-ios.xcscheme | 86 -- .../NodeEffectsTest/xcode_ios/Prefix.pch | 17 - .../NodeTest/src/InterleavedPassThruNode.h | 28 - test/_audio/NodeTest/src/NodeTestApp.cpp | 394 --------- test/_audio/NodeTest/vc2015/NodeTest.sln | 21 - test/_audio/NodeTest/vc2015/NodeTest.vcxproj | 224 ----- .../NodeTest/vc2015/NodeTest.vcxproj.filters | 42 - test/_audio/NodeTest/xcode/Info.plist | 34 - .../xcode/NodeTest.xcodeproj/project.pbxproj | 421 ---------- .../xcshareddata/xcschemes/NodeTest.xcscheme | 86 -- test/_audio/NodeTest/xcode/Prefix.pch | 12 - .../NodeTest/xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes test/_audio/NodeTest/xcode_ios/Info.plist | 61 -- .../NodeTest.xcodeproj/project.pbxproj | 369 --------- .../xcschemes/NodeTest-ios.xcscheme | 86 -- test/_audio/NodeTest/xcode_ios/Prefix.pch | 12 - test/_audio/ParamTest/src/ParamTestApp.cpp | 371 --------- test/_audio/ParamTest/vc2015/ParamTest.sln | 21 - .../_audio/ParamTest/vc2015/ParamTest.vcxproj | 217 ----- .../vc2015/ParamTest.vcxproj.filters | 17 - test/_audio/ParamTest/xcode/Info.plist | 34 - .../xcode/ParamTest.xcodeproj/project.pbxproj | 403 --------- .../xcshareddata/xcschemes/ParamTest.xcscheme | 86 -- .../ParamTest/xcode/ParamTest_Prefix.pch | 13 - .../ParamTest/xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes test/_audio/ParamTest/xcode_ios/Info.plist | 60 -- .../ParamTest.xcodeproj/project.pbxproj | 331 -------- .../xcschemes/ParamTest-ios.xcscheme | 86 -- .../ParamTest/xcode_ios/ParamTest_Prefix.pch | 17 - test/_audio/SampleTest/include/Resources.h | 13 - .../SampleTest/proj/cmake/CMakeLists.txt | 21 - test/_audio/SampleTest/src/SampleTestApp.cpp | 646 --------------- test/_audio/SampleTest/vc2015/Resources.rc | 11 - test/_audio/SampleTest/vc2015/SampleTest.sln | 21 - .../SampleTest/vc2015/SampleTest.vcxproj | 210 ----- .../vc2015/SampleTest.vcxproj.filters | 44 - test/_audio/SampleTest/xcode/Info.plist | 34 - test/_audio/SampleTest/xcode/Prefix.pch | 13 - .../SampleTest.xcodeproj/project.pbxproj | 445 ---------- .../xcschemes/SampleTest.xcscheme | 86 -- .../SampleTest/xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes test/_audio/SampleTest/xcode_ios/Info.plist | 60 -- test/_audio/SampleTest/xcode_ios/Prefix.pch | 17 - .../SampleTest.xcodeproj/project.pbxproj | 331 -------- .../xcschemes/SampleTest-ios.xcscheme | 86 -- test/_audio/SpectralTest/include/Resources.h | 5 - .../SpectralTest/src/SpectralTestApp.cpp | 309 ------- test/_audio/SpectralTest/vc2015/Resources.rc | 3 - .../SpectralTest/vc2015/SpectralTest.sln | 21 - .../SpectralTest/vc2015/SpectralTest.vcxproj | 210 ----- .../vc2015/SpectralTest.vcxproj.filters | 44 - test/_audio/SpectralTest/xcode/Info.plist | 34 - test/_audio/SpectralTest/xcode/Prefix.pch | 13 - .../SpectralTest.xcodeproj/project.pbxproj | 425 ---------- .../xcschemes/SpectralTest.xcscheme | 86 -- .../xcode_ios/Default-568h@2x.png | Bin 5376 -> 0 bytes test/_audio/SpectralTest/xcode_ios/Info.plist | 60 -- test/_audio/SpectralTest/xcode_ios/Prefix.pch | 17 - .../SpectralTest.xcodeproj/project.pbxproj | 334 -------- .../xcschemes/SpectralTest-ios.xcscheme | 86 -- test/_audio/StressTest/src/StressTestApp.cpp | 316 ------- test/_audio/StressTest/vc2015/StressTest.sln | 21 - .../StressTest/vc2015/StressTest.vcxproj | 223 ----- .../vc2015/StressTest.vcxproj.filters | 39 - test/_audio/StressTest/xcode/Info.plist | 34 - test/_audio/StressTest/xcode/Prefix.pch | 13 - .../StressTest.xcodeproj/project.pbxproj | 419 ---------- .../xcschemes/StressTest.xcscheme | 86 -- test/_audio/VoiceTest/include/Resources.h | 6 - test/_audio/VoiceTest/src/VoiceTestApp.cpp | 186 ----- test/_audio/VoiceTest/vc2015/Resources.rc | 4 - test/_audio/VoiceTest/vc2015/VoiceTest.sln | 21 - .../_audio/VoiceTest/vc2015/VoiceTest.vcxproj | 226 ----- .../vc2015/VoiceTest.vcxproj.filters | 44 - test/_audio/VoiceTest/xcode/Info.plist | 34 - test/_audio/VoiceTest/xcode/Prefix.pch | 12 - .../xcode/VoiceTest.xcodeproj/project.pbxproj | 431 ---------- .../xcshareddata/xcschemes/VoiceTest.xcscheme | 86 -- .../WaveTableTest/src/WaveTableTestApp.cpp | 335 -------- .../WaveTableTest/vc2015/WaveTableTest.sln | 21 - .../vc2015/WaveTableTest.vcxproj | 223 ----- .../vc2015/WaveTableTest.vcxproj.filters | 39 - test/_audio/WaveTableTest/xcode/Info.plist | 34 - test/_audio/WaveTableTest/xcode/Prefix.pch | 13 - .../WaveTableTest.xcodeproj/project.pbxproj | 419 ---------- .../xcschemes/WaveTableTest.xcscheme | 86 -- 115 files changed, 14664 deletions(-) delete mode 100644 test/_audio/AudioTest.msw/AudioTest.sln delete mode 100644 test/_audio/AudioTest.msw/PropertySheet.props delete mode 100644 test/_audio/AudioTest.xcworkspace/contents.xcworkspacedata delete mode 100644 test/_audio/DeviceTest/include/Resources.h delete mode 100644 test/_audio/DeviceTest/proj/cmake/CMakeLists.txt delete mode 100644 test/_audio/DeviceTest/src/DeviceTestApp.cpp delete mode 100644 test/_audio/DeviceTest/vc2015/DeviceTest.sln delete mode 100644 test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj delete mode 100644 test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj.filters delete mode 100644 test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest.xcscheme delete mode 100644 test/_audio/DeviceTest/xcode/DeviceTest_Prefix.pch delete mode 100644 test/_audio/DeviceTest/xcode/Info.plist delete mode 100644 test/_audio/DeviceTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest-ios.xcscheme delete mode 100644 test/_audio/DeviceTest/xcode_ios/DeviceTest_Prefix.pch delete mode 100644 test/_audio/DeviceTest/xcode_ios/Info.plist delete mode 100644 test/_audio/NodeEffectsTest/src/NodeEffectsTestApp.cpp delete mode 100644 test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.sln delete mode 100644 test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj delete mode 100644 test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj.filters delete mode 100644 test/_audio/NodeEffectsTest/xcode/Info.plist delete mode 100644 test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest.xcscheme delete mode 100644 test/_audio/NodeEffectsTest/xcode/Prefix.pch delete mode 100644 test/_audio/NodeEffectsTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/NodeEffectsTest/xcode_ios/Info.plist delete mode 100644 test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest-ios.xcscheme delete mode 100644 test/_audio/NodeEffectsTest/xcode_ios/Prefix.pch delete mode 100644 test/_audio/NodeTest/src/InterleavedPassThruNode.h delete mode 100644 test/_audio/NodeTest/src/NodeTestApp.cpp delete mode 100644 test/_audio/NodeTest/vc2015/NodeTest.sln delete mode 100644 test/_audio/NodeTest/vc2015/NodeTest.vcxproj delete mode 100644 test/_audio/NodeTest/vc2015/NodeTest.vcxproj.filters delete mode 100644 test/_audio/NodeTest/xcode/Info.plist delete mode 100644 test/_audio/NodeTest/xcode/NodeTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/NodeTest/xcode/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest.xcscheme delete mode 100644 test/_audio/NodeTest/xcode/Prefix.pch delete mode 100644 test/_audio/NodeTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/NodeTest/xcode_ios/Info.plist delete mode 100644 test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest-ios.xcscheme delete mode 100644 test/_audio/NodeTest/xcode_ios/Prefix.pch delete mode 100644 test/_audio/ParamTest/src/ParamTestApp.cpp delete mode 100644 test/_audio/ParamTest/vc2015/ParamTest.sln delete mode 100644 test/_audio/ParamTest/vc2015/ParamTest.vcxproj delete mode 100644 test/_audio/ParamTest/vc2015/ParamTest.vcxproj.filters delete mode 100644 test/_audio/ParamTest/xcode/Info.plist delete mode 100644 test/_audio/ParamTest/xcode/ParamTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/ParamTest/xcode/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest.xcscheme delete mode 100644 test/_audio/ParamTest/xcode/ParamTest_Prefix.pch delete mode 100644 test/_audio/ParamTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/ParamTest/xcode_ios/Info.plist delete mode 100644 test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest-ios.xcscheme delete mode 100644 test/_audio/ParamTest/xcode_ios/ParamTest_Prefix.pch delete mode 100644 test/_audio/SampleTest/include/Resources.h delete mode 100644 test/_audio/SampleTest/proj/cmake/CMakeLists.txt delete mode 100644 test/_audio/SampleTest/src/SampleTestApp.cpp delete mode 100644 test/_audio/SampleTest/vc2015/Resources.rc delete mode 100644 test/_audio/SampleTest/vc2015/SampleTest.sln delete mode 100644 test/_audio/SampleTest/vc2015/SampleTest.vcxproj delete mode 100644 test/_audio/SampleTest/vc2015/SampleTest.vcxproj.filters delete mode 100644 test/_audio/SampleTest/xcode/Info.plist delete mode 100644 test/_audio/SampleTest/xcode/Prefix.pch delete mode 100644 test/_audio/SampleTest/xcode/SampleTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/SampleTest/xcode/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest.xcscheme delete mode 100644 test/_audio/SampleTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/SampleTest/xcode_ios/Info.plist delete mode 100644 test/_audio/SampleTest/xcode_ios/Prefix.pch delete mode 100644 test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest-ios.xcscheme delete mode 100644 test/_audio/SpectralTest/include/Resources.h delete mode 100644 test/_audio/SpectralTest/src/SpectralTestApp.cpp delete mode 100644 test/_audio/SpectralTest/vc2015/Resources.rc delete mode 100644 test/_audio/SpectralTest/vc2015/SpectralTest.sln delete mode 100644 test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj delete mode 100644 test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj.filters delete mode 100644 test/_audio/SpectralTest/xcode/Info.plist delete mode 100644 test/_audio/SpectralTest/xcode/Prefix.pch delete mode 100644 test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest.xcscheme delete mode 100644 test/_audio/SpectralTest/xcode_ios/Default-568h@2x.png delete mode 100644 test/_audio/SpectralTest/xcode_ios/Info.plist delete mode 100644 test/_audio/SpectralTest/xcode_ios/Prefix.pch delete mode 100644 test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest-ios.xcscheme delete mode 100644 test/_audio/StressTest/src/StressTestApp.cpp delete mode 100644 test/_audio/StressTest/vc2015/StressTest.sln delete mode 100644 test/_audio/StressTest/vc2015/StressTest.vcxproj delete mode 100644 test/_audio/StressTest/vc2015/StressTest.vcxproj.filters delete mode 100644 test/_audio/StressTest/xcode/Info.plist delete mode 100644 test/_audio/StressTest/xcode/Prefix.pch delete mode 100644 test/_audio/StressTest/xcode/StressTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/StressTest/xcode/StressTest.xcodeproj/xcshareddata/xcschemes/StressTest.xcscheme delete mode 100644 test/_audio/VoiceTest/include/Resources.h delete mode 100644 test/_audio/VoiceTest/src/VoiceTestApp.cpp delete mode 100644 test/_audio/VoiceTest/vc2015/Resources.rc delete mode 100644 test/_audio/VoiceTest/vc2015/VoiceTest.sln delete mode 100644 test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj delete mode 100644 test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj.filters delete mode 100644 test/_audio/VoiceTest/xcode/Info.plist delete mode 100644 test/_audio/VoiceTest/xcode/Prefix.pch delete mode 100644 test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/xcshareddata/xcschemes/VoiceTest.xcscheme delete mode 100644 test/_audio/WaveTableTest/src/WaveTableTestApp.cpp delete mode 100644 test/_audio/WaveTableTest/vc2015/WaveTableTest.sln delete mode 100644 test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj delete mode 100644 test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj.filters delete mode 100644 test/_audio/WaveTableTest/xcode/Info.plist delete mode 100644 test/_audio/WaveTableTest/xcode/Prefix.pch delete mode 100644 test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/project.pbxproj delete mode 100644 test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/xcshareddata/xcschemes/WaveTableTest.xcscheme diff --git a/test/_audio/AudioTest.msw/AudioTest.sln b/test/_audio/AudioTest.msw/AudioTest.sln deleted file mode 100644 index 85b2fb6039..0000000000 --- a/test/_audio/AudioTest.msw/AudioTest.sln +++ /dev/null @@ -1,298 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28922.388 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cinder", "..\..\..\proj\vc2015\cinder.vcxproj", "{92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeviceTest", "..\DeviceTest\vc2015\DeviceTest.vcxproj", "{74DC81AA-4A14-4966-BB88-794EB0C0F354}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NodeEffectsTest", "..\NodeEffectsTest\vc2015\NodeEffectsTest.vcxproj", "{A4E4C761-C966-49BC-B393-7DB37AD2D367}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NodeTest", "..\NodeTest\vc2015\NodeTest.vcxproj", "{F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParamTest", "..\ParamTest\vc2015\ParamTest.vcxproj", "{A8EA7518-49AF-4238-B769-DB509F20342F}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleTest", "..\SampleTest\vc2015\SampleTest.vcxproj", "{20E84023-6E68-4387-B158-0A13FDA53646}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpectralTest", "..\SpectralTest\vc2015\SpectralTest.vcxproj", "{A576F01A-FF4D-44BE-BB7F-D589F7F3A376}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StressTest", "..\StressTest\vc2015\StressTest.vcxproj", "{1620909D-C0A6-4C43-BB27-1AA36859A81E}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceTest", "..\VoiceTest\vc2015\VoiceTest.vcxproj", "{98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WaveTableTest", "..\WaveTableTest\vc2015\WaveTableTest.vcxproj", "{276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}" - ProjectSection(ProjectDependencies) = postProject - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} = {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_ANGLE|Win32 = Debug_ANGLE|Win32 - Debug_ANGLE|x64 = Debug_ANGLE|x64 - Debug_Shared|Win32 = Debug_Shared|Win32 - Debug_Shared|x64 = Debug_Shared|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release_ANGLE|Win32 = Release_ANGLE|Win32 - Release_ANGLE|x64 = Release_ANGLE|x64 - Release_Shared|Win32 = Release_Shared|Win32 - Release_Shared|x64 = Release_Shared|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|Win32.ActiveCfg = Debug_ANGLE|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|Win32.Build.0 = Debug_ANGLE|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x64.ActiveCfg = Debug_ANGLE|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_ANGLE|x64.Build.0 = Debug_ANGLE|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|Win32.ActiveCfg = Debug_Shared|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|Win32.Build.0 = Debug_Shared|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x64.ActiveCfg = Debug_Shared|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug_Shared|x64.Build.0 = Debug_Shared|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|Win32.ActiveCfg = Debug|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|Win32.Build.0 = Debug|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x64.ActiveCfg = Debug|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Debug|x64.Build.0 = Debug|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|Win32.ActiveCfg = Release_ANGLE|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|Win32.Build.0 = Release_ANGLE|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x64.ActiveCfg = Release_ANGLE|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_ANGLE|x64.Build.0 = Release_ANGLE|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|Win32.ActiveCfg = Release_Shared|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|Win32.Build.0 = Release_Shared|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x64.ActiveCfg = Release_Shared|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release_Shared|x64.Build.0 = Release_Shared|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|Win32.ActiveCfg = Release|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|Win32.Build.0 = Release|Win32 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x64.ActiveCfg = Release|x64 - {92B5BE70-DCAA-40E4-92D8-CC2B95AA28BE}.Release|x64.Build.0 = Release|x64 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug_Shared|x64.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug|Win32.ActiveCfg = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug|Win32.Build.0 = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug|x64.ActiveCfg = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_ANGLE|x64.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_Shared|Win32.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_Shared|x64.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release_Shared|x64.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release|Win32.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release|Win32.Build.0 = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release|x64.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug_Shared|x64.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug|Win32.Build.0 = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug|x64.ActiveCfg = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_ANGLE|x64.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_Shared|Win32.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_Shared|x64.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release_Shared|x64.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release|Win32.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release|Win32.Build.0 = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release|x64.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug_Shared|x64.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug|Win32.Build.0 = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug|x64.ActiveCfg = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_ANGLE|x64.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_Shared|Win32.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_Shared|x64.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release_Shared|x64.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release|Win32.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release|Win32.Build.0 = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release|x64.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug_Shared|x64.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug|Win32.Build.0 = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug|x64.ActiveCfg = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_ANGLE|x64.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_Shared|Win32.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_Shared|x64.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release_Shared|x64.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release|Win32.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release|Win32.Build.0 = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release|x64.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug_Shared|x64.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug|Win32.ActiveCfg = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug|Win32.Build.0 = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug|x64.ActiveCfg = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_ANGLE|x64.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_Shared|Win32.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_Shared|x64.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release_Shared|x64.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release|Win32.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release|Win32.Build.0 = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release|x64.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug_Shared|x64.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug|Win32.ActiveCfg = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug|Win32.Build.0 = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug|x64.ActiveCfg = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_ANGLE|x64.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_Shared|Win32.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_Shared|x64.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release_Shared|x64.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release|Win32.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release|Win32.Build.0 = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release|x64.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug_Shared|x64.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug|Win32.Build.0 = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug|x64.ActiveCfg = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_ANGLE|x64.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_Shared|Win32.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_Shared|x64.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release_Shared|x64.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release|Win32.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release|Win32.Build.0 = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release|x64.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug_Shared|x64.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug|Win32.ActiveCfg = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug|Win32.Build.0 = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug|x64.ActiveCfg = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_ANGLE|x64.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_Shared|Win32.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_Shared|x64.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release_Shared|x64.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release|Win32.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release|Win32.Build.0 = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release|x64.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_ANGLE|Win32.ActiveCfg = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_ANGLE|Win32.Build.0 = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_ANGLE|x64.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_ANGLE|x64.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_Shared|Win32.ActiveCfg = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_Shared|Win32.Build.0 = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_Shared|x64.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug_Shared|x64.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug|Win32.Build.0 = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug|x64.ActiveCfg = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_ANGLE|Win32.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_ANGLE|Win32.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_ANGLE|x64.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_ANGLE|x64.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_Shared|Win32.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_Shared|Win32.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_Shared|x64.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release_Shared|x64.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release|Win32.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release|Win32.Build.0 = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release|x64.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3C09BC8A-6B4F-4FF0-BFD5-4C962F3CB4FD} - EndGlobalSection -EndGlobal diff --git a/test/_audio/AudioTest.msw/PropertySheet.props b/test/_audio/AudioTest.msw/PropertySheet.props deleted file mode 100644 index e2cbc9e5ac..0000000000 --- a/test/_audio/AudioTest.msw/PropertySheet.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - - ..\..\..\.. - 0x0601 - - - - - - $(CINDER_PATH) - true - - - $(AUDIO2_DEPLOYMENT_TARGET) - true - - - \ No newline at end of file diff --git a/test/_audio/AudioTest.xcworkspace/contents.xcworkspacedata b/test/_audio/AudioTest.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index aafb553c67..0000000000 --- a/test/_audio/AudioTest.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/DeviceTest/include/Resources.h b/test/_audio/DeviceTest/include/Resources.h deleted file mode 100644 index 4310736888..0000000000 --- a/test/_audio/DeviceTest/include/Resources.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "cinder/CinderResources.h" - -//#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) - - - - - - - - diff --git a/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt b/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt deleted file mode 100644 index b2b5c04216..0000000000 --- a/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) -set( CMAKE_VERBOSE_MAKEFILE ON ) - -project( audio-DeviceTest ) - -get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) -get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) - -include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) - -ci_make_app( - SOURCES ${APP_PATH}/src/DeviceTestApp.cpp - CINDER_PATH ${CINDER_PATH} -) diff --git a/test/_audio/DeviceTest/src/DeviceTestApp.cpp b/test/_audio/DeviceTest/src/DeviceTestApp.cpp deleted file mode 100644 index ecc157fd90..0000000000 --- a/test/_audio/DeviceTest/src/DeviceTestApp.cpp +++ /dev/null @@ -1,771 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Timeline.h" -#include "cinder/Log.h" - -#include "cinder/audio/Context.h" -#include "cinder/audio/GenNode.h" -#include "cinder/audio/GainNode.h" -#include "cinder/audio/ChannelRouterNode.h" -#include "cinder/audio/MonitorNode.h" -#include "cinder/audio/SampleRecorderNode.h" -#include "cinder/audio/dsp/Dsp.h" -#include "cinder/audio/Exception.h" - -#if defined( CINDER_MSW ) -#include "cinder/audio/msw/ContextWasapi.h" -#endif - -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -const bool USE_SECONDARY_SCREEN = 1; -const bool WASAPI_EXCLUSIVE_MODE = 0; -const bool SET_FRAMES_PER_BLOCK = 0; -const size_t FRAMES_PER_BLOCK = 256; -const double RECORD_SECONDS = 4.0; - -using namespace ci; -using namespace ci::app; -using namespace std; - -class DeviceTestApp : public App { - public: - void setup() override; - void update() override; - void draw() override; - - void setOutputDevice( const audio::DeviceRef &device, size_t numChannels = 0 ); - void setInputDevice( const audio::DeviceRef &device, size_t numChannels = 0 ); - void setupMultiChannelDevice( const string &deviceName ); - void setupMultiChannelDeviceWindows( const string &deviceName ); - void setupRolandOctaCaptureInputMonitoring(); - void printDeviceDetails( const audio::DeviceRef &device ); - void startRecording(); - void writeRecordedToFile(); - - void setupSine(); - void setupNoise(); - void setupInputPulled(); - void setupIOClean(); - void setupIOProcessed(); - void setupIOAndSine(); - void setupSend(); - void setupSendStereo(); - void updateUIParams(); - - void setupTest( string test ); - void setupUI(); - void processTap( ivec2 pos ); - void processDrag( ivec2 pos ); - void keyDown( KeyEvent event ); - - audio::InputDeviceNodeRef mInputDeviceNode; - audio::OutputDeviceNodeRef mOutputDeviceNode; - audio::MonitorNodeRef mMonitor; - audio::BufferRecorderNodeRef mRecorder; - audio::GainNodeRef mGain; - audio::GenNodeRef mGen; - - vector mWidgets; - VSelector mTestSelector, mInputSelector, mOutputSelector; - Button mPlayButton, mRecordButton; - HSlider mGainSlider; - TextInput mSamplerateInput, mFramesPerBlockInput, mNumInChannelsInput, mNumOutChannelsInput, mSendChannelInput; - - Anim mInputDeviceNodeUnderrunFade, mInputDeviceNodeOverrunFade, mOutputDeviceNodeClipFade; - Anim mViewYOffset; // for iOS keyboard - Rectf mUnderrunRect, mOverrunRect, mClipRect; -}; - -void DeviceTestApp::setup() -{ - console() << audio::Device::printDevicesToString() << endl; - - auto ctx = audio::master(); - -#if defined( CINDER_MSW ) - if( WASAPI_EXCLUSIVE_MODE ) { - CI_LOG_I( "enabling WASAPI exlusive mode" ); - dynamic_cast( ctx )->setExclusiveModeEnabled(); - } -#endif - - mMonitor = ctx->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 480 ) ) ); - mGain = ctx->makeNode( new audio::GainNode() ); - //mGain = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 1 ) ) ); // force mix down to mono - mGain->setValue( 0.8f ); - - mGain->connect( mMonitor ); - - setOutputDevice( audio::Device::getDefaultOutput() ); -// setOutputDevice( audio::Device::getDefaultOutput(), 1 ); - //setOutputDevice( audio::Device::findOutputByName( "1-2 (OCTA-CAPTURE)" ) ); - - setInputDevice( audio::Device::getDefaultInput() ); - //setInputDevice( audio::Device::getDefaultInput(), 1 ); - //setupRolandOctaCaptureInputMonitoring(); - - //setupMultiChannelDevice( "PreSonus FIREPOD (1431)" ); - //setupMultiChannelDeviceWindows( "MOTU Analog (MOTU Audio Wave for 64 bit)" ); - - mRecorder = ctx->makeNode( new audio::BufferRecorderNode( RECORD_SECONDS * ctx->getSampleRate() ) ); - mRecorder->setEnabled( false ); - mGain >> mRecorder; - - setupUI(); - setupTest( mTestSelector.currentSection() ); - - //setupInputPulled(); - //setupIOClean(); - - PRINT_GRAPH( ctx ); - CI_LOG_I( "Context samplerate: " << ctx->getSampleRate() << ", frames per block: " << ctx->getFramesPerBlock() ); -} - -void DeviceTestApp::setOutputDevice( const audio::DeviceRef &device, size_t numChannels ) -{ - if( ! device ) { - CI_LOG_E( "Empty DeviceRef" ); - return; - } - - if( SET_FRAMES_PER_BLOCK ) { - device->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); - } - - auto ctx = audio::master(); - - ctx->uninitializeAllNodes(); - - audio::Node::Format format; - if( numChannels ) - format.channels( numChannels ); - - mOutputDeviceNode = ctx->createOutputDeviceNode( device, format ); - - mOutputDeviceNode->getDevice()->getSignalParamsDidChange().connect( -1, - [this] { - CI_LOG_I( "OutputDeviceNode params changed:" ); - printDeviceDetails( mOutputDeviceNode->getDevice() ); - updateUIParams(); - //PRINT_GRAPH( audio::master() ); - } ); - - - // TODO: if this call is moved to after the mMonitor->connect(), there is a chance that initialization can - // take place with samplerate / frames-per-block derived from the default OutputNode (ses default Device) - // Double check this doesn't effect anyone, if it does then setOutput may need to do more work to update Nodes. - ctx->setOutput( mOutputDeviceNode ); - - mMonitor->connect( mOutputDeviceNode ); - - ctx->initializeAllNodes(); - - CI_LOG_I( "OutputDeviceNode device properties: " ); - printDeviceDetails( device ); - - // TODO: considering doing this automatically in Context::setOutput, but then also have to worry about initialize() - // - also may do a ScopedEnable that handles Context as well. - if( mPlayButton.mEnabled ) - mOutputDeviceNode->enable(); -} - -void DeviceTestApp::setInputDevice( const audio::DeviceRef &device, size_t numChannels ) -{ - if( ! device ) { - CI_LOG_E( "Empty DeviceRef" ); - return; - } - - audio::ScopedEnableNode enableNodeScope( mInputDeviceNode, false ); - - if( SET_FRAMES_PER_BLOCK ) { - device->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); - } - - if( mInputDeviceNode ) - mInputDeviceNode->disconnectAllOutputs(); - - auto format = audio::Node::Format().autoEnable(); - if( numChannels ) - format.channels( numChannels ); - - mInputDeviceNode = audio::master()->createInputDeviceNode( device, format ); - - CI_LOG_I( "InputDeviceNode device properties: " ); - printDeviceDetails( device ); -} - -void DeviceTestApp::setupMultiChannelDevice( const string &deviceName ) -{ - auto dev = audio::Device::findDeviceByName( deviceName ); - CI_ASSERT( dev ); - -// setOutputDevice( dev ); -// setInputDevice( dev ); - - setOutputDevice( dev, dev->getNumOutputChannels() ); - setInputDevice( dev, dev->getNumInputChannels() ); -} - -void DeviceTestApp::setupMultiChannelDeviceWindows( const string &deviceName ) -{ - auto outputDev = audio::Device::findOutputByName( deviceName ); - if( outputDev ) - setOutputDevice( outputDev, outputDev->getNumOutputChannels() ); - else - CI_LOG_E( "could not find output device named: " << deviceName ); - - auto inputDev = audio::Device::findInputByName( deviceName ); - if( inputDev ) - setInputDevice( inputDev, inputDev->getNumInputChannels() ); - else - CI_LOG_E( "could not find input device named: " << deviceName ); -} - -void DeviceTestApp::setupRolandOctaCaptureInputMonitoring() -{ - vector deviceNames = { - "1-2 (OCTA-CAPTURE)", - "3-4 (OCTA-CAPTURE)", - "5-6 (OCTA-CAPTURE)"//, - //"7-8 (OCTA-CAPTURE)", - //"9-10 (OCTA-CAPTURE)" - }; - - size_t numChannels = deviceNames.size() * 2; - auto channelRouter = audio::master()->makeNode( audio::Node::Format().channels( numChannels ) ); - - channelRouter >> mGain; - - for( size_t i = 0; i < deviceNames.size(); i++ ) { - auto devName = deviceNames[i]; - auto inputDev = audio::Device::findInputByName( devName ); - if( inputDev ) { - if( SET_FRAMES_PER_BLOCK ) { - inputDev->updateFormat( audio::Device::Format().framesPerBlock( FRAMES_PER_BLOCK ) ); - } - - auto inputNode = audio::master()->createInputDeviceNode( inputDev ); - inputNode >> channelRouter->route( 0, i * 2 ); - inputNode->enable(); - } - else - CI_LOG_E( "could not find input device named: " << devName ); - } -} - -void DeviceTestApp::printDeviceDetails( const audio::DeviceRef &device ) -{ - console() << "\t name: " << device->getName() << endl; - console() << "\t output channels: " << device->getNumOutputChannels() << endl; - console() << "\t input channels: " << device->getNumInputChannels() << endl; - console() << "\t samplerate: " << device->getSampleRate() << endl; - console() << "\t frames per block: " << device->getFramesPerBlock() << endl; - - bool isSyncIO = mInputDeviceNode && mOutputDeviceNode && ( mInputDeviceNode->getDevice() == mOutputDeviceNode->getDevice() && ( mInputDeviceNode->getNumChannels() == mOutputDeviceNode->getNumChannels() ) ); - - console() << "\t sync IO: " << boolalpha << isSyncIO << dec << endl; -} - -void DeviceTestApp::setupSine() -{ - mGen = audio::master()->makeNode( new audio::GenSineNode() ); - mGen->setFreq( 440 ); - - mGen->connect( mGain ); - mGen->enable(); -} - -void DeviceTestApp::setupNoise() -{ - mGen = audio::master()->makeNode( new audio::GenNoiseNode() ); - - mGen->connect( mGain ); - mGen->enable(); -} - -void DeviceTestApp::setupInputPulled() -{ - if( ! mInputDeviceNode ) { - CI_LOG_E( "no InputDeviceNode" ); - return; - } - - mOutputDeviceNode->disconnectAllInputs(); - - mInputDeviceNode >> mGain >> mMonitor; - mInputDeviceNode->enable(); -} - -void DeviceTestApp::setupIOClean() -{ - if( ! mInputDeviceNode ) { - CI_LOG_E( "no InputDeviceNode" ); - return; - } - - mInputDeviceNode->connect( mGain ); - mInputDeviceNode->enable(); -} - -void DeviceTestApp::setupIOProcessed() -{ - if( ! mInputDeviceNode ) { - CI_LOG_E( "no InputDeviceNode" ); - return; - } - - auto ctx = audio::master(); - auto mod = ctx->makeNode( new audio::GenSineNode( audio::Node::Format().autoEnable() ) ); - mod->setFreq( 200 ); - - auto ringMod = audio::master()->makeNode( new audio::GainNode ); - ringMod->setName( "RingModGain" ); - ringMod->getParam()->setProcessor( mod ); - - mGain->disconnectAllInputs(); - mInputDeviceNode >> ringMod >> mGain; - - mInputDeviceNode->enable(); -} - -void DeviceTestApp::setupIOAndSine() -{ - mGen = audio::master()->makeNode( new audio::GenSineNode() ); - mGen->setFreq( 440 ); - - mGen->connect( mGain ); - mGen->enable(); - - if( ! mInputDeviceNode ) { - CI_LOG_E( "no InputDeviceNode" ); - return; - } - - mInputDeviceNode->connect( mGain ); - mInputDeviceNode->enable(); -} - -void DeviceTestApp::setupSend() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( mOutputDeviceNode->getNumChannels() ) ) ); - - mGen = audio::master()->makeNode( new audio::GenSineNode( 440 ) ); - - auto input = mGen; - - int channelIndex = mSendChannelInput.getValue(); - CI_LOG_I( "routing input to channel: " << channelIndex ); - - input >> mGain >> router->route( 0, channelIndex ); - router >> mMonitor >> ctx->getOutput(); - - mGen->enable(); -} - -void DeviceTestApp::setupSendStereo() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( mOutputDeviceNode->getNumChannels() ) ) ); - auto upmix = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); - - int channelIndex = mSendChannelInput.getValue(); - CI_LOG_I( "routing input to channel: " << channelIndex ); - - mGen >> upmix >> mGain >> router->route( 0, channelIndex ); - router >> mMonitor >> ctx->getOutput(); - - mGen->enable(); -} - -void DeviceTestApp::startRecording() -{ - CI_LOG_I( "begin record..." ); - - mRecorder->start(); - timeline().add( [this] { - writeRecordedToFile(); - mRecorder->disable(); - }, timeline().getCurrentTime() + RECORD_SECONDS ); -} - -void DeviceTestApp::writeRecordedToFile() -{ - const string fileName = "recorder_out.wav"; - CI_LOG_I( "writing to: " << fileName ); - - mRecorder->writeToFile( fileName ); - - CI_LOG_I( "...complete." ); -} - -void DeviceTestApp::setupUI() -{ - mInputDeviceNodeUnderrunFade = mInputDeviceNodeOverrunFade = mOutputDeviceNodeClipFade = 0; - mViewYOffset = 0; - - mPlayButton = Button( true, "stopped", "playing" ); - mWidgets.push_back( &mPlayButton ); - - mRecordButton = Button( false, "record" ); - mWidgets.push_back( &mRecordButton ); - - mTestSelector.mSegments.push_back( "sinewave" ); - mTestSelector.mSegments.push_back( "noise" ); - mTestSelector.mSegments.push_back( "input (pulled)" ); - mTestSelector.mSegments.push_back( "I/O (clean)" ); - mTestSelector.mSegments.push_back( "I/O (processed)" ); - mTestSelector.mSegments.push_back( "I/O and sine" ); - mTestSelector.mSegments.push_back( "send" ); - mTestSelector.mSegments.push_back( "send stereo" ); - mTestSelector.mCurrentSectionIndex = 0; - mWidgets.push_back( &mTestSelector ); - -#if defined( CINDER_COCOA_TOUCH ) - mPlayButton.mBounds = Rectf( 0, 0, 120, 60 ); - mRecordButton.mBounds = Rectf( 130, 0, 190, 34 ); - mTestSelector.mBounds = Rectf( getWindowWidth() - 190, 0, getWindowWidth(), 180 ); -#else - mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); - mRecordButton.mBounds = Rectf( 210, 0, 310, 40 ); -#endif - mTestSelector.mBounds = Rectf( (float)getWindowWidth() - 210, 0, (float)getWindowWidth(), 180 ); - - mGainSlider.mBounds = Rectf( mTestSelector.mBounds.x1, mTestSelector.mBounds.y2 + 10, mTestSelector.mBounds.x2, mTestSelector.mBounds.y2 + 50 ); - mGainSlider.mTitle = "GainNode"; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - mOutputSelector.mTitle = "Output Devices"; - mOutputSelector.mBounds = Rectf( mTestSelector.mBounds.x1, getWindowCenter().y + 40, (float)getWindowWidth(), (float)getWindowHeight() ); - if( mOutputDeviceNode ) { - for( const auto &dev : audio::Device::getOutputDevices() ) { - if( dev == mOutputDeviceNode->getDevice() ) - mOutputSelector.mCurrentSectionIndex = mOutputSelector.mSegments.size(); - mOutputSelector.mSegments.push_back( dev->getName() ); - } - } - mWidgets.push_back( &mOutputSelector ); - - mInputSelector.mTitle = "Input Devices"; - mInputSelector.mBounds = mOutputSelector.mBounds - vec2( mOutputSelector.mBounds.getWidth() + 10, 0 ); - if( mInputDeviceNode ) { - for( const auto &dev : audio::Device::getInputDevices() ) { - if( dev == mInputDeviceNode->getDevice() ) - mInputSelector.mCurrentSectionIndex = mInputSelector.mSegments.size(); - mInputSelector.mSegments.push_back( dev->getName() ); - } - } - mWidgets.push_back( &mInputSelector ); - - Rectf textInputBounds( 0, getWindowCenter().y + 40, 200, getWindowCenter().y + 70 ); - mSamplerateInput.mBounds = textInputBounds; - mSamplerateInput.mTitle = "samplerate"; - mSamplerateInput.setValue( audio::master()->getSampleRate() ); - mWidgets.push_back( &mSamplerateInput ); - - textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); - mFramesPerBlockInput.mBounds = textInputBounds; - mFramesPerBlockInput.mTitle = "frames per block"; - mFramesPerBlockInput.setValue( audio::master()->getFramesPerBlock() ); - mWidgets.push_back( &mFramesPerBlockInput ); - - textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); - mNumInChannelsInput.mBounds = textInputBounds; - mNumInChannelsInput.mTitle = "num inputs"; - if( mInputDeviceNode ) - mNumInChannelsInput.setValue( mInputDeviceNode->getNumChannels() ); - mWidgets.push_back( &mNumInChannelsInput ); - - textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); - mNumOutChannelsInput.mBounds = textInputBounds; - mNumOutChannelsInput.mTitle = "num outputs"; - if( mOutputDeviceNode ) - mNumOutChannelsInput.setValue( mOutputDeviceNode->getNumChannels() ); - mWidgets.push_back( &mNumOutChannelsInput ); - - textInputBounds += vec2( 0, textInputBounds.getHeight() + 24 ); - mSendChannelInput.mBounds = textInputBounds; - mSendChannelInput.mTitle = "send channel"; - mSendChannelInput.setValue( 2 ); - mWidgets.push_back( &mSendChannelInput ); - - vec2 xrunSize( 80, 26 ); - mUnderrunRect = Rectf( 0, mPlayButton.mBounds.y2 + 10, xrunSize.x, mPlayButton.mBounds.y2 + xrunSize.y + 10 ); - mOverrunRect = mUnderrunRect + vec2( xrunSize.x + 10, 0 ); - mClipRect = mOverrunRect + vec2( xrunSize.x + 10, 0 ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - -#if defined( CINDER_COCOA_TOUCH ) - getSignalKeyboardWillShow().connect( [this] { timeline().apply( &mViewYOffset, -100.0f, 0.3f, EaseInOutCubic() ); } ); - getSignalKeyboardWillHide().connect( [this] { timeline().apply( &mViewYOffset, 0.0f, 0.3f, EaseInOutCubic() ); } ); -#endif - - gl::enableAlphaBlending(); -} - -void DeviceTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.025f ); -} - -void DeviceTestApp::processTap( ivec2 pos ) -{ -// TextInput *selectedInput = false; - if( mPlayButton.hitTest( pos ) ) - audio::master()->setEnabled( ! audio::master()->isEnabled() ); - else if( mRecordButton.hitTest( pos ) ) - startRecording(); - else if( mSamplerateInput.hitTest( pos ) ) { - } - else if( mFramesPerBlockInput.hitTest( pos ) ) { - } - else if( mNumInChannelsInput.hitTest( pos ) ) { - } - else if( mNumOutChannelsInput.hitTest( pos ) ) { - } - else if( mSendChannelInput.hitTest( pos ) ) { - } - -#if defined( CINDER_COCOA_TOUCH ) - TextInput *currentSelected = TextInput::getCurrentSelected(); - if( currentSelected ) - showKeyboard( KeyboardOptions().type( KeyboardType::NUMERICAL ).initialString( currentSelected->mInputString ) ); -#endif - - size_t currentTestIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentTestIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_I( "selected: " << currentTest ); - - setupTest( currentTest ); - return; - } - - size_t currentOutputIndex = mOutputSelector.mCurrentSectionIndex; - if( mOutputSelector.hitTest( pos ) && currentOutputIndex != mOutputSelector.mCurrentSectionIndex ) { - auto dev = audio::Device::findOutputByName( mOutputSelector.mSegments[mOutputSelector.mCurrentSectionIndex] ); - CI_LOG_I( "selected output device named: " << dev->getName() << ", key: " << dev->getKey() ); - - setOutputDevice( dev ); - // Don't need to reset test as the Device will be updated on the Context's OutputDeviceNode and the change will propagate through the graph - return; - } - - size_t currentInputIndex = mInputSelector.mCurrentSectionIndex; - if( mInputSelector.hitTest( pos ) && currentInputIndex != mInputSelector.mCurrentSectionIndex ) { - auto dev = audio::Device::findInputByName( mInputSelector.mSegments[mInputSelector.mCurrentSectionIndex] ); - CI_LOG_I( "selected input named: " << dev->getName() << ", key: " << dev->getKey() ); - - setInputDevice( dev ); - setupTest( mTestSelector.currentSection() ); // need to reset the test so that we construct the InputDeviceNode with the proper Device - return; - } -} - -void DeviceTestApp::setupTest( string test ) -{ - if( test.empty() ) - test = "sinewave"; - - CI_LOG_I( "test: " << test ); - - // FIXME: Switching from 'noise' to 'i/o' on mac is causing a deadlock when initializing InputDeviceNodeAudioUnit. - // - it shouldn't have to be stopped, need to check why. - // - temp fix: stop / start context around reconfig - audio::master()->disable(); - - mGain->disconnectAllInputs(); - - if( test == "sinewave" ) - setupSine(); - else if( test == "noise" ) - setupNoise(); - else if( test == "input (pulled)" ) - setupInputPulled(); - else if( test == "I/O (clean)" ) - setupIOClean(); - else if( test == "I/O (processed)" ) - setupIOProcessed(); - else if( test == "I/O and sine" ) - setupIOAndSine(); - else if( test == "send" ) - setupSend(); - else if( test == "send stereo" ) - setupSendStereo(); - else - CI_ASSERT_NOT_REACHABLE(); - - if( mPlayButton.mEnabled ) - audio::master()->enable(); - - PRINT_GRAPH( audio::master() ); -} - -void DeviceTestApp::keyDown( KeyEvent event ) -{ - TextInput *currentSelected = TextInput::getCurrentSelected(); - if( ! currentSelected ) - return; - - if( event.getCode() == KeyEvent::KEY_RETURN ) { -#if defined( CINDER_COCOA_TOUCH ) - hideKeyboard(); -#endif - - try { - if( currentSelected == &mSamplerateInput ) { - int sr = currentSelected->getValue(); - CI_LOG_I( "updating samplerate from: " << mOutputDeviceNode->getSampleRate() << " to: " << sr ); - mOutputDeviceNode->getDevice()->updateFormat( audio::Device::Format().sampleRate( sr ) ); - } - else if( currentSelected == &mFramesPerBlockInput ) { - int frames = currentSelected->getValue(); - CI_LOG_I( "updating frames per block from: " << mOutputDeviceNode->getFramesPerBlock() << " to: " << frames ); - mOutputDeviceNode->getDevice()->updateFormat( audio::Device::Format().framesPerBlock( frames ) ); - } - else if( currentSelected == &mNumInChannelsInput ) { - int numChannels = currentSelected->getValue(); - CI_LOG_I( "updating nnm input channels from: " << mInputDeviceNode->getNumChannels() << " to: " << numChannels ); - setInputDevice( mInputDeviceNode->getDevice(), numChannels ); - } - else if( currentSelected == &mNumOutChannelsInput ) { - int numChannels = currentSelected->getValue(); - CI_LOG_I( "updating nnm output channels from: " << mOutputDeviceNode->getNumChannels() << " to: " << numChannels ); - setOutputDevice( mOutputDeviceNode->getDevice(), numChannels ); - } - else if( currentSelected == &mSendChannelInput ) { - if( mTestSelector.currentSection() == "send" || mTestSelector.currentSection() == "send stereo" ) - setupTest( mTestSelector.currentSection() ); - } - else - CI_LOG_E( "unhandled return for string: " << currentSelected->mInputString ); - } - catch( audio::AudioDeviceExc &exc ) { - CI_LOG_E( "AudioDeviceExc caught, what: " << exc.what() ); - auto ctx = audio::master(); - mSamplerateInput.setValue( ctx->getSampleRate() ); - mFramesPerBlockInput.setValue( ctx->getFramesPerBlock() ); - return; - } - } - else { - if( event.getCode() == KeyEvent::KEY_BACKSPACE ) - currentSelected->processBackspace(); - else { - currentSelected->processChar( event.getChar() ); - } - } -} - -void DeviceTestApp::update() -{ - const float xrunFadeTime = 1.3f; - - if( mInputDeviceNode ) { - if( mInputDeviceNode->getLastUnderrun() ) - timeline().apply( &mInputDeviceNodeUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); - if( mInputDeviceNode->getLastOverrun() ) - timeline().apply( &mInputDeviceNodeOverrunFade, 1.0f, 0.0f, xrunFadeTime ); - } - - if( mOutputDeviceNode ) { - if( mOutputDeviceNode->getLastClip() ) - timeline().apply( &mOutputDeviceNodeClipFade, 1.0f, 0.0f, xrunFadeTime ); - } - - //if( getElapsedFrames() % 20 == 0 ) { - // CI_LOG_I( "framerate: " << to_string( getAverageFps() ) ); - //} -} - -void DeviceTestApp::updateUIParams() -{ - auto ctx = audio::master(); - - if( mSamplerateInput.getValue() != ctx->getSampleRate() ) { - mSamplerateInput.setValue( ctx->getSampleRate() ); - } - if( mFramesPerBlockInput.getValue() != ctx->getFramesPerBlock() ) { - mFramesPerBlockInput.setValue( ctx->getFramesPerBlock() ); - } -} - -void DeviceTestApp::draw() -{ - gl::clear(); - gl::color( 0, 0.9f, 0 ); - - gl::pushMatrices(); - gl::translate( 0, mViewYOffset ); - - if( mMonitor && mMonitor->isEnabled() ) { - - Rectf scopeRect( 10, 10, (float)getWindowWidth() - 10, (float)getWindowHeight() - 10 ); - drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); - - float volume = mMonitor->getVolume(); - const float padding = 20; - Rectf volumeRect( mGainSlider.mBounds.x1, mGainSlider.mBounds.y2 + padding, mGainSlider.mBounds.x1 + mGainSlider.mBounds.getWidth() * volume, mGainSlider.mBounds.y2 + padding + 20 ); - gl::drawSolidRect( volumeRect ); - } - - drawWidgets( mWidgets ); - - if( mInputDeviceNodeUnderrunFade > 0.0001f ) { - gl::color( ColorA( 0.8f, 0.2f, 0, mInputDeviceNodeUnderrunFade ) ); - gl::drawSolidRect( mUnderrunRect ); - gl::drawStringCentered( "in underrun", mUnderrunRect.getCenter(), Color::black() ); - } - if( mInputDeviceNodeOverrunFade > 0.0001f ) { - gl::color( ColorA( 0.8f, 0.2f, 0, mInputDeviceNodeOverrunFade ) ); - gl::drawSolidRect( mOverrunRect ); - gl::drawStringCentered( "in overrun", mOverrunRect.getCenter(), Color::black() ); - } - if( mOutputDeviceNodeClipFade > 0.0001f ) { - gl::color( ColorA( 0.8f, 0.2f, 0, mOutputDeviceNodeClipFade ) ); - gl::drawSolidRect( mClipRect ); - gl::drawStringCentered( "out clip", mClipRect.getCenter(), Color::black() ); - } - - gl::popMatrices(); -} - -CINDER_APP( DeviceTestApp, RendererGl, []( App::Settings *settings ) { - bool useSecondaryScreen = ( USE_SECONDARY_SCREEN && Display::getDisplays().size() > 1 ); - - if( useSecondaryScreen ) { - for( const auto &display : Display::getDisplays() ) { - //CI_LOG_I( "display name: " << display->getName() ); - if( display->getName() == "Color LCD" ) { - // macbook - settings->setDisplay( display ); - settings->setWindowSize( 1280, 720 ); - } - else if( display->getName() == "Generic PnP Monitor" ) { - // gechic 1303i 13"touch display - settings->setDisplay( display ); - settings->setFullScreen( true ); - } - } - } - else { - settings->setWindowPos( 0, 0 ); - settings->setWindowSize( 960, 565 ); - } -} ) diff --git a/test/_audio/DeviceTest/vc2015/DeviceTest.sln b/test/_audio/DeviceTest/vc2015/DeviceTest.sln deleted file mode 100644 index a3cb2521d0..0000000000 --- a/test/_audio/DeviceTest/vc2015/DeviceTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeviceTest", "DeviceTest.vcxproj", "{74DC81AA-4A14-4966-BB88-794EB0C0F354}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug|Win32.ActiveCfg = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Debug|Win32.Build.0 = Debug|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release|Win32.ActiveCfg = Release|Win32 - {74DC81AA-4A14-4966-BB88-794EB0C0F354}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj b/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj deleted file mode 100644 index ad6ed7102d..0000000000 --- a/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj +++ /dev/null @@ -1,219 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {74DC81AA-4A14-4966-BB88-794EB0C0F354} - DeviceTest - Win32Proj - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - v140 - Unicode - - - Application - true - v120 - Unicode - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOWS;NOMINMAX;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - - - $(CINDER_PATH)\include;..\include - - - cinder.lib;%(AdditionalDependencies) - $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOWS;NOMINMAX;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder.lib;%(AdditionalDependencies) - $(CINDER_PATH)\lib\msw\$(PlatformTarget);$(CINDER_PATH)\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj.filters b/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj.filters deleted file mode 100644 index 3af4dcd748..0000000000 --- a/test/_audio/DeviceTest/vc2015/DeviceTest.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - \ No newline at end of file diff --git a/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/project.pbxproj b/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/project.pbxproj deleted file mode 100644 index cb8c51259b..0000000000 --- a/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,405 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A6243192DCA300024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A623C192DCA220024BE66 /* libcinder_d.a */; }; - 1120DA8819B63D1500522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DA8619B63D1500522276 /* AVFoundation.framework */; }; - 1120DA8919B63D1500522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DA8719B63D1500522276 /* CoreMedia.framework */; }; - 119C4ED31B23A338006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4ED21B23A338006563C5 /* IOKit.framework */; }; - 143AD78017E023880076DB6A /* DeviceTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143AD77F17E023880076DB6A /* DeviceTestApp.cpp */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A623B192DCA220024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6235192DCA220024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A623D192DCA220024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6235192DCA220024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A623F192DCA220024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6235192DCA220024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A6241192DCA290024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6235192DCA220024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A6235192DCA220024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DA8619B63D1500522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DA8719B63D1500522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4ED21B23A338006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 143AD77F17E023880076DB6A /* DeviceTestApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeviceTestApp.cpp; path = ../src/DeviceTestApp.cpp; sourceTree = ""; }; - 28B898AF66D64C9296C04BB7 /* DeviceTest_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = DeviceTest_Prefix.pch; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 5AD50C6836D24088A6BE8DCE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* DeviceTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DeviceTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - C580E67176724DAD8899F390 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4ED31B23A338006563C5 /* IOKit.framework in Frameworks */, - 111A6243192DCA300024BE66 /* libcinder_d.a in Frameworks */, - 1120DA8819B63D1500522276 /* AVFoundation.framework in Frameworks */, - 1120DA8919B63D1500522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - 143AD77F17E023880076DB6A /* DeviceTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6236192DCA220024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A623C192DCA220024BE66 /* libcinder_d.a */, - 111A623E192DCA220024BE66 /* libcinder-iphone_d.a */, - 111A6240192DCA220024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* DeviceTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* DeviceTest */ = { - isa = PBXGroup; - children = ( - 111A6235192DCA220024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = DeviceTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - C580E67176724DAD8899F390 /* Resources.h */, - 28B898AF66D64C9296C04BB7 /* DeviceTest_Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 5AD50C6836D24088A6BE8DCE /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4ED21B23A338006563C5 /* IOKit.framework */, - 1120DA8619B63D1500522276 /* AVFoundation.framework */, - 1120DA8719B63D1500522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* DeviceTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DeviceTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A6242192DCA290024BE66 /* PBXTargetDependency */, - ); - name = DeviceTest; - productInstallPath = "$(HOME)/Applications"; - productName = DeviceTest; - productReference = 8D1107320486CEB800E47090 /* DeviceTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DeviceTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* DeviceTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6236192DCA220024BE66 /* Products */; - ProjectRef = 111A6235192DCA220024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* DeviceTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A623C192DCA220024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A623B192DCA220024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A623E192DCA220024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A623D192DCA220024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A6240192DCA220024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A623F192DCA220024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 143AD78017E023880076DB6A /* DeviceTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A6242192DCA290024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A6241192DCA290024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DeviceTest_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = DeviceTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DeviceTest_Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = DeviceTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "DeviceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DeviceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest.xcscheme b/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest.xcscheme deleted file mode 100644 index 37398f3470..0000000000 --- a/test/_audio/DeviceTest/xcode/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/DeviceTest/xcode/DeviceTest_Prefix.pch b/test/_audio/DeviceTest/xcode/DeviceTest_Prefix.pch deleted file mode 100644 index 061fc5a6ef..0000000000 --- a/test/_audio/DeviceTest/xcode/DeviceTest_Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/DeviceTest/xcode/Info.plist b/test/_audio/DeviceTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/DeviceTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/DeviceTest/xcode_ios/Default-568h@2x.png b/test/_audio/DeviceTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/project.pbxproj b/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/project.pbxproj deleted file mode 100644 index 63c2c33f24..0000000000 --- a/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,346 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 14E8EAC317DD779100921A43 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14E8EAC217DD779100921A43 /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - CFEFAAD0DEA04680A1ED4B93 /* DeviceTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EBBA30085504EF9A08D0847 /* DeviceTestApp.cpp */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; - E301A19945C649B9B3066FA8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F747DB4A232445BD9F8E6B3F /* Default-568h@2x.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* DeviceTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DeviceTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 14E8EAC217DD779100921A43 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 3EBBA30085504EF9A08D0847 /* DeviceTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = DeviceTestApp.cpp; path = ../src/DeviceTestApp.cpp; sourceTree = ""; }; - 648794F9920946B091D7FF1D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - EF966C616CDD4F64A52E1A7C /* DeviceTest_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = DeviceTest_Prefix.pch; sourceTree = ""; }; - F2C3DB0006124B19BB432372 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - F747DB4A232445BD9F8E6B3F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 14E8EAC317DD779100921A43 /* Accelerate.framework in Frameworks */, - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* DeviceTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 14E8EAC217DD779100921A43 /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - 3EBBA30085504EF9A08D0847 /* DeviceTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - F747DB4A232445BD9F8E6B3F /* Default-568h@2x.png */, - 648794F9920946B091D7FF1D /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - F2C3DB0006124B19BB432372 /* Resources.h */, - EF966C616CDD4F64A52E1A7C /* DeviceTest_Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* DeviceTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "DeviceTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DeviceTest; - productName = DeviceTest; - productReference = 00692BCF14FF149000D0A05E /* DeviceTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "DeviceTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* DeviceTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E301A19945C649B9B3066FA8 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CFEFAAD0DEA04680A1ED4B93 /* DeviceTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Rich Eakin (27THF82Y5P)"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DeviceTest_Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DeviceTest_Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "DeviceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "DeviceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest-ios.xcscheme b/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest-ios.xcscheme deleted file mode 100644 index 90c264d009..0000000000 --- a/test/_audio/DeviceTest/xcode_ios/DeviceTest.xcodeproj/xcshareddata/xcschemes/DeviceTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/DeviceTest/xcode_ios/DeviceTest_Prefix.pch b/test/_audio/DeviceTest/xcode_ios/DeviceTest_Prefix.pch deleted file mode 100644 index 698cfa6b09..0000000000 --- a/test/_audio/DeviceTest/xcode_ios/DeviceTest_Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#if defined( __OBJC__ ) - #import - #import -#endif - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/DeviceTest/xcode_ios/Info.plist b/test/_audio/DeviceTest/xcode_ios/Info.plist deleted file mode 100644 index 06d3234c37..0000000000 --- a/test/_audio/DeviceTest/xcode_ios/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/NodeEffectsTest/src/NodeEffectsTestApp.cpp b/test/_audio/NodeEffectsTest/src/NodeEffectsTestApp.cpp deleted file mode 100644 index 40c16cb1fd..0000000000 --- a/test/_audio/NodeEffectsTest/src/NodeEffectsTestApp.cpp +++ /dev/null @@ -1,353 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/CinderAssert.h" -#include "cinder/Log.h" - -#include "cinder/audio/Context.h" -#include "cinder/audio/GenNode.h" -#include "cinder/audio/NodeEffects.h" - -#include "../../common/AudioTestGui.h" - -#define TEST_LOW_LATENCY 0 - -using namespace ci; -using namespace ci::app; -using namespace std; - -class NodeEffectsTestApp : public App { - public: - void setup() override; - void update() override; - void draw() override; - - void setupOne(); - void setupForceStereo(); - void setupDownMix(); - void setupDelay(); - void setupVariableDelay(); - void setupFeedback(); - void setupEcho(); - void setupCycle(); - - void makeNodes(); - void switchTest( const string ¤tTest ); - void applyChirp(); - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - audio::GenNodeRef mGen; - audio::GainNodeRef mGain; - audio::Pan2dNodeRef mPan; - audio::FilterLowPassNodeRef mLowPass; - audio::DelayNodeRef mDelay; - - vector mWidgets; - Button mPlayButton, mGenButton, mGenEnabledButton, mChirpButton; - VSelector mTestSelector; - HSlider mGainSlider, mPanSlider, mLowPassFreqSlider, mFilterParam2Slider; -}; - -void NodeEffectsTestApp::setup() -{ - auto ctx = audio::master(); - -// auto outputDevice = ctx->getOutput()->getDevice(); - -#if TEST_LOW_LATENCY - auto lineOut = ctx->createOutputDeviceNode(); - lineOut->getDevice()->updateFormat( audio::Device::Format().framesPerBlock( 64 ) ); - ctx->setOutput( lineOut ); -#endif - -// mGenButton.setEnabled( true ); // set to start with GenSineNode - - makeNodes(); - setupOne(); - setupDelay(); - //setupFeedback(); - //setupEcho(); - - setupUI(); - - PRINT_GRAPH( ctx ); - CI_LOG_V( "Context samplerate: " << ctx->getSampleRate() << ", frames per block: " << ctx->getFramesPerBlock() ); -} - -void NodeEffectsTestApp::makeNodes() -{ - auto ctx = audio::master(); - - mGain = ctx->makeNode( new audio::GainNode ); - mGain->setValue( 0.25f ); - - mPan = ctx->makeNode( new audio::Pan2dNode ); - - CI_LOG_V( "gen button enabled: " << mGenButton.mEnabled ); - auto genFmt = audio::Node::Format().autoEnable(); - if( mGenButton.mEnabled ) - mGen = ctx->makeNode( new audio::GenSineNode( 220, genFmt ) ); - else - mGen = ctx->makeNode( new audio::GenNoiseNode( genFmt ) ); - - mLowPass = ctx->makeNode( new audio::FilterLowPassNode() ); - mLowPass->setCutoffFreq( 400 ); -// mLowPass = ctx->makeNode( new audio::FilterHighPassNode() ); - - mDelay = ctx->makeNode( new audio::DelayNode ); - mDelay->setDelaySeconds( 0.5f ); -// mDelay->setDelaySeconds( 100.0f / (float)ctx->getSampleRate() ); -} - -void NodeEffectsTestApp::setupOne() -{ - mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); -} - -// TODO: move to NodeTest -void NodeEffectsTestApp::setupForceStereo() -{ - mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); -} - -// TODO: move to NodeTest -void NodeEffectsTestApp::setupDownMix() -{ - auto ctx = audio::master(); - auto mono = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 1 ) ) ); - mGen >> mLowPass >> mGain >> mPan >> mono >> ctx->getOutput(); -} - -void NodeEffectsTestApp::setupDelay() -{ - mGen >> mGain >> mDelay >> audio::master()->getOutput(); -} - -void NodeEffectsTestApp::setupVariableDelay() -{ -#if TEST_LOW_LATENCY - float maxDelaySeconds = 20.0f / (float)audio::master()->getSampleRate(); - mDelay->setMaxDelaySeconds( maxDelaySeconds ); -#else - mDelay->setMaxDelaySeconds( 1.0f ); -#endif - - auto ctx = audio::master(); - - auto modGen = ctx->makeNode( new audio::GenSineNode( 0.3f, audio::Node::Format().autoEnable() ) ); - auto modMul = ctx->makeNode( new audio::GainNode( 0.1f ) ); - auto modAdd = ctx->makeNode( new audio::AddNode( 0.5f ) ); - - modGen >> modMul >> modAdd; - mDelay->getParamDelaySeconds()->setProcessor( modAdd ); - - mGen >> mGain >> mDelay >> audio::master()->getOutput(); -} - -void NodeEffectsTestApp::setupFeedback() -{ - // delay + feedback - auto ctx = audio::master(); - - auto feedbackGain = ctx->makeNode( new audio::GainNode( 0.5f ) ); - feedbackGain->setName( "FeedbackGain" ); - - mGen >> mDelay >> feedbackGain >> mDelay >> ctx->getOutput(); -} - -void NodeEffectsTestApp::setupEcho() -{ - // a more complex feedback graph, but more accurate to what you'd use in the real world - // - sends dry signal to output so you hear it immediately. - - auto feedbackGain = audio::master()->makeNode( new audio::GainNode( 0.5f ) ); - feedbackGain->setName( "FeedbackGain" ); - - mGen >> mGain; - - mGain >> audio::master()->getOutput(); // dry - mGain >> mDelay >> feedbackGain >> mDelay >> audio::master()->getOutput(); // wet -} - -void NodeEffectsTestApp::setupCycle() -{ - // this throws NodeCycleExc - - try { - mGen >> mLowPass >> mGain >> mLowPass >> audio::master()->getOutput(); - CI_ASSERT_NOT_REACHABLE(); - } - catch( audio::NodeCycleExc &exc ) { - CI_LOG_E( "audio::NodeCycleExc, what: " << exc.what() ); - } -} - -void NodeEffectsTestApp::applyChirp() -{ - mGen->getParamFreq()->applyRamp( 440, 220, 0.15f ); -} - -void NodeEffectsTestApp::setupUI() -{ - const float padding = 8; - Rectf buttonRect( 0, 0, 200, 50 ); - - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = buttonRect; - mWidgets.push_back( &mPlayButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + padding ); - mGenButton.mIsToggle = true; - mGenButton.mTitleNormal = "noise"; - mGenButton.mTitleEnabled = "sine"; - mGenButton.mBounds = buttonRect; - mWidgets.push_back( &mGenButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + padding ); - mGenEnabledButton.mIsToggle = true; - mGenEnabledButton.mTitleNormal = "gen disabled"; - mGenEnabledButton.mTitleEnabled = "gen enabled"; - mGenEnabledButton.setEnabled( true ); - mGenEnabledButton.mBounds = buttonRect; - mWidgets.push_back( &mGenEnabledButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + padding ); - mChirpButton = Button( false, "chirp" ); - mChirpButton.mBounds = buttonRect; - mWidgets.push_back( &mChirpButton ); - - mTestSelector.mSegments.push_back( "one" ); - mTestSelector.mSegments.push_back( "force stereo" ); - mTestSelector.mSegments.push_back( "down-mix" ); - mTestSelector.mSegments.push_back( "delay" ); - mTestSelector.mSegments.push_back( "variable delay" ); - mTestSelector.mSegments.push_back( "feedback" ); - mTestSelector.mSegments.push_back( "echo" ); - mTestSelector.mSegments.push_back( "cycle" ); - mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.67f, 0, (float)getWindowWidth(), 200 ); - mWidgets.push_back( &mTestSelector ); - - float width = std::min( (float)getWindowWidth() - 20, 440.0f ); - Rectf sliderRect( getWindowCenter().x - width / 2, 250, getWindowCenter().x + width / 2, 300 ); - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "GainNode"; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mPanSlider.mBounds = sliderRect; - mPanSlider.mTitle = "Pan"; - mPanSlider.set( mPan->getPos() ); - mWidgets.push_back( &mPanSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mLowPassFreqSlider.mBounds = sliderRect; - mLowPassFreqSlider.mTitle = "LowPass Freq"; - mLowPassFreqSlider.mMax = 1000; - mLowPassFreqSlider.set( mLowPass->getCutoffFreq() ); - mWidgets.push_back( &mLowPassFreqSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mFilterParam2Slider.mBounds = sliderRect; - mFilterParam2Slider.mTitle = "filter resonance"; - mFilterParam2Slider.mMax = 50; - mFilterParam2Slider.set( mLowPass->getResonance() ); - mWidgets.push_back( &mFilterParam2Slider ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void NodeEffectsTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.015f ); - if( mPanSlider.hitTest( pos ) ) - mPan->setPos( mPanSlider.mValueScaled ); - if( mLowPassFreqSlider.hitTest( pos ) ) - mLowPass->setCutoffFreq( mLowPassFreqSlider.mValueScaled ); - if( mFilterParam2Slider.hitTest( pos ) ) - mLowPass->setResonance( mFilterParam2Slider.mValueScaled ); -} - -void NodeEffectsTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mGenButton.hitTest( pos ) ) { - makeNodes(); - switchTest( mTestSelector.currentSection() ); - - if( mGenButton.mEnabled ) - applyChirp(); - } - else if( mGenEnabledButton.hitTest( pos ) ) - mGen->setEnabled( mGenEnabledButton.mEnabled ); - else if( mChirpButton.hitTest( pos ) ) - applyChirp(); - - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - switchTest( currentTest ); - } - - processDrag( pos ); -} - -void NodeEffectsTestApp::switchTest( const string ¤tTest ) -{ - auto ctx = audio::master(); - - bool enabled = ctx->isEnabled(); - ctx->disable(); - - ctx->disconnectAllNodes(); - - if( currentTest == "one" ) - setupOne(); - else if( currentTest == "force stereo" ) - setupForceStereo(); - else if( currentTest == "down-mix" ) - setupDownMix(); - else if( currentTest == "delay" ) - setupDelay(); - else if( currentTest == "variable delay" ) - setupVariableDelay(); - else if( currentTest == "feedback" ) - setupFeedback(); - else if( currentTest == "echo" ) - setupEcho(); - else if( currentTest == "cycle" ) - setupCycle(); - - ctx->setEnabled( enabled ); - PRINT_GRAPH( ctx ); -} - -void NodeEffectsTestApp::update() -{ - if( mDelay->getParamDelaySeconds()->getNumEvents() ) - CI_LOG_V( "ramping delay seconds val: " << mDelay->getParamDelaySeconds()->getValue() ); -} - -void NodeEffectsTestApp::draw() -{ - gl::clear(); - drawWidgets( mWidgets ); -} - -CINDER_APP( NodeEffectsTestApp, RendererGl ) diff --git a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.sln b/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.sln deleted file mode 100644 index a75253aaf9..0000000000 --- a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NodeEffectsTest", "NodeEffectsTest.vcxproj", "{A4E4C761-C966-49BC-B393-7DB37AD2D367}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Debug|Win32.Build.0 = Debug|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release|Win32.ActiveCfg = Release|Win32 - {A4E4C761-C966-49BC-B393-7DB37AD2D367}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj b/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj deleted file mode 100644 index e205e11bdd..0000000000 --- a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj +++ /dev/null @@ -1,220 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A4E4C761-C966-49BC-B393-7DB37AD2D367} - NodeEffectsTest - Win32Proj - NodeEffectsTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - v140 - Unicode - - - Application - true - v120 - Unicode - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath);$(DXSDK_DIR)\include - $(LibraryPath);$(DXSDK_DIR)\Lib\x86 - - - $(IncludePath);$(DXSDK_DIR)\include - $(LibraryPath);$(DXSDK_DIR)\Lib\x86 - - - $(IncludePath);$(DXSDK_DIR)\include - - - $(IncludePath);$(DXSDK_DIR)\include - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;..\..\..\..\..\cinder-dev\lib;..\..\..\..\..\cinder-dev\lib\msw - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;..\..\..\..\..\cinder-dev\lib;..\..\..\..\..\cinder-dev\lib\msw - false - true - Windows - true - - - false - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj.filters b/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj.filters deleted file mode 100644 index 9c6353152f..0000000000 --- a/test/_audio/NodeEffectsTest/vc2015/NodeEffectsTest.vcxproj.filters +++ /dev/null @@ -1,29 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Header Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/test/_audio/NodeEffectsTest/xcode/Info.plist b/test/_audio/NodeEffectsTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/NodeEffectsTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/project.pbxproj b/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/project.pbxproj deleted file mode 100644 index 991f7d8432..0000000000 --- a/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,405 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A6261192DCA7A0024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A625A192DCA6A0024BE66 /* libcinder_d.a */; }; - 1120DAA219B63DAA00522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA019B63DAA00522276 /* AVFoundation.framework */; }; - 1120DAA319B63DAA00522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA119B63DAA00522276 /* CoreMedia.framework */; }; - 119C4EDB1B23A351006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EDA1B23A351006563C5 /* IOKit.framework */; }; - 20C97FCF999448BF94B205CF /* NodeEffectsTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F25552E3D737497BB69327EE /* NodeEffectsTestApp.cpp */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A6259192DCA6A0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A625B192DCA6A0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A625D192DCA6A0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A625F192DCA710024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAA019B63DAA00522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAA119B63DAA00522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EDA1B23A351006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 49AB3D523644455D97A243DA /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* NodeEffectsTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NodeEffectsTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A5EE6A6971CC43D4A6A79B35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F25552E3D737497BB69327EE /* NodeEffectsTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NodeEffectsTestApp.cpp; path = ../src/NodeEffectsTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EDB1B23A351006563C5 /* IOKit.framework in Frameworks */, - 111A6261192DCA7A0024BE66 /* libcinder_d.a in Frameworks */, - 1120DAA219B63DAA00522276 /* AVFoundation.framework in Frameworks */, - 1120DAA319B63DAA00522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - F25552E3D737497BB69327EE /* NodeEffectsTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6254192DCA6A0024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A625A192DCA6A0024BE66 /* libcinder_d.a */, - 111A625C192DCA6A0024BE66 /* libcinder-iphone_d.a */, - 111A625E192DCA6A0024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* NodeEffectsTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* EffectTest */ = { - isa = PBXGroup; - children = ( - 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = EffectTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - 49AB3D523644455D97A243DA /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - A5EE6A6971CC43D4A6A79B35 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EDA1B23A351006563C5 /* IOKit.framework */, - 1120DAA019B63DAA00522276 /* AVFoundation.framework */, - 1120DAA119B63DAA00522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* NodeEffectsTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NodeEffectsTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A6260192DCA710024BE66 /* PBXTargetDependency */, - ); - name = NodeEffectsTest; - productInstallPath = "$(HOME)/Applications"; - productName = EffectTest; - productReference = 8D1107320486CEB800E47090 /* NodeEffectsTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NodeEffectsTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* EffectTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6254192DCA6A0024BE66 /* Products */; - ProjectRef = 111A6253192DCA6A0024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* NodeEffectsTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A625A192DCA6A0024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A6259192DCA6A0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A625C192DCA6A0024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A625B192DCA6A0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A625E192DCA6A0024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A625D192DCA6A0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 20C97FCF999448BF94B205CF /* NodeEffectsTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A6260192DCA710024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A625F192DCA710024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = NodeEffectsTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = NodeEffectsTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NodeEffectsTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NodeEffectsTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest.xcscheme b/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest.xcscheme deleted file mode 100644 index 7d32fa6019..0000000000 --- a/test/_audio/NodeEffectsTest/xcode/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/NodeEffectsTest/xcode/Prefix.pch b/test/_audio/NodeEffectsTest/xcode/Prefix.pch deleted file mode 100644 index 061fc5a6ef..0000000000 --- a/test/_audio/NodeEffectsTest/xcode/Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/NodeEffectsTest/xcode_ios/Default-568h@2x.png b/test/_audio/NodeEffectsTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/NodeEffectsTest/xcode_ios/Info.plist b/test/_audio/NodeEffectsTest/xcode_ios/Info.plist deleted file mode 100644 index 06d3234c37..0000000000 --- a/test/_audio/NodeEffectsTest/xcode_ios/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/project.pbxproj b/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/project.pbxproj deleted file mode 100644 index ea473f1a3d..0000000000 --- a/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,341 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 111A61EC1921D830005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61EA1921D830005C3166 /* AudioDrawUtils.cpp */; }; - 11DB1B58188CC18000B70E6E /* NodeEffectsTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 116FFA8B17B494D2000632D6 /* NodeEffectsTestApp.cpp */; }; - 14E8EA6217DD730400921A43 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14E8EA6117DD730400921A43 /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - AB60F6A95B7D48229FFB275A /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* NodeEffectsTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NodeEffectsTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 111A61EA1921D830005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61EB1921D830005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 116FFA8B17B494D2000632D6 /* NodeEffectsTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NodeEffectsTestApp.cpp; path = ../src/NodeEffectsTestApp.cpp; sourceTree = ""; }; - 11CB30BB1894F5D100730448 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 14E8EA6117DD730400921A43 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - CBED5D633759451EA1F0C094 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 14E8EA6217DD730400921A43 /* Accelerate.framework in Frameworks */, - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* NodeEffectsTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 14E8EA6117DD730400921A43 /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - 116FFA8B17B494D2000632D6 /* NodeEffectsTestApp.cpp */, - 111A61EA1921D830005C3166 /* AudioDrawUtils.cpp */, - 111A61EB1921D830005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */, - CBED5D633759451EA1F0C094 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - 11CB30BB1894F5D100730448 /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* NodeEffectsTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "NodeEffectsTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = NodeEffectsTest; - productName = EffectTest; - productReference = 00692BCF14FF149000D0A05E /* NodeEffectsTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - TargetAttributes = { - 00692BCE14FF149000D0A05E = { - DevelopmentTeam = 46UTYMNEJC; - }; - }; - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "NodeEffectsTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* NodeEffectsTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AB60F6A95B7D48229FFB275A /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61EC1921D830005C3166 /* AudioDrawUtils.cpp in Sources */, - 11DB1B58188CC18000B70E6E /* NodeEffectsTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_BITCODE = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_BITCODE = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "NodeEffectsTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "NodeEffectsTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest-ios.xcscheme b/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest-ios.xcscheme deleted file mode 100644 index 8082c32836..0000000000 --- a/test/_audio/NodeEffectsTest/xcode_ios/NodeEffectsTest.xcodeproj/xcshareddata/xcschemes/NodeEffectsTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/NodeEffectsTest/xcode_ios/Prefix.pch b/test/_audio/NodeEffectsTest/xcode_ios/Prefix.pch deleted file mode 100644 index 698cfa6b09..0000000000 --- a/test/_audio/NodeEffectsTest/xcode_ios/Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#if defined( __OBJC__ ) - #import - #import -#endif - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/NodeTest/src/InterleavedPassThruNode.h b/test/_audio/NodeTest/src/InterleavedPassThruNode.h deleted file mode 100644 index e9dfcbdce9..0000000000 --- a/test/_audio/NodeTest/src/InterleavedPassThruNode.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "cinder/audio/Node.h" - -struct InterleavedPassThruNode : public ci::audio::Node { - InterleavedPassThruNode() : Node( Format() ) - { - setAutoEnabled(); - setChannelMode( ChannelMode::SPECIFIED ); - setNumChannels( 2 ); - } - - void initialize() override - { - mBufferInterleaved = ci::audio::BufferInterleaved( getContext()->getFramesPerBlock(), 2 ); - } - - void process( ci::audio::Buffer *buffer ) override - { - CI_ASSERT( buffer->getNumChannels() == 2 ); - - ci::audio::dsp::interleaveBuffer( buffer, &mBufferInterleaved ); - ci::audio::dsp::deinterleaveBuffer( &mBufferInterleaved, buffer ); - } - -private: - ci::audio::BufferInterleaved mBufferInterleaved; -}; \ No newline at end of file diff --git a/test/_audio/NodeTest/src/NodeTestApp.cpp b/test/_audio/NodeTest/src/NodeTestApp.cpp deleted file mode 100644 index 7814d19df9..0000000000 --- a/test/_audio/NodeTest/src/NodeTestApp.cpp +++ /dev/null @@ -1,394 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Log.h" - -#include "cinder/audio/GenNode.h" -#include "cinder/audio/GainNode.h" -#include "cinder/audio/ChannelRouterNode.h" -#include "cinder/audio/MonitorNode.h" -#include "cinder/CinderAssert.h" -#include "cinder/audio/dsp/Converter.h" - -#include "InterleavedPassThruNode.h" -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -#include "cinder/audio/Utilities.h" - -using namespace ci; -using namespace ci::app; -using namespace std; - -class NodeTestApp : public App { -public: - void setup() override; - void resize() override; - void draw() override; - - void setupGen(); - void setup2to1(); - void setup1to2(); - void setupInterleavedPassThru(); - void setupAutoPulled(); - void setupFunnelCase(); - void setupMerge(); - void setupMerge4(); - void setupSplitStereo(); - void setupSplitMerge(); - - void printDefaultOutput(); - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - audio::GainNodeRef mGain; - audio::MonitorNodeRef mMonitor; - audio::GenNodeRef mGen, mNoise; - - vector mWidgets; - Button mPlayButton, mEnableNoiseButton, mEnableSineButton, mDelayedEnableButton; - VSelector mTestSelector; - HSlider mGainSlider; - - enum InputBus { SINE, NOISE }; -}; - -void NodeTestApp::setup() -{ - printDefaultOutput(); - - auto ctx = audio::master(); - mGain = ctx->makeNode( new audio::GainNode( 0.04f ) ); - mGen = ctx->makeNode( 440 ); - mNoise = ctx->makeNode(); - - mMonitor = audio::master()->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 2048 ) ) ); - - setupGen(); -// setupMerge(); -// setupMerge4(); -// setupSplitStereo(); -// setupSplitMerge(); - - PRINT_GRAPH( ctx ); - - setupUI(); -} - -void NodeTestApp::setupGen() -{ - if( mMonitor ) - mMonitor->disconnectAll(); - - mGain->disconnectAllInputs(); - - mGen >> audio::master()->getOutput(); - mGen->enable(); - - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setup2to1() -{ - if( mMonitor ) - mMonitor->disconnectAll(); - - mGen >> mGain; - mNoise >> mGain; - - mGain >> audio::master()->getOutput(); - - mGen->enable(); - mNoise->enable(); - - mEnableSineButton.setEnabled( true ); - mEnableNoiseButton.setEnabled( true ); -} - -// note: this enables the scope as a secondary output of mGen, and as no one ever disconnects that, it harmlessly remains when the test is switched. -void NodeTestApp::setup1to2() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - mGen >> mGain >> audio::master()->getOutput(); - mGen->enable(); - - mGen->connect( mMonitor ); - - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupInterleavedPassThru() -{ - if( mMonitor ) - mMonitor->disconnectAll(); - - auto ctx = audio::master(); - - mGain->disconnectAllInputs(); - - auto interleaved = ctx->makeNode( new InterleavedPassThruNode() ); - mGen >> interleaved >> mGain >> ctx->getOutput(); - mGen->enable(); - - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupAutoPulled() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - mGen >> mMonitor; - - mGen->enable(); - -} - -void NodeTestApp::setupFunnelCase() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto gain1 = ctx->makeNode( new audio::GainNode ); - auto gain2 = ctx->makeNode( new audio::GainNode ); -// auto gain2 = ctx->makeNode( new audio::GainNode( audio::Node::Format().autoEnable( false ) ) ); - - mGen >> gain1 >> mMonitor; - mNoise >> gain2 >> mMonitor; - - mMonitor >> mGain >> ctx->getOutput(); - - mNoise->disable(); - mGen->enable(); - - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupMerge() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); - - mGen >> router->route( 0, 0 ); - mNoise >> router->route( 0, 1 ); - - router >> mGain >> mMonitor >> ctx->getOutput(); - - mGen->enable(); - mNoise->enable(); - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupMerge4() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 4 ) ) ); - - auto upmixStereo1 = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); - auto upmixStereo2 = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); - - mGen >> upmixStereo1 >> router->route( 0, 0 ); - mNoise >> upmixStereo2 >> router->route( 0, 2 ); - - router >> mGain >> mMonitor >> ctx->getOutput(); - - mGen->enable(); - mNoise->enable(); - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupSplitStereo() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto gainStereo = ctx->makeNode( new audio::GainNode( audio::Node::Format().channels( 2 ) ) ); - auto router = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); - - mGen >> gainStereo >> router->route( 0, 0, 1 ) >> mGain >> mMonitor >> ctx->getOutput(); - - mGen->enable(); - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::setupSplitMerge() -{ - auto ctx = audio::master(); - ctx->disconnectAllNodes(); - - auto upmixStereo = ctx->makeNode( new audio::Node( audio::Node::Format().channels( 2 ) ) ); - - auto splitRouter0 = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 1 ) ) ); - auto splitRouter1 = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 1 ) ) ); - auto stereoRouter = ctx->makeNode( new audio::ChannelRouterNode( audio::Node::Format().channels( 2 ) ) ); - - // up-mix to stereo, then split the channels into two separate Node's - mGen >> upmixStereo; - upmixStereo >> splitRouter0->route( 0, 0 ); - upmixStereo >> splitRouter1->route( 1, 0 ); - - // merge the two split Nodes back into one stereo output - splitRouter0 >> stereoRouter->route( 0, 0 ); - splitRouter1 >> stereoRouter->route( 0, 1 ); - - stereoRouter >> mGain >> mMonitor >> ctx->getOutput(); - - mGen->enable(); - mEnableNoiseButton.setEnabled( false ); - mEnableSineButton.setEnabled( true ); -} - -void NodeTestApp::printDefaultOutput() -{ - audio::DeviceRef device = audio::Device::getDefaultOutput(); - - CI_LOG_V( "device name: " << device->getName() ); - console() << "\t input channels: " << device->getNumInputChannels() << endl; - console() << "\t output channels: " << device->getNumOutputChannels() << endl; - console() << "\t samplerate: " << device->getSampleRate() << endl; - console() << "\t frames per block: " << device->getFramesPerBlock() << endl; -} - -void NodeTestApp::setupUI() -{ - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); - mWidgets.push_back( &mPlayButton ); - - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "2 to 1" ); - mTestSelector.mSegments.push_back( "1 to 2" ); - mTestSelector.mSegments.push_back( "funnel case" ); - mTestSelector.mSegments.push_back( "interleave pass-thru" ); - mTestSelector.mSegments.push_back( "auto-pulled" ); - mTestSelector.mSegments.push_back( "merge" ); - mTestSelector.mSegments.push_back( "merge4" ); - mTestSelector.mSegments.push_back( "split stereo" ); - mTestSelector.mSegments.push_back( "split-merge" ); - mWidgets.push_back( &mTestSelector ); - - mGainSlider.mTitle = "GainNode"; - mGainSlider.mMax = 1; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - Rectf buttonRect( 0, 70, 200, 120 ); - - mEnableSineButton.mIsToggle = true; - mEnableSineButton.mTitleNormal = "sine disabled"; - mEnableSineButton.mTitleEnabled = "sine enabled"; - mEnableSineButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableSineButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mEnableNoiseButton.mIsToggle = true; - mEnableNoiseButton.mTitleNormal = "noise disabled"; - mEnableNoiseButton.mTitleEnabled = "noise enabled"; - mEnableNoiseButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableNoiseButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mDelayedEnableButton.mTitleNormal = "delayed enable"; - mDelayedEnableButton.mBounds = buttonRect; - mWidgets.push_back( &mDelayedEnableButton ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void NodeTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->setValue( mGainSlider.mValueScaled ); -} - -void NodeTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - if( mGen && mEnableSineButton.hitTest( pos ) ) - mGen->setEnabled( ! mGen->isEnabled() ); - if( mNoise && mEnableNoiseButton.hitTest( pos ) ) // FIXME: this check doesn't work any more because there is always an mNoise / mGen - mNoise->setEnabled( ! mNoise->isEnabled() ); - if( mDelayedEnableButton.hitTest( pos ) ) { - mGen->setEnabled( ! mGen->isEnabled(), ctx->getNumProcessedSeconds() + 1.0 ); - } - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "sine" ) - setupGen(); - else if( currentTest == "2 to 1" ) - setup2to1(); - else if( currentTest == "1 to 2" ) - setup1to2(); - else if( currentTest == "interleave pass-thru" ) - setupInterleavedPassThru(); - else if( currentTest == "auto-pulled" ) - setupAutoPulled(); - else if( currentTest == "funnel case" ) - setupFunnelCase(); - else if( currentTest == "merge" ) - setupMerge(); - else if( currentTest == "merge4" ) - setupMerge4(); - else if( currentTest == "split stereo" ) - setupSplitStereo(); - else if( currentTest == "split-merge" ) - setupSplitMerge(); - - PRINT_GRAPH( ctx ); - } -} - -void NodeTestApp::resize() -{ - mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.6f, 0, (float)getWindowWidth(), (float)getWindowHeight() * 0.6f ); - - const float padding = 10; - const float sliderHeght = 50; - Rectf sliderRect( padding, getWindowHeight() - sliderHeght - padding, getWindowCenter().x, getWindowHeight() - padding ); - mGainSlider.mBounds = sliderRect; - -} - -void NodeTestApp::draw() -{ - gl::clear(); - - if( mMonitor && mMonitor->getNumConnectedInputs() ) { - vec2 padding( 20, 20 ); - - Rectf scopeRect( padding.x, padding.y, getWindowWidth() - padding.x, getWindowHeight() - padding.y ); - drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); - } - - drawWidgets( mWidgets ); -} - -CINDER_APP( NodeTestApp, RendererGl ) diff --git a/test/_audio/NodeTest/vc2015/NodeTest.sln b/test/_audio/NodeTest/vc2015/NodeTest.sln deleted file mode 100644 index f9ab6e17fb..0000000000 --- a/test/_audio/NodeTest/vc2015/NodeTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NodeTest", "NodeTest.vcxproj", "{F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Debug|Win32.Build.0 = Debug|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release|Win32.ActiveCfg = Release|Win32 - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/NodeTest/vc2015/NodeTest.vcxproj b/test/_audio/NodeTest/vc2015/NodeTest.vcxproj deleted file mode 100644 index 1dae428863..0000000000 --- a/test/_audio/NodeTest/vc2015/NodeTest.vcxproj +++ /dev/null @@ -1,224 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F9F68040-3C5E-4DBE-B809-FD0BF117E5BA} - NodeTest - Win32Proj - NodeTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - Unicode - v140 - - - Application - true - Unicode - v120 - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - - false - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/NodeTest/vc2015/NodeTest.vcxproj.filters b/test/_audio/NodeTest/vc2015/NodeTest.vcxproj.filters deleted file mode 100644 index 307e746ea8..0000000000 --- a/test/_audio/NodeTest/vc2015/NodeTest.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Header Files - - - Source Files - - - Source Files - - - - - Header Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/test/_audio/NodeTest/xcode/Info.plist b/test/_audio/NodeTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/NodeTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/project.pbxproj b/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/project.pbxproj deleted file mode 100644 index 1442f63d92..0000000000 --- a/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,421 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A6270192DCAA50024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A6269192DCA960024BE66 /* libcinder_d.a */; }; - 1189C939185982520051AB13 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1189C937185982520051AB13 /* AudioDrawUtils.cpp */; }; - 119C4EDF1B23A35B006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EDE1B23A35B006563C5 /* IOKit.framework */; }; - 11B4167119B621F3008F98C6 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11B4166F19B621F3008F98C6 /* AVFoundation.framework */; }; - 11B4167219B621F3008F98C6 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11B4167019B621F3008F98C6 /* CoreMedia.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - FE6541737CFA406192BDC3E9 /* NodeTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29ACADC4C05419E8F9B2D3D /* NodeTestApp.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A6268192DCA960024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6262192DCA960024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A626A192DCA960024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6262192DCA960024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A626C192DCA960024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6262192DCA960024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A626E192DCAA00024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6262192DCA960024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A6262192DCA960024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1189C937185982520051AB13 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 1189C938185982520051AB13 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 119C4EDE1B23A35B006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 119CCEEA184A716B00853BEE /* AudioTestGui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioTestGui.h; path = ../../common/AudioTestGui.h; sourceTree = ""; }; - 11AC0A2418E8E730008AF4BC /* InterleavedPassThruNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InterleavedPassThruNode.h; path = ../src/InterleavedPassThruNode.h; sourceTree = ""; }; - 11B4166F19B621F3008F98C6 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 11B4167019B621F3008F98C6 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 3D080E4252C34004B9ED31F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* NodeTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NodeTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - B29ACADC4C05419E8F9B2D3D /* NodeTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = NodeTestApp.cpp; path = ../src/NodeTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EDF1B23A35B006563C5 /* IOKit.framework in Frameworks */, - 111A6270192DCAA50024BE66 /* libcinder_d.a in Frameworks */, - 11B4167119B621F3008F98C6 /* AVFoundation.framework in Frameworks */, - 11B4167219B621F3008F98C6 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - 11AC0A2418E8E730008AF4BC /* InterleavedPassThruNode.h */, - B29ACADC4C05419E8F9B2D3D /* NodeTestApp.cpp */, - 119CCEEA184A716B00853BEE /* AudioTestGui.h */, - 1189C937185982520051AB13 /* AudioDrawUtils.cpp */, - 1189C938185982520051AB13 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6263192DCA960024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A6269192DCA960024BE66 /* libcinder_d.a */, - 111A626B192DCA960024BE66 /* libcinder-iphone_d.a */, - 111A626D192DCA960024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* NodeTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* NodeTest */ = { - isa = PBXGroup; - children = ( - 111A6262192DCA960024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = NodeTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 3D080E4252C34004B9ED31F4 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EDE1B23A35B006563C5 /* IOKit.framework */, - 11B4166F19B621F3008F98C6 /* AVFoundation.framework */, - 11B4167019B621F3008F98C6 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* NodeTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NodeTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A626F192DCAA00024BE66 /* PBXTargetDependency */, - ); - name = NodeTest; - productInstallPath = "$(HOME)/Applications"; - productName = NodeTest; - productReference = 8D1107320486CEB800E47090 /* NodeTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NodeTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* NodeTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6263192DCA960024BE66 /* Products */; - ProjectRef = 111A6262192DCA960024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* NodeTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A6269192DCA960024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A6268192DCA960024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A626B192DCA960024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A626A192DCA960024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A626D192DCA960024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A626C192DCA960024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1189C939185982520051AB13 /* AudioDrawUtils.cpp in Sources */, - FE6541737CFA406192BDC3E9 /* NodeTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A626F192DCAA00024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A626E192DCAA00024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = NodeTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = NodeTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NodeTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NodeTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest.xcscheme b/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest.xcscheme deleted file mode 100644 index 46720805a3..0000000000 --- a/test/_audio/NodeTest/xcode/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/NodeTest/xcode/Prefix.pch b/test/_audio/NodeTest/xcode/Prefix.pch deleted file mode 100644 index 226b4a63fc..0000000000 --- a/test/_audio/NodeTest/xcode/Prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/NodeTest/xcode_ios/Default-568h@2x.png b/test/_audio/NodeTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/NodeTest/xcode_ios/Info.plist b/test/_audio/NodeTest/xcode_ios/Info.plist deleted file mode 100644 index 16aea9c125..0000000000 --- a/test/_audio/NodeTest/xcode_ios/Info.plist +++ /dev/null @@ -1,61 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationPortraitUpsideDown - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/project.pbxproj b/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/project.pbxproj deleted file mode 100644 index bf61a79876..0000000000 --- a/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,369 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 111A61E91921D356005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61E71921D356005C3166 /* AudioDrawUtils.cpp */; }; - 14E8EA6017DD724800921A43 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14E8EA5F17DD724800921A43 /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - 931F14BE516A46C6BE2ECAB2 /* NodeTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C82F63364FA84284BD7147DF /* NodeTestApp.cpp */; }; - AC70AF9B87B7488DAE35DE94 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D46C2DD8864F4CA4B833A011 /* Default-568h@2x.png */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* NodeTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NodeTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 111A61E71921D356005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61E81921D356005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 14E8EA5F17DD724800921A43 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 2CEF86D91169496A9049F5A6 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 69D20B36A6424BD191DE0E88 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A7E048DF51594F6A9FCD5635 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - C82F63364FA84284BD7147DF /* NodeTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = NodeTestApp.cpp; path = ../src/NodeTestApp.cpp; sourceTree = ""; }; - D46C2DD8864F4CA4B833A011 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 14E8EA6017DD724800921A43 /* Accelerate.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* NodeTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 14E8EA5F17DD724800921A43 /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - C82F63364FA84284BD7147DF /* NodeTestApp.cpp */, - 111A61E71921D356005C3166 /* AudioDrawUtils.cpp */, - 111A61E81921D356005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - D46C2DD8864F4CA4B833A011 /* Default-568h@2x.png */, - 69D20B36A6424BD191DE0E88 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - A7E048DF51594F6A9FCD5635 /* Resources.h */, - 2CEF86D91169496A9049F5A6 /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* NodeTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "NodeTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = NodeTest; - productName = NodeTest; - productReference = 00692BCF14FF149000D0A05E /* NodeTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - TargetAttributes = { - 00692BCE14FF149000D0A05E = { - DevelopmentTeam = 52SQ7WWP9C; - }; - }; - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "NodeTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* NodeTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AC70AF9B87B7488DAE35DE94 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61E91921D356005C3166 /* AudioDrawUtils.cpp in Sources */, - 931F14BE516A46C6BE2ECAB2 /* NodeTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE = ""; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src"; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PROVISIONING_PROFILE = ""; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "NodeTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "NodeTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest-ios.xcscheme b/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest-ios.xcscheme deleted file mode 100644 index 20607d9de5..0000000000 --- a/test/_audio/NodeTest/xcode_ios/NodeTest.xcodeproj/xcshareddata/xcschemes/NodeTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/NodeTest/xcode_ios/Prefix.pch b/test/_audio/NodeTest/xcode_ios/Prefix.pch deleted file mode 100644 index b1177b5d85..0000000000 --- a/test/_audio/NodeTest/xcode_ios/Prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/ParamTest/src/ParamTestApp.cpp b/test/_audio/ParamTest/src/ParamTestApp.cpp deleted file mode 100644 index a10167b011..0000000000 --- a/test/_audio/ParamTest/src/ParamTestApp.cpp +++ /dev/null @@ -1,371 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Rand.h" -#include "cinder/Timeline.h" -#include "cinder/CinderAssert.h" -#include "cinder/Log.h" - -#include "cinder/audio/Context.h" -#include "cinder/audio/GenNode.h" -#include "cinder/audio/NodeEffects.h" -#include "cinder/audio/FilterNode.h" -#include "cinder/audio/Target.h" - -#include "../../common/AudioTestGui.h" - -using namespace ci; -using namespace ci::app; -using namespace std; - -class ParamTestApp : public App { - public: - void setup() override; - void update() override; - void draw() override; - void keyDown( KeyEvent event ) override; - - void setupBasic(); - void setupFilter(); - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - void testApply(); - void testApply0(); - void testApply2(); - void testAppend(); - void testDelay(); - void testAppendCancel(); - void testProcessor(); - void testSchedule(); - - void writeParamEval( audio::Param *param ); - - audio::GenNodeRef mGen; - audio::GainNodeRef mGain; - audio::Pan2dNodeRef mPan; - audio::FilterLowPassNodeRef mLowPass; - - vector mWidgets; - Button mPlayButton, mApplyButton, mApply0Button, mApplyAppendButton, mAppendButton; - Button mDelayButton, mProcessorButton, mAppendCancelButton, mScheduleButton; - VSelector mTestSelector; - HSlider mGainSlider, mPanSlider, mLowPassFreqSlider, mGenFreqSlider; -}; - -void ParamTestApp::setup() -{ - auto ctx = audio::master(); - mGain = ctx->makeNode( new audio::GainNode() ); - mGain->setValue( 0.8f ); - - mPan = ctx->makeNode( new audio::Pan2dNode() ); - - mGen = ctx->makeNode( new audio::GenSineNode() ); -// mGen = ctx->makeNode( new audio::GenTriangleNode() ); -// mGen = ctx->makeNode( new audio::GenPhasorNode() ); - mGen = ctx->makeNode( new audio::GenPulseNode ); - - mGen->setFreq( 220 ); - - mLowPass = ctx->makeNode( new audio::FilterLowPassNode() ); - - setupBasic(); - - setupUI(); - - PRINT_GRAPH( ctx ); - - testApply(); -// testApply2(); -// connectProcessor(); -} - -void ParamTestApp::setupBasic() -{ - mGen >> mGain >> audio::master()->getOutput(); - mGen->enable(); -} - -void ParamTestApp::setupFilter() -{ - mGen >> mLowPass >> mGain >> mPan >> audio::master()->getOutput(); - mGen->enable(); -} - -void ParamTestApp::testApply() -{ - // (a): ramp volume to 0.7 of 0.2 seconds -// mGain->getParam()->applyRamp( 0.7f, 0.2f ); - - mGen->getParamFreq()->applyRamp( 220, 440, 2 ); - - // PSEUDO CODE: possible syntax where context keeps references to Params, calling updateValueArray() (or just process() ?) on them each block: - // - problem I have with this right now is that its alot more syntax for the common case (see: (a)) of ramping up volume -// Context::master()->timeline()->apply( mGen->getParamFreq(), 220, 440, 1 ); - // - a bit shorter: -// audio::timeline()->apply( mGen->getParamFreq(), 220, 440, 1 ); - - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); -} - -// same as testApply(), but ramp time = 0. end value should still be set. -void ParamTestApp::testApply0() -{ - mGen->getParamFreq()->applyRamp( 220, 440, 0 ); - - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); -} - -// 2 events - first apply the ramp, blowing away anything else, then append another event to happen after that -void ParamTestApp::testApply2() -{ - mGen->getParamFreq()->applyRamp( 220, 880, 1 ); - mGen->getParamFreq()->appendRamp( 369.994f, 1 ); // F#4 - - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); - -// writeParamEval( mGen->getParamFreq() ); -} - -// append an event with random frequency and duration 1 second, allowing them to build up. new events begin from the end of the last event -void ParamTestApp::testAppend() -{ - mGen->getParamFreq()->appendRamp( randFloat( 50, 800 ), 1.0f ); - - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); -} - -// make a ramp after a 1 second delay -void ParamTestApp::testDelay() -{ - mGen->getParamFreq()->applyRamp( 50, 440, 1, audio::Param::Options().delay( 1 ) ); - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); -} - -// apply a ramp from 220 to 880 over 2 seconds and then after a 1 second delay, cancel it. result should be ~ 550: 220 + (880 - 220) / 2. -void ParamTestApp::testAppendCancel() -{ - audio::EventRef ramp = mGen->getParamFreq()->applyRamp( 220, 880, 2 ); - - CI_LOG_V( "num events: " << mGen->getParamFreq()->getNumEvents() ); - - timeline().add( [ramp] { - CI_LOG_V( "canceling." ); - ramp->cancel(); - }, (float)getElapsedSeconds() + 1 ); -} - -void ParamTestApp::testProcessor() -{ - auto ctx = audio::master(); - auto mod = ctx->makeNode( new audio::GenSineNode( audio::Node::Format().autoEnable() ) ); - mod->setFreq( 2 ); - - mGain->getParam()->setProcessor( mod ); -} - -void ParamTestApp::testSchedule() -{ - bool enabled = mGen->isEnabled(); - mGen->setEnabled( ! enabled, audio::master()->getNumProcessedSeconds() + 0.5f ); -} - -void ParamTestApp::setupUI() -{ - const float padding = 10.0f; - - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); - mWidgets.push_back( &mPlayButton ); - - Rectf paramButtonRect( 0, mPlayButton.mBounds.y2 + padding, 120, mPlayButton.mBounds.y2 + padding + 40 ); - mApplyButton = Button( false, "apply" ); - mApplyButton.mBounds = paramButtonRect; - mWidgets.push_back( &mApplyButton ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mApply0Button = Button( false, "apply0" ); - mApply0Button.mBounds = paramButtonRect; - mWidgets.push_back( &mApply0Button ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mApplyAppendButton = Button( false, "apply 2" ); - mApplyAppendButton.mBounds = paramButtonRect; - mWidgets.push_back( &mApplyAppendButton ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mAppendButton = Button( false, "append" ); - mAppendButton.mBounds = paramButtonRect; - mWidgets.push_back( &mAppendButton ); - - paramButtonRect = mApplyButton.mBounds + vec2( 0, mApplyButton.mBounds.getHeight() + padding ); - mDelayButton = Button( false, "delay" ); - mDelayButton.mBounds = paramButtonRect; - mWidgets.push_back( &mDelayButton ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mProcessorButton = Button( false, "processor" ); - mProcessorButton.mBounds = paramButtonRect; - mWidgets.push_back( &mProcessorButton ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mAppendCancelButton = Button( false, "cancel" ); - mAppendCancelButton.mBounds = paramButtonRect; - mWidgets.push_back( &mAppendCancelButton ); - - paramButtonRect += vec2( paramButtonRect.getWidth() + padding, 0 ); - mScheduleButton = Button( false, "schedule" ); - mScheduleButton.mBounds = paramButtonRect; - mWidgets.push_back( &mScheduleButton ); - - mTestSelector.mSegments.push_back( "basic" ); - mTestSelector.mSegments.push_back( "filter" ); - mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.67f, 0, (float)getWindowWidth(), 160 ); - mWidgets.push_back( &mTestSelector ); - - float width = std::min( (float)getWindowWidth() - 20.0f, 440.0f ); - Rectf sliderRect( getWindowCenter().x - width / 2.0f, 200, getWindowCenter().x + width / 2.0f, 250 ); - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "GainNode"; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0.0f, sliderRect.getHeight() + 10.0f ); - mPanSlider.mBounds = sliderRect; - mPanSlider.mTitle = "Pan"; - mPanSlider.set( mPan->getPos() ); - mWidgets.push_back( &mPanSlider ); - - sliderRect += vec2( 0.0f, sliderRect.getHeight() + 10.0f ); - mGenFreqSlider.mBounds = sliderRect; - mGenFreqSlider.mTitle = "Gen Freq"; - mGenFreqSlider.mMin = -200.0f; - mGenFreqSlider.mMax = 1200.0f; - mGenFreqSlider.set( mGen->getFreq() ); - mWidgets.push_back( &mGenFreqSlider ); - - sliderRect += vec2( 0.0f, sliderRect.getHeight() + 10.0f ); - mLowPassFreqSlider.mBounds = sliderRect; - mLowPassFreqSlider.mTitle = "LowPass Freq"; - mLowPassFreqSlider.mMax = 1000.0f; - mLowPassFreqSlider.set( mLowPass->getCutoffFreq() ); - mWidgets.push_back( &mLowPassFreqSlider ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void ParamTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) { -// mGain->setValue( mGainSlider.mValueScaled ); -// mGain->getParam()->applyRamp( mGainSlider.mValueScaled ); - mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.15f ); - } - if( mPanSlider.hitTest( pos ) ) { -// mPan->setPos( mPanSlider.mValueScaled ); - mPan->getParamPos()->applyRamp( mPanSlider.mValueScaled, 0.3f, audio::Param::Options().rampFn( &audio::rampOutQuad ) ); - } - if( mGenFreqSlider.hitTest( pos ) ) { -// mGen->setFreq( mGenFreqSlider.mValueScaled ); -// mGen->getParamFreq()->applyRamp( mGenFreqSlider.mValueScaled, 0.3f ); - mGen->getParamFreq()->applyRamp( mGenFreqSlider.mValueScaled, 0.3f, audio::Param::Options().rampFn( &audio::rampOutQuad ) ); - } - if( mLowPassFreqSlider.hitTest( pos ) ) - mLowPass->setCutoffFreq( mLowPassFreqSlider.mValueScaled ); -} - -void ParamTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - size_t selectorIndex = mTestSelector.mCurrentSectionIndex; - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mApplyButton.hitTest( pos ) ) - testApply(); - else if( mApply0Button.hitTest( pos ) ) - testApply0(); - else if( mApplyAppendButton.hitTest( pos ) ) - testApply2(); - else if( mAppendButton.hitTest( pos ) ) - testAppend(); - else if( mDelayButton.hitTest( pos ) ) - testDelay(); - else if( mProcessorButton.hitTest( pos ) ) - testProcessor(); - else if( mAppendCancelButton.hitTest( pos ) ) - testAppendCancel(); - else if( mScheduleButton.hitTest( pos ) ) - testSchedule(); - else if( mTestSelector.hitTest( pos ) && selectorIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - bool enabled = ctx->isEnabled(); - ctx->disable(); - - ctx->disconnectAllNodes(); - - if( currentTest == "basic" ) - setupBasic(); - if( currentTest == "filter" ) - setupFilter(); - - ctx->setEnabled( enabled ); - PRINT_GRAPH( ctx ); - } - else - processDrag( pos ); -} - -void ParamTestApp::keyDown( KeyEvent event ) -{ - if( event.getCode() == KeyEvent::KEY_e ) - CI_LOG_V( "mGen freq events: " << mGen->getParamFreq()->getNumEvents() ); -} - -void ParamTestApp::update() -{ - if( audio::master()->isEnabled() ) { - mGainSlider.set( mGain->getValue() ); - mGenFreqSlider.set( mGen->getFreq() ); - mPanSlider.set( mPan->getPos() ); - } -} - -void ParamTestApp::draw() -{ - gl::clear(); - drawWidgets( mWidgets ); -} - -// TODO: this will be formalized once there is an offline audio context and OutputFileNode. -void ParamTestApp::writeParamEval( audio::Param *param ) -{ - auto ctx = audio::master(); - float duration = param->findDuration(); - float currTime = (float)ctx->getNumProcessedSeconds(); - size_t sampleRate = ctx->getSampleRate(); - audio::Buffer audioBuffer( (size_t)duration * sampleRate ); - - param->eval( currTime, audioBuffer.getData(), audioBuffer.getSize(), sampleRate ); - - auto target = audio::TargetFile::create( "param.wav", sampleRate, 1 ); - target->write( &audioBuffer ); - - CI_LOG_V( "write complete" ); -} - -CINDER_APP( ParamTestApp, RendererGl, []( App::Settings *settings ) { - settings->setWindowSize( 800, 600 ); -} ) diff --git a/test/_audio/ParamTest/vc2015/ParamTest.sln b/test/_audio/ParamTest/vc2015/ParamTest.sln deleted file mode 100644 index 1fec619586..0000000000 --- a/test/_audio/ParamTest/vc2015/ParamTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParamTest", "ParamTest.vcxproj", "{A8EA7518-49AF-4238-B769-DB509F20342F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Debug|Win32.Build.0 = Debug|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release|Win32.ActiveCfg = Release|Win32 - {A8EA7518-49AF-4238-B769-DB509F20342F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/ParamTest/vc2015/ParamTest.vcxproj b/test/_audio/ParamTest/vc2015/ParamTest.vcxproj deleted file mode 100644 index 382d274bd9..0000000000 --- a/test/_audio/ParamTest/vc2015/ParamTest.vcxproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A8EA7518-49AF-4238-B769-DB509F20342F} - ParamTest - Win32Proj - ParamTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - v140 - Unicode - - - Application - true - v120 - Unicode - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath);$(DXSDK_DIR)\include - $(LibraryPath);$(DXSDK_DIR)\Lib\x86 - - - $(IncludePath);$(DXSDK_DIR)\include - $(LibraryPath);$(DXSDK_DIR)\Lib\x86 - - - $(IncludePath);$(DXSDK_DIR)\include - - - $(IncludePath);$(DXSDK_DIR)\include - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - - false - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/ParamTest/vc2015/ParamTest.vcxproj.filters b/test/_audio/ParamTest/vc2015/ParamTest.vcxproj.filters deleted file mode 100644 index ac1f637c35..0000000000 --- a/test/_audio/ParamTest/vc2015/ParamTest.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/test/_audio/ParamTest/xcode/Info.plist b/test/_audio/ParamTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/ParamTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/project.pbxproj b/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/project.pbxproj deleted file mode 100644 index 78e77bc29c..0000000000 --- a/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,403 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A627F192DCB810024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A6278192DCAE20024BE66 /* libcinder_d.a */; }; - 1120DAA619B63DBB00522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA419B63DBB00522276 /* AVFoundation.framework */; }; - 1120DAA719B63DBB00522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA519B63DBB00522276 /* CoreMedia.framework */; }; - 119C4EE31B23A363006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EE21B23A363006563C5 /* IOKit.framework */; }; - 20C97FCF999448BF94B205CF /* ParamTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F25552E3D737497BB69327EE /* ParamTestApp.cpp */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A6277192DCAE20024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6271192DCAE20024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A6279192DCAE20024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6271192DCAE20024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A627B192DCAE20024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6271192DCAE20024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A627D192DCB780024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6271192DCAE20024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A6271192DCAE20024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAA419B63DBB00522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAA519B63DBB00522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EE21B23A363006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 49AB3D523644455D97A243DA /* ParamTest_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ParamTest_Prefix.pch; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* ParamTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ParamTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A5EE6A6971CC43D4A6A79B35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F25552E3D737497BB69327EE /* ParamTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ParamTestApp.cpp; path = ../src/ParamTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EE31B23A363006563C5 /* IOKit.framework in Frameworks */, - 111A627F192DCB810024BE66 /* libcinder_d.a in Frameworks */, - 1120DAA619B63DBB00522276 /* AVFoundation.framework in Frameworks */, - 1120DAA719B63DBB00522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - F25552E3D737497BB69327EE /* ParamTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6272192DCAE20024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A6278192DCAE20024BE66 /* libcinder_d.a */, - 111A627A192DCAE20024BE66 /* libcinder-iphone_d.a */, - 111A627C192DCAE20024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* ParamTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* EffectTest */ = { - isa = PBXGroup; - children = ( - 111A6271192DCAE20024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = EffectTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - 49AB3D523644455D97A243DA /* ParamTest_Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - A5EE6A6971CC43D4A6A79B35 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EE21B23A363006563C5 /* IOKit.framework */, - 1120DAA419B63DBB00522276 /* AVFoundation.framework */, - 1120DAA519B63DBB00522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* ParamTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ParamTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A627E192DCB780024BE66 /* PBXTargetDependency */, - ); - name = ParamTest; - productInstallPath = "$(HOME)/Applications"; - productName = EffectTest; - productReference = 8D1107320486CEB800E47090 /* ParamTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ParamTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* EffectTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6272192DCAE20024BE66 /* Products */; - ProjectRef = 111A6271192DCAE20024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* ParamTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A6278192DCAE20024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A6277192DCAE20024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A627A192DCAE20024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A6279192DCAE20024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A627C192DCAE20024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A627B192DCAE20024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 20C97FCF999448BF94B205CF /* ParamTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A627E192DCB780024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A627D192DCB780024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ParamTest_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = ParamTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ParamTest_Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = ParamTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../../../src"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../../../src"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ParamTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ParamTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest.xcscheme b/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest.xcscheme deleted file mode 100644 index 5b7c325da8..0000000000 --- a/test/_audio/ParamTest/xcode/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/ParamTest/xcode/ParamTest_Prefix.pch b/test/_audio/ParamTest/xcode/ParamTest_Prefix.pch deleted file mode 100644 index 061fc5a6ef..0000000000 --- a/test/_audio/ParamTest/xcode/ParamTest_Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/ParamTest/xcode_ios/Default-568h@2x.png b/test/_audio/ParamTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/ParamTest/xcode_ios/Info.plist b/test/_audio/ParamTest/xcode_ios/Info.plist deleted file mode 100644 index 06d3234c37..0000000000 --- a/test/_audio/ParamTest/xcode_ios/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/project.pbxproj b/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/project.pbxproj deleted file mode 100644 index 448c52091e..0000000000 --- a/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,331 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 11DB1B55188CBFC300B70E6E /* ParamTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 116FFA8B17B494D2000632D6 /* ParamTestApp.cpp */; }; - 14E8EA6217DD730400921A43 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14E8EA6117DD730400921A43 /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - AB60F6A95B7D48229FFB275A /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* ParamTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ParamTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 116FFA8B17B494D2000632D6 /* ParamTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ParamTestApp.cpp; path = ../src/ParamTestApp.cpp; sourceTree = ""; }; - 11DB1B57188CC11900B70E6E /* ParamTest_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ParamTest_Prefix.pch; sourceTree = ""; }; - 14E8EA6117DD730400921A43 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - CBED5D633759451EA1F0C094 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 14E8EA6217DD730400921A43 /* Accelerate.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* ParamTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 14E8EA6117DD730400921A43 /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - 116FFA8B17B494D2000632D6 /* ParamTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - 3F49D94D87A14B748FA6DE3A /* Default-568h@2x.png */, - CBED5D633759451EA1F0C094 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - 11DB1B57188CC11900B70E6E /* ParamTest_Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* ParamTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "ParamTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ParamTest; - productName = EffectTest; - productReference = 00692BCF14FF149000D0A05E /* ParamTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - TargetAttributes = { - 00692BCE14FF149000D0A05E = { - DevelopmentTeam = 52SQ7WWP9C; - }; - }; - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "ParamTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* ParamTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AB60F6A95B7D48229FFB275A /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 11DB1B55188CBFC300B70E6E /* ParamTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ParamTest_Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ParamTest_Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "ParamTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "ParamTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest-ios.xcscheme b/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest-ios.xcscheme deleted file mode 100644 index 26fed8fcb1..0000000000 --- a/test/_audio/ParamTest/xcode_ios/ParamTest.xcodeproj/xcshareddata/xcschemes/ParamTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/ParamTest/xcode_ios/ParamTest_Prefix.pch b/test/_audio/ParamTest/xcode_ios/ParamTest_Prefix.pch deleted file mode 100644 index 698cfa6b09..0000000000 --- a/test/_audio/ParamTest/xcode_ios/ParamTest_Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#if defined( __OBJC__ ) - #import - #import -#endif - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/SampleTest/include/Resources.h b/test/_audio/SampleTest/include/Resources.h deleted file mode 100644 index bb83370487..0000000000 --- a/test/_audio/SampleTest/include/Resources.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include "cinder/CinderResources.h" - -#define RES_TONE440_WAV CINDER_RESOURCE( ../../data/, tone440.wav, 128, SOUND ) -#define RES_TONE440L220R_WAV CINDER_RESOURCE( ../../data/, tone440L220R.wav, 129, SOUND ) -#define RES_TONE440_LOOP_WAV CINDER_RESOURCE( ../../data/, tone440_loop.wav, 131, SOUND ) - -#define RES_TONE440_MP3 CINDER_RESOURCE( ../../data/, tone440.mp3, 132, SOUND ) -#define RES_TONE440L220R_MP3 CINDER_RESOURCE( ../../data/, tone440L220R.mp3, 133, SOUND ) - -#define RES_TONE440_OGG CINDER_RESOURCE( ../../data/, tone440.ogg, 135, SOUND ) -#define RES_TONE440L220R_OGG CINDER_RESOURCE( ../../data/, tone440L220R.ogg, 136, SOUND ) - diff --git a/test/_audio/SampleTest/proj/cmake/CMakeLists.txt b/test/_audio/SampleTest/proj/cmake/CMakeLists.txt deleted file mode 100644 index e1ff8c408b..0000000000 --- a/test/_audio/SampleTest/proj/cmake/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -cmake_minimum_required( VERSION 3.0 FATAL_ERROR ) -set( CMAKE_VERBOSE_MAKEFILE ON ) - -project( audio-SampleTest ) - -get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) -get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) - -include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) - -set( APP_SOURCES - ${APP_PATH}/src/SampleTestApp.cpp - ${CINDER_PATH}/samples/_audio/common/AudioDrawUtils.cpp -) - -ci_make_app( - SOURCES ${APP_SOURCES} - CINDER_PATH ${CINDER_PATH} - INCLUDES ${APP_PATH}/include - RESOURCES ${APP_PATH}/../data/tone440L220R.wav -) diff --git a/test/_audio/SampleTest/src/SampleTestApp.cpp b/test/_audio/SampleTest/src/SampleTestApp.cpp deleted file mode 100644 index 49d2801a4f..0000000000 --- a/test/_audio/SampleTest/src/SampleTestApp.cpp +++ /dev/null @@ -1,646 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Timeline.h" -#include "cinder/Timer.h" -#include "cinder/Log.h" - -#include "cinder/audio/Source.h" -#include "cinder/audio/Target.h" -#include "cinder/audio/dsp/Converter.h" -#include "cinder/audio/SamplePlayerNode.h" -#include "cinder/audio/SampleRecorderNode.h" -#include "cinder/audio/NodeEffects.h" -#include "cinder/audio/MonitorNode.h" - -#include "Resources.h" - -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -//#define INITIAL_AUDIO_RES RES_TONE440_WAV -#define INITIAL_AUDIO_RES RES_TONE440L220R_WAV -//#define INITIAL_AUDIO_RES RES_TONE440_LOOP_WAV -//#define INITIAL_AUDIO_RES RES_TONE440_MP3 -//#define INITIAL_AUDIO_RES RES_TONE440L220R_MP3 -//#define INITIAL_AUDIO_RES RES_TONE440_OGG -//#define INITIAL_AUDIO_RES RES_TONE440L220R_OGG - -#define TEST_STEREO_INPUT_PANNING 0 - -using namespace ci; -using namespace ci::app; -using namespace std; - - -class SamplePlayerNodeTestApp : public App { - public: - void setup() override; - void mouseDown( MouseEvent event ) override; - void keyDown( KeyEvent event ) override; - void fileDrop( FileDropEvent event ) override; - void update() override; - void draw() override; - - void setupBufferPlayerNode(); - void setupFilePlayerNode(); - void setupBufferRecorderNode(); - void setSourceFile( const DataSourceRef &dataSource ); - void writeRecordedToFile(); - void triggerStartStop( bool start ); - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - void seek( size_t xPos ); - void printBufferSamples( size_t xPos ); - void printSupportedExtensions(); - - void testConverter(); - void testWrite(); - - audio::SamplePlayerNodeRef mSamplePlayerNode; - audio::SourceFileRef mSourceFile; - audio::MonitorNodeRef mMonitor; - audio::GainNodeRef mGain; - audio::Pan2dNodeRef mPan; - audio::BufferRecorderNodeRef mRecorder; - - WaveformPlot mWaveformPlot; - vector mWidgets; - Button mEnableSamplePlayerNodeButton, mStartPlaybackButton, mStopPlaybackButton, mLoopButton, mAsyncButton, mRecordButton, mWriteButton, mAutoResizeButton; - VSelector mTestSelector; - HSlider mGainSlider, mPanSlider, mLoopBeginSlider, mLoopEndSlider, mTriggerDelaySlider; - - Anim mUnderrunFade, mOverrunFade, mRecorderOverrunFade; - Rectf mUnderrunRect, mOverrunRect, mRecorderOverrunRect; - bool mSamplePlayerNodeEnabledState; - std::future mAsyncLoadFuture; -}; - -void SamplePlayerNodeTestApp::setup() -{ - mUnderrunFade = mOverrunFade = mRecorderOverrunFade = 0; - mSamplePlayerNodeEnabledState = false; - - printSupportedExtensions(); - - setSourceFile( loadResource( INITIAL_AUDIO_RES ) ); - - auto ctx = audio::master(); - - mPan = ctx->makeNode( new audio::Pan2dNode() ); -#if TEST_STEREO_INPUT_PANNING - mPan->setStereoInputModeEnabled( true ); -#endif - - mGain = ctx->makeNode( new audio::GainNode() ); - mGain->setValue( 0.6f ); - - mGain >> mPan >> ctx->getOutput(); - - setupBufferPlayerNode(); -// setupFilePlayerNode(); - - setupUI(); - - ctx->enable(); - mEnableSamplePlayerNodeButton.setEnabled( true ); - - CI_LOG_V( "context samplerate: " << ctx->getSampleRate() ); -} - -void SamplePlayerNodeTestApp::setupBufferPlayerNode() -{ - auto bufferPlayer = audio::master()->makeNode( new audio::BufferPlayerNode() ); - - auto loadFn = [bufferPlayer, this] { - bufferPlayer->loadBuffer( mSourceFile->clone() ); - mWaveformPlot.load( bufferPlayer->getBuffer(), getWindowBounds() ); - CI_LOG_V( "loaded source buffer, frames: " << bufferPlayer->getBuffer()->getNumFrames() ); - - }; - - auto connectFn = [bufferPlayer, this] { - mGain->disconnectAllInputs(); - mSamplePlayerNode = bufferPlayer; - mSamplePlayerNode >> mGain >> mPan >> audio::master()->getOutput(); - PRINT_GRAPH( audio::master() ); - mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); - }; - - bool asyncLoad = mAsyncButton.mEnabled; - CI_LOG_V( "async load: " << boolalpha << asyncLoad << dec ); - if( asyncLoad ) { - mWaveformPlot.clear(); - mAsyncLoadFuture = std::async( [=] { - loadFn(); - dispatchAsync( [=] { - connectFn(); - } ); - } ); - } - else { - loadFn(); - connectFn(); - }; -} - -void SamplePlayerNodeTestApp::setupFilePlayerNode() -{ - mGain->disconnectAllInputs(); - - auto ctx = audio::master(); - -// mSourceFile->setMaxFramesPerRead( 8192 ); - bool asyncRead = mAsyncButton.mEnabled; - CI_LOG_V( "async read: " << asyncRead ); - mSamplePlayerNode = ctx->makeNode( new audio::FilePlayerNode( mSourceFile->clone(), asyncRead ) ); - - // TODO: it is pretty surprising when you recreate mMonitor here without checking if there has already been one added. - // - user will no longer see the old mMonitor, but the context still owns a reference to it, so another gets added each time we call this method. - if( ! mMonitor ) - mMonitor = ctx->makeNode( new audio::MonitorNode( audio::MonitorNode::Format().windowSize( 1024 ) ) ); - - // when these connections are called, some (GainNode and Pan) will already be connected, but this is okay, they should silently no-op. - - // or connect in series (it is added to the Context's 'auto pulled list') - mSamplePlayerNode >> mGain >> mPan >> ctx->getOutput(); - mPan >> mMonitor; - - mSamplePlayerNode->setLoopEnabled( mLoopButton.mEnabled ); - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled != 0 ? mLoopEndSlider.mValueScaled : mSamplePlayerNode->getNumSeconds() ); - - PRINT_GRAPH( audio::master() ); -} - -void SamplePlayerNodeTestApp::setupBufferRecorderNode() -{ - auto ctx = audio::master(); - - mRecorder = ctx->makeNode( new audio::BufferRecorderNode( 2 * ctx->getSampleRate() ) ); -// mRecorder->setNumSeconds( 2 ); // can also set seconds afterwards, which causes a lock and buffer resize - - CI_ASSERT( mSamplePlayerNode ); - - mSamplePlayerNode >> mRecorder; - - PRINT_GRAPH( audio::master() ); -} - -void SamplePlayerNodeTestApp::setSourceFile( const DataSourceRef &dataSource ) -{ - mSourceFile = audio::load( dataSource, audio::master()->getSampleRate() ); - - getWindow()->setTitle( dataSource->getFilePath().filename().string() ); - - CI_LOG_V( "SourceFile info: " ); - console() << "samplerate: " << mSourceFile->getSampleRate() << endl; - console() << "native samplerate: " << mSourceFile->getSampleRateNative() << endl; - console() << "channels: " << mSourceFile->getNumChannels() << endl; - console() << "frames: " << mSourceFile->getNumFrames() << endl; - console() << "metadata:\n" << mSourceFile->getMetaData() << endl; -} - -void SamplePlayerNodeTestApp::writeRecordedToFile() -{ - const string fileName = "recorder_out.wav"; - CI_LOG_V( "writing to: " << fileName ); - - mRecorder->writeToFile( fileName ); - - CI_LOG_V( "...complete." ); -} - -void SamplePlayerNodeTestApp::triggerStartStop( bool start ) -{ - float delaySeconds = mTriggerDelaySlider.mValueScaled; - if( delaySeconds <= 0.001f ) { - if( start ) - mSamplePlayerNode->start(); - else - mSamplePlayerNode->stop(); - } - else { - CI_LOG_V( "scheduling " << ( start ? "start" : "stop" ) << " with delay: " << delaySeconds - << "\n\tprocessed frames: " << audio::master()->getNumProcessedFrames() << ", seconds: " << audio::master()->getNumProcessedSeconds() ); - - double when = audio::master()->getNumProcessedSeconds() + delaySeconds; - if( start ) - mSamplePlayerNode->start( when ); - else - mSamplePlayerNode->stop( when ); - } -} - -void SamplePlayerNodeTestApp::setupUI() -{ - const float padding = 6.0f; - - auto buttonRect = Rectf( padding, padding, 160, 50 ); - mEnableSamplePlayerNodeButton.mIsToggle = true; - mEnableSamplePlayerNodeButton.mTitleNormal = "player off"; - mEnableSamplePlayerNodeButton.mTitleEnabled = "player on"; - mEnableSamplePlayerNodeButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableSamplePlayerNodeButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mStartPlaybackButton.mIsToggle = false; - mStartPlaybackButton.mTitleNormal = "start"; - mStartPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mStartPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mStopPlaybackButton.mIsToggle = false; - mStopPlaybackButton.mTitleNormal = "stop"; - mStopPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mStopPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - buttonRect.x2 -= 30; - mLoopButton.mIsToggle = true; - mLoopButton.mTitleNormal = "loop off"; - mLoopButton.mTitleEnabled = "loop on"; - mLoopButton.setEnabled( mSamplePlayerNode->isLoopEnabled() ); - mLoopButton.mBounds = buttonRect; - mWidgets.push_back( &mLoopButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mAsyncButton.mIsToggle = true; - mAsyncButton.mTitleNormal = "async off"; - mAsyncButton.mTitleEnabled = "async on"; - mAsyncButton.mBounds = buttonRect; - mWidgets.push_back( &mAsyncButton ); - - buttonRect = Rectf( padding, buttonRect.y2 + padding, padding + buttonRect.getWidth(), buttonRect.y2 + buttonRect.getHeight() + padding ); - mRecordButton.mIsToggle = true; - mRecordButton.mTitleNormal = "record off"; - mRecordButton.mTitleEnabled = "record on"; - mRecordButton.mBounds = buttonRect; - mWidgets.push_back( &mRecordButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mWriteButton.mIsToggle = false; - mWriteButton.mTitleNormal = "write to file"; - mWriteButton.mBounds = buttonRect; - mWidgets.push_back( &mWriteButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mAutoResizeButton.mIsToggle = true; - mAutoResizeButton.mTitleNormal = "auto resize off"; - mAutoResizeButton.mTitleEnabled = "auto resize on"; - mAutoResizeButton.mBounds = buttonRect; - mWidgets.push_back( &mAutoResizeButton ); - - vec2 sliderSize( 200, 30 ); - Rectf selectorRect( getWindowWidth() - sliderSize.x - padding, padding, getWindowWidth() - padding, sliderSize.y * 3 + padding ); - mTestSelector.mSegments.push_back( "BufferPlayerNode" ); - mTestSelector.mSegments.push_back( "FilePlayerNode" ); - mTestSelector.mSegments.push_back( "recorder" ); - mTestSelector.mBounds = selectorRect; - mWidgets.push_back( &mTestSelector ); - - Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "GainNode"; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mPanSlider.mBounds = sliderRect; - mPanSlider.mTitle = "Pan"; - mPanSlider.set( mPan->getPos() ); - mWidgets.push_back( &mPanSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mLoopBeginSlider.mBounds = sliderRect; - mLoopBeginSlider.mTitle = "Loop Begin"; - mLoopBeginSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopBeginSlider.set( (float)mSamplePlayerNode->getLoopBeginTime() ); - mWidgets.push_back( &mLoopBeginSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mLoopEndSlider.mBounds = sliderRect; - mLoopEndSlider.mTitle = "Loop End"; - mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopEndSlider.set( (float)mSamplePlayerNode->getLoopEndTime() ); - mWidgets.push_back( &mLoopEndSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mTriggerDelaySlider.mBounds = sliderRect; - mTriggerDelaySlider.mTitle = "Trigger Delay"; - mTriggerDelaySlider.mMin = 0.0f; // TODO: test negative numbers don't blow up - mTriggerDelaySlider.mMax = 5.0f; - mTriggerDelaySlider.set( 0 ); - mWidgets.push_back( &mTriggerDelaySlider ); - - vec2 xrunSize( 80, 26 ); - mUnderrunRect = Rectf( padding, getWindowHeight() - xrunSize.y - padding, xrunSize.x + padding, getWindowHeight() - padding ); - mOverrunRect = mUnderrunRect + vec2( xrunSize.x + padding, 0 ); - mRecorderOverrunRect = mOverrunRect + vec2( xrunSize.x + padding, 0 ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void SamplePlayerNodeTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->setValue( mGainSlider.mValueScaled ); - else if( mPanSlider.hitTest( pos ) ) { -#if TEST_STEREO_INPUT_PANNING - mPan->getParamPos()->applyRamp( mPanSlider.mValueScaled, 0.6f ); -#else - mPan->setPos( mPanSlider.mValueScaled ); -#endif - } - else if( mLoopBeginSlider.hitTest( pos ) ) - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - else if( mLoopEndSlider.hitTest( pos ) ) - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled ); - else if( mTriggerDelaySlider.hitTest( pos ) ) { - } - else if( pos.y > getWindowCenter().y ) - seek( pos.x ); -} - -void SamplePlayerNodeTestApp::processTap( ivec2 pos ) -{ - if( mEnableSamplePlayerNodeButton.hitTest( pos ) ) - mSamplePlayerNode->setEnabled( ! mSamplePlayerNode->isEnabled() ); - else if( mStartPlaybackButton.hitTest( pos ) ) - triggerStartStop( true ); - else if( mStopPlaybackButton.hitTest( pos ) ) - triggerStartStop( false ); - else if( mLoopButton.hitTest( pos ) ) - mSamplePlayerNode->setLoopEnabled( ! mSamplePlayerNode->isLoopEnabled() ); - else if( mRecordButton.hitTest( pos ) ) { - if( mRecordButton.mEnabled ) - mRecorder->start(); - else - mRecorder->disable(); - } - else if( mWriteButton.hitTest( pos ) ) - writeRecordedToFile(); - else if( mAutoResizeButton.hitTest( pos ) ) - ; - else if( mAsyncButton.hitTest( pos ) ) - ; - else if( pos.y > getWindowCenter().y ) - seek( pos.x ); - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "BufferPlayerNode" ) - setupBufferPlayerNode(); - if( currentTest == "FilePlayerNode" ) - setupFilePlayerNode(); - if( currentTest == "recorder" ) - setupBufferRecorderNode(); - } -} - -void SamplePlayerNodeTestApp::seek( size_t xPos ) -{ - mSamplePlayerNode->seek( mSamplePlayerNode->getNumFrames() * xPos / getWindowWidth() ); -} - -void SamplePlayerNodeTestApp::printBufferSamples( size_t xPos ) -{ - auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); - if( ! bufferPlayer ) - return; - - auto buffer = bufferPlayer->getBuffer(); - size_t step = buffer->getNumFrames() / getWindowWidth(); - size_t xScaled = xPos * step; - CI_LOG_V( "samples starting at " << xScaled << ":" ); - for( int i = 0; i < 100; i++ ) { - if( buffer->getNumChannels() == 1 ) - console() << buffer->getChannel( 0 )[xScaled + i] << ", "; - else - console() << "[" << buffer->getChannel( 0 )[xScaled + i] << ", " << buffer->getChannel( 0 )[xScaled + i] << "], "; - } - console() << endl; -} - -void SamplePlayerNodeTestApp::printSupportedExtensions() -{ - CI_LOG_V( "supported SourceFile extensions: " ); - for( const auto &ext : audio::SourceFile::getSupportedExtensions() ) - console() << ext << ", "; - - console() << endl; -} - -void SamplePlayerNodeTestApp::mouseDown( MouseEvent event ) -{ -// printBufferSamples( event.getX() ); -} - -void SamplePlayerNodeTestApp::keyDown( KeyEvent event ) -{ - if( event.getCode() == KeyEvent::KEY_c ) - testConverter(); - if( event.getCode() == KeyEvent::KEY_w ) - testWrite(); - if( event.getCode() == KeyEvent::KEY_s ) - mSamplePlayerNode->seekToTime( 1.0 ); -} - -void SamplePlayerNodeTestApp::fileDrop( FileDropEvent event ) -{ - const fs::path &filePath = event.getFile( 0 ); - CI_LOG_V( "File dropped: " << filePath ); - - setSourceFile( loadFile( filePath ) ); - mSamplePlayerNode->seek( 0 ); - - CI_LOG_V( "output samplerate: " << mSourceFile->getSampleRate() ); - - auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); - if( bufferPlayer ) { - bufferPlayer->loadBuffer( mSourceFile->clone() ); - mWaveformPlot.load( bufferPlayer->getBuffer(), getWindowBounds() ); - } - else { - auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); - CI_ASSERT_MSG( filePlayer, "expected sample player to be either BufferPlayerNode or FilePlayerNode" ); - - filePlayer->setSourceFile( mSourceFile->clone() ); - } - - mLoopBeginSlider.mMax = mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopBeginSlider.set( mSamplePlayerNode->getLoopBeginTime() ); - mLoopEndSlider.set( mSamplePlayerNode->getLoopEndTime() ); - - CI_LOG_V( "loaded and set new source buffer, channels: " << mSourceFile->getNumChannels() << ", frames: " << mSourceFile->getNumFrames() ); - PRINT_GRAPH( audio::master() ); -} - - -void SamplePlayerNodeTestApp::update() -{ - // light up rects if an xrun was detected - const float xrunFadeTime = 1.3f; - auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); - if( filePlayer ) { - if( filePlayer->getLastUnderrun() ) - timeline().apply( &mUnderrunFade, 1.0f, 0.0f, xrunFadeTime ); - if( filePlayer->getLastOverrun() ) - timeline().apply( &mOverrunFade, 1.0f, 0.0f, xrunFadeTime ); - } - - // print SamplePlayerNode start / stop times - if( mSamplePlayerNodeEnabledState != mSamplePlayerNode->isEnabled() ) { - mSamplePlayerNodeEnabledState = mSamplePlayerNode->isEnabled(); - string stateStr = mSamplePlayerNodeEnabledState ? "started" : "stopped"; - CI_LOG_V( "mSamplePlayerNode " << stateStr << " at " << getElapsedSeconds() << ", isEof: " << boolalpha << mSamplePlayerNode->isEof() << dec ); - } - - bool testIsRecorder = ( mTestSelector.currentSection() == "recorder" ); - mRecordButton.mHidden = mWriteButton.mHidden = mAutoResizeButton.mHidden = ! testIsRecorder; - - // test auto resizing the Recorder's buffer depending on how full it is - if( testIsRecorder && mAutoResizeButton.mEnabled ) { - CI_ASSERT( mRecorder ); - - size_t writePos = mRecorder->getWritePosition(); - size_t numFrames = mRecorder->getNumFrames(); - - if( writePos + mRecorder->getSampleRate() / 2 > numFrames ) { - size_t resizeFrames = numFrames + mRecorder->getSampleRate(); - CI_LOG_V( "writePos: " << writePos << ", numFrames: " << numFrames << ", resizing frames to: " << resizeFrames ); - mRecorder->setNumFrames( resizeFrames ); - } - - if( mRecorder->getLastOverrun() ) - timeline().apply( &mRecorderOverrunFade, 1.0f, 0.0f, xrunFadeTime ); - } - -} - -void SamplePlayerNodeTestApp::draw() -{ - gl::clear(); - - if( mTestSelector.currentSection() == "recorder" ) { - audio::BufferRef recordedBuffer = mRecorder->getRecordedCopy(); - drawAudioBuffer( *recordedBuffer, getWindowBounds() ); - } - else { - auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); - if( bufferPlayer ) - mWaveformPlot.draw(); - else if( mMonitor && mMonitor->isInitialized() ) - drawAudioBuffer( mMonitor->getBuffer(), getWindowBounds() ); - - float readPos = (float)getWindowWidth() * mSamplePlayerNode->getReadPosition() / mSamplePlayerNode->getNumFrames(); - gl::color( ColorA( 0, 1, 0, 0.7f ) ); - gl::drawSolidRect( Rectf( readPos - 2, 0, readPos + 2, (float)getWindowHeight() ) ); - } - - if( mUnderrunFade > 0.0001f ) { - gl::color( ColorA( 1, 0.5f, 0, mUnderrunFade ) ); - gl::drawSolidRect( mUnderrunRect ); - gl::drawStringCentered( "play underrun", mUnderrunRect.getCenter(), Color::black() ); - } - if( mOverrunFade > 0.0001f ) { - gl::color( ColorA( 1, 0.5f, 0, mOverrunFade ) ); - gl::drawSolidRect( mOverrunRect ); - gl::drawStringCentered( "play overrun", mOverrunRect.getCenter(), Color::black() ); - } - - if( mRecorderOverrunFade > 0.0001f ) { - gl::color( ColorA( 1, 0.5f, 0, mRecorderOverrunFade ) ); - gl::drawSolidRect( mRecorderOverrunRect ); - gl::drawStringCentered( "rec overrun", mRecorderOverrunRect.getCenter(), Color::black() ); - } - - drawWidgets( mWidgets ); -} - -void SamplePlayerNodeTestApp::testConverter() -{ - audio::BufferRef audioBuffer = mSourceFile->loadBuffer(); - - size_t destSampleRate = 48000; - size_t destChannels = 1; - size_t sourceMaxFramesPerBlock = 512; - auto converter = audio::dsp::Converter::create( mSourceFile->getSampleRate(), destSampleRate, mSourceFile->getNumChannels(), destChannels, sourceMaxFramesPerBlock ); - - CI_LOG_V( "FROM samplerate: " << converter->getSourceSampleRate() << ", channels: " << converter->getSourceNumChannels() << ", frames per block: " << converter->getSourceMaxFramesPerBlock() ); - CI_LOG_V( "TO samplerate: " << converter->getDestSampleRate() << ", channels: " << converter->getDestNumChannels() << ", frames per block: " << converter->getDestMaxFramesPerBlock() ); - - audio::BufferDynamic sourceBuffer( converter->getSourceMaxFramesPerBlock(), converter->getSourceNumChannels() ); - audio::Buffer destBuffer( converter->getDestMaxFramesPerBlock(), converter->getDestNumChannels() ); - - audio::TargetFileRef target = audio::TargetFile::create( "resampled.wav", converter->getDestSampleRate(), converter->getDestNumChannels() ); - - size_t numFramesConverted = 0; - - Timer timer( true ); - - while( numFramesConverted < audioBuffer->getNumFrames() ) { - if( audioBuffer->getNumFrames() - numFramesConverted > sourceMaxFramesPerBlock ) { - for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) - memcpy( sourceBuffer.getChannel( ch ), audioBuffer->getChannel( ch ) + numFramesConverted, sourceMaxFramesPerBlock * sizeof( float ) ); - //copy( audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getChannel( ch ) + numFramesConverted + sourceMaxFramesPerBlock, sourceBuffer.getChannel( ch ) ); - } - else { - // EOF, shrink sourceBuffer to match remaining - sourceBuffer.setNumFrames( audioBuffer->getNumFrames() - numFramesConverted ); - for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) - memcpy( sourceBuffer.getChannel( ch ), audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getNumFrames() * sizeof( float ) ); - //copy( audioBuffer->getChannel( ch ) + numFramesConverted, audioBuffer->getChannel( ch ) + audioBuffer->getNumFrames(), sourceBuffer.getChannel( ch ) ); - } - - pair result = converter->convert( &sourceBuffer, &destBuffer ); - numFramesConverted += result.first; - - target->write( &destBuffer, 0, result.second ); - } - - CI_LOG_V( "seconds: " << timer.getSeconds() ); -} - -void SamplePlayerNodeTestApp::testWrite() -{ - audio::BufferRef audioBuffer = mSourceFile->loadBuffer(); - - try { - const string fileName = "out.wav"; - audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels() ); // INT_16 - // audio::TargetFileRef target = audio::TargetFile::create( fileName, mSourceFile->getSampleRate(), mSourceFile->getNumChannels(), audio::SampleType::FLOAT_32 ); - - CI_LOG_V( "writing " << audioBuffer->getNumFrames() << " frames at samplerate: " << mSourceFile->getSampleRate() << ", num channels: " << mSourceFile->getNumChannels() ); - target->write( audioBuffer.get() ); - CI_LOG_V( "...complete." ); - -// size_t writeCount = 0; -// while( numFramesConverted < audioBuffer->getNumFrames() ) { -// for( size_t ch = 0; ch < audioBuffer->getNumChannels(); ch++ ) -// copy( audioBuffer->getChannel( ch ) + writeCount, audioBuffer->getChannel( ch ) + writeCount + sourceFormat.getFramesPerBlock(), sourceBuffer.getChannel( ch ) ); -// } - } - catch( audio::AudioFileExc &exc ) { - CI_LOG_E( "AudioFileExc, what: " << exc.what() ); - } -} - -CINDER_APP( SamplePlayerNodeTestApp, RendererGl, []( App::Settings *settings ) { - settings->setWindowSize( 1000, 500 ); -} ) diff --git a/test/_audio/SampleTest/vc2015/Resources.rc b/test/_audio/SampleTest/vc2015/Resources.rc deleted file mode 100644 index ac37542b70..0000000000 --- a/test/_audio/SampleTest/vc2015/Resources.rc +++ /dev/null @@ -1,11 +0,0 @@ -#include "../include/Resources.h" - -RES_TONE440_WAV -RES_TONE440L220R_WAV -RES_TONE440_LOOP_WAV - -RES_TONE440_MP3 -RES_TONE440L220R_MP3 - -RES_TONE440_OGG -RES_TONE440L220R_OGG diff --git a/test/_audio/SampleTest/vc2015/SampleTest.sln b/test/_audio/SampleTest/vc2015/SampleTest.sln deleted file mode 100644 index a991b3d986..0000000000 --- a/test/_audio/SampleTest/vc2015/SampleTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleTest", "SampleTest.vcxproj", "{20E84023-6E68-4387-B158-0A13FDA53646}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug|Win32.ActiveCfg = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Debug|Win32.Build.0 = Debug|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release|Win32.ActiveCfg = Release|Win32 - {20E84023-6E68-4387-B158-0A13FDA53646}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/SampleTest/vc2015/SampleTest.vcxproj b/test/_audio/SampleTest/vc2015/SampleTest.vcxproj deleted file mode 100644 index c870898ca7..0000000000 --- a/test/_audio/SampleTest/vc2015/SampleTest.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {20E84023-6E68-4387-B158-0A13FDA53646} - SampleTest - Win32Proj - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - v140 - Unicode - - - Application - true - v120 - Unicode - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - - Disabled - ..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost;..\..\..\src;$(DXSDK_DIR)\include - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - - - $(CINDER_PATH)\include;..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost;..\..\..\src;$(DXSDK_DIR)\include - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost;..\..\..\src;$(DXSDK_DIR)\include - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder.lib;%(AdditionalDependencies) - ..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\..\lib\msw\$(PlatformTarget)\$(Configuration)\$(PlatformToolset) - false - true - Windows - true - - false - - MachineX86 - - - - - ..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost;..\..\..\src;$(DXSDK_DIR)\include - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/SampleTest/vc2015/SampleTest.vcxproj.filters b/test/_audio/SampleTest/vc2015/SampleTest.vcxproj.filters deleted file mode 100644 index 71eca968fd..0000000000 --- a/test/_audio/SampleTest/vc2015/SampleTest.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - Header Files - - - Source Files - - - - - Header Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/test/_audio/SampleTest/xcode/Info.plist b/test/_audio/SampleTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/SampleTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/SampleTest/xcode/Prefix.pch b/test/_audio/SampleTest/xcode/Prefix.pch deleted file mode 100644 index 061fc5a6ef..0000000000 --- a/test/_audio/SampleTest/xcode/Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/project.pbxproj b/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/project.pbxproj deleted file mode 100644 index 6e9f361e04..0000000000 --- a/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,445 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 08019EE3AC7E44BDAC280CDF /* SampleTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 87979270473A48D48B99601B /* SampleTestApp.cpp */; }; - 111A611E1921CB9D005C3166 /* tone440_float.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A61161921CB9D005C3166 /* tone440_float.wav */; }; - 111A611F1921CB9D005C3166 /* tone440.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 111A61171921CB9D005C3166 /* tone440.mp3 */; }; - 111A61201921CB9D005C3166 /* tone440.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 111A61181921CB9D005C3166 /* tone440.ogg */; }; - 111A61211921CB9D005C3166 /* tone440.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A61191921CB9D005C3166 /* tone440.wav */; }; - 111A61231921CB9D005C3166 /* tone440L220R.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 111A611B1921CB9D005C3166 /* tone440L220R.mp3 */; }; - 111A61241921CB9D005C3166 /* tone440L220R.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 111A611C1921CB9D005C3166 /* tone440L220R.ogg */; }; - 111A61251921CB9D005C3166 /* tone440L220R.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A611D1921CB9D005C3166 /* tone440L220R.wav */; }; - 111A61281921CBC4005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61261921CBC4005C3166 /* AudioDrawUtils.cpp */; }; - 111A6232192DB6ED0024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A622B192DB6DF0024BE66 /* libcinder_d.a */; }; - 111A6234192DBBE90024BE66 /* tone440_loop.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A6233192DBBE90024BE66 /* tone440_loop.wav */; }; - 1120DAAA19B63DCA00522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA819B63DCA00522276 /* AVFoundation.framework */; }; - 1120DAAB19B63DCA00522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAA919B63DCA00522276 /* CoreMedia.framework */; }; - 119C4EE71B23A36C006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EE61B23A36C006563C5 /* IOKit.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A622A192DB6DF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A622C192DB6DF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A622E192DB6DF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A6230192DB6E80024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A61161921CB9D005C3166 /* tone440_float.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440_float.wav; path = ../../data/tone440_float.wav; sourceTree = ""; }; - 111A61171921CB9D005C3166 /* tone440.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = tone440.mp3; path = ../../data/tone440.mp3; sourceTree = ""; }; - 111A61181921CB9D005C3166 /* tone440.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; name = tone440.ogg; path = ../../data/tone440.ogg; sourceTree = ""; }; - 111A61191921CB9D005C3166 /* tone440.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440.wav; path = ../../data/tone440.wav; sourceTree = ""; }; - 111A611B1921CB9D005C3166 /* tone440L220R.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = tone440L220R.mp3; path = ../../data/tone440L220R.mp3; sourceTree = ""; }; - 111A611C1921CB9D005C3166 /* tone440L220R.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; name = tone440L220R.ogg; path = ../../data/tone440L220R.ogg; sourceTree = ""; }; - 111A611D1921CB9D005C3166 /* tone440L220R.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440L220R.wav; path = ../../data/tone440L220R.wav; sourceTree = ""; }; - 111A61261921CBC4005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61271921CBC4005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 111A6233192DBBE90024BE66 /* tone440_loop.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440_loop.wav; path = ../../data/tone440_loop.wav; sourceTree = ""; }; - 1120DAA819B63DCA00522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAA919B63DCA00522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EE61B23A36C006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 459C1BCAC77D495892F10286 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 87979270473A48D48B99601B /* SampleTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = SampleTestApp.cpp; path = ../src/SampleTestApp.cpp; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* SampleTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - F3D71E9077EC40E6AF6AEA80 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - FF271E6CD9EF4BF3A1DFA6FE /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EE71B23A36C006563C5 /* IOKit.framework in Frameworks */, - 111A6232192DB6ED0024BE66 /* libcinder_d.a in Frameworks */, - 1120DAAA19B63DCA00522276 /* AVFoundation.framework in Frameworks */, - 1120DAAB19B63DCA00522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - 87979270473A48D48B99601B /* SampleTestApp.cpp */, - 111A61261921CBC4005C3166 /* AudioDrawUtils.cpp */, - 111A61271921CBC4005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6225192DB6DF0024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A622B192DB6DF0024BE66 /* libcinder_d.a */, - 111A622D192DB6DF0024BE66 /* libcinder-iphone_d.a */, - 111A622F192DB6DF0024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* SampleTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SampleTest */ = { - isa = PBXGroup; - children = ( - 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SampleTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - F3D71E9077EC40E6AF6AEA80 /* Resources.h */, - FF271E6CD9EF4BF3A1DFA6FE /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 111A6233192DBBE90024BE66 /* tone440_loop.wav */, - 111A61161921CB9D005C3166 /* tone440_float.wav */, - 111A61171921CB9D005C3166 /* tone440.mp3 */, - 111A61181921CB9D005C3166 /* tone440.ogg */, - 111A61191921CB9D005C3166 /* tone440.wav */, - 111A611B1921CB9D005C3166 /* tone440L220R.mp3 */, - 111A611C1921CB9D005C3166 /* tone440L220R.ogg */, - 111A611D1921CB9D005C3166 /* tone440L220R.wav */, - 459C1BCAC77D495892F10286 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EE61B23A36C006563C5 /* IOKit.framework */, - 1120DAA819B63DCA00522276 /* AVFoundation.framework */, - 1120DAA919B63DCA00522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* SampleTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SampleTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A6231192DB6E80024BE66 /* PBXTargetDependency */, - ); - name = SampleTest; - productInstallPath = "$(HOME)/Applications"; - productName = SampleTest; - productReference = 8D1107320486CEB800E47090 /* SampleTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SampleTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SampleTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6225192DB6DF0024BE66 /* Products */; - ProjectRef = 111A6224192DB6DF0024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* SampleTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A622B192DB6DF0024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A622A192DB6DF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A622D192DB6DF0024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A622C192DB6DF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A622F192DB6DF0024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A622E192DB6DF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61231921CB9D005C3166 /* tone440L220R.mp3 in Resources */, - 111A61201921CB9D005C3166 /* tone440.ogg in Resources */, - 111A61241921CB9D005C3166 /* tone440L220R.ogg in Resources */, - 111A61211921CB9D005C3166 /* tone440.wav in Resources */, - 111A61251921CB9D005C3166 /* tone440L220R.wav in Resources */, - 111A6234192DBBE90024BE66 /* tone440_loop.wav in Resources */, - 111A611E1921CB9D005C3166 /* tone440_float.wav in Resources */, - 111A611F1921CB9D005C3166 /* tone440.mp3 in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61281921CBC4005C3166 /* AudioDrawUtils.cpp in Sources */, - 08019EE3AC7E44BDAC280CDF /* SampleTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A6231192DB6E80024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A6230192DB6E80024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = SampleTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = SampleTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SampleTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SampleTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest.xcscheme b/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest.xcscheme deleted file mode 100644 index 0290d2b474..0000000000 --- a/test/_audio/SampleTest/xcode/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/SampleTest/xcode_ios/Default-568h@2x.png b/test/_audio/SampleTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/SampleTest/xcode_ios/Info.plist b/test/_audio/SampleTest/xcode_ios/Info.plist deleted file mode 100644 index 8f57c9df3e..0000000000 --- a/test/_audio/SampleTest/xcode_ios/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationPortraitUpsideDown - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/SampleTest/xcode_ios/Prefix.pch b/test/_audio/SampleTest/xcode_ios/Prefix.pch deleted file mode 100644 index 698cfa6b09..0000000000 --- a/test/_audio/SampleTest/xcode_ios/Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#if defined( __OBJC__ ) - #import - #import -#endif - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/project.pbxproj b/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/project.pbxproj deleted file mode 100644 index 5fabaf4caa..0000000000 --- a/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,331 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 111A61EF1921D8D9005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61ED1921D8D9005C3166 /* AudioDrawUtils.cpp */; }; - 114B40A7188CC5B600DB811D /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 114B40A6188CC5B600DB811D /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - CE3064E03C194585A5E1F283 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 02B35E9B7146446F8DDEED11 /* Default-568h@2x.png */; }; - DB1E63CFF36F4EEDA7D00296 /* SampleTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FA7C92DC3E04D2287F42479 /* SampleTestApp.cpp */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* SampleTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 02B35E9B7146446F8DDEED11 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; - 111A61ED1921D8D9005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61EE1921D8D9005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 114B40A6188CC5B600DB811D /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 3CED167DA13846A98E57E79E /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - 3FA7C92DC3E04D2287F42479 /* SampleTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = SampleTestApp.cpp; path = ../src/SampleTestApp.cpp; sourceTree = ""; }; - B2FC9834A26D484481E0503D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - F6AA1CA0612946E289C1780C /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 114B40A7188CC5B600DB811D /* Accelerate.framework in Frameworks */, - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* SampleTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 114B40A6188CC5B600DB811D /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - 3FA7C92DC3E04D2287F42479 /* SampleTestApp.cpp */, - 111A61ED1921D8D9005C3166 /* AudioDrawUtils.cpp */, - 111A61EE1921D8D9005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - 02B35E9B7146446F8DDEED11 /* Default-568h@2x.png */, - B2FC9834A26D484481E0503D /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - 3CED167DA13846A98E57E79E /* Resources.h */, - F6AA1CA0612946E289C1780C /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* SampleTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "SampleTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SampleTest; - productName = SampleTest; - productReference = 00692BCF14FF149000D0A05E /* SampleTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "SampleTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* SampleTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CE3064E03C194585A5E1F283 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61EF1921D8D9005C3166 /* AudioDrawUtils.cpp in Sources */, - DB1E63CFF36F4EEDA7D00296 /* SampleTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "SampleTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "SampleTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest-ios.xcscheme b/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest-ios.xcscheme deleted file mode 100644 index 23592d6d66..0000000000 --- a/test/_audio/SampleTest/xcode_ios/SampleTest.xcodeproj/xcshareddata/xcschemes/SampleTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/SpectralTest/include/Resources.h b/test/_audio/SpectralTest/include/Resources.h deleted file mode 100644 index d0cc628d17..0000000000 --- a/test/_audio/SpectralTest/include/Resources.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include "cinder/CinderResources.h" - -#define RES_TONE440L220R_MP3 CINDER_RESOURCE( ../../data/, tone440L220R.mp3, 133, SOUND ) - diff --git a/test/_audio/SpectralTest/src/SpectralTestApp.cpp b/test/_audio/SpectralTest/src/SpectralTestApp.cpp deleted file mode 100644 index de112c6b3d..0000000000 --- a/test/_audio/SpectralTest/src/SpectralTestApp.cpp +++ /dev/null @@ -1,309 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Utilities.h" -#include "cinder/Log.h" - -#include "cinder/audio/GenNode.h" -#include "cinder/audio/MonitorNode.h" -#include "cinder/audio/SamplePlayerNode.h" -#include "cinder/audio/dsp/Dsp.h" - -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" -#include "Resources.h" - -// TODO: make these runtime configurable -#define FFT_SIZE 2048 -#define WINDOW_SIZE 1024 -#define WINDOW_TYPE audio::dsp::WindowType::BLACKMAN - -using namespace ci; -using namespace ci::app; -using namespace std; - - -class SpectralTestApp : public App { - public: - void fileDrop( FileDropEvent event ) override; - void setup() override; - void resize() override; - void update() override; - void draw() override; - - void setupSine(); - void setupSineNoOutput(); - void setupSample(); - void setupUI(); - void processTap( ivec2 pos ); - void processDrag( ivec2 pos ); - void printBinFreq( size_t xPos ); - - - audio::BufferPlayerNodeRef mPlayerNode; - audio::GenNodeRef mGen; - audio::MonitorSpectralNodeRef mMonitorSpectralNode; - audio::SourceFileRef mSourceFile; - - vector mWidgets; - Button mEnableGraphButton, mPlaybackButton, mLoopButton, mScaleDecibelsButton; - VSelector mTestSelector; - HSlider mSmoothingFactorSlider, mFreqSlider; - SpectrumPlot mSpectrumPlot; - float mSpectroMargin; -}; - -void SpectralTestApp::setup() -{ - mSpectroMargin = 40.0f; - - auto ctx = audio::master(); - - auto format = audio::MonitorSpectralNode::Format().fftSize( FFT_SIZE ).windowSize( WINDOW_SIZE ).windowType( WINDOW_TYPE ); - mMonitorSpectralNode = ctx->makeNode( new audio::MonitorSpectralNode( format ) ); - mMonitorSpectralNode->setAutoEnabled(); - - mGen = ctx->makeNode( new audio::GenSineNode() ); - //mGen = ctx->makeNode( new audio::GenTriangleNode() ); - mGen->setFreq( 440.0f ); - - mSourceFile = audio::load( loadResource( RES_TONE440L220R_MP3 ), ctx->getSampleRate() ); - - auto audioBuffer = mSourceFile->loadBuffer(); - CI_LOG_V( "loaded source buffer, frames: " << audioBuffer->getNumFrames() ); - - mPlayerNode = ctx->makeNode( new audio::BufferPlayerNode( audioBuffer ) ); - - setupSine(); - - setupUI(); - - ctx->enable(); - mEnableGraphButton.setEnabled( true ); - - mScaleDecibelsButton.setEnabled( mSpectrumPlot.getScaleDecibels() ); - - PRINT_GRAPH( ctx ); - - CI_LOG_V( "MonitorSpectralNode fftSize: " << mMonitorSpectralNode->getFftSize() << ", windowSize: " << mMonitorSpectralNode->getWindowSize() ); -} - -void SpectralTestApp::setupSine() -{ - mGen >> mMonitorSpectralNode >> audio::master()->getOutput(); - if( mPlaybackButton.mEnabled ) - mGen->enable(); -} - -void SpectralTestApp::setupSineNoOutput() -{ - mGen->connect( mMonitorSpectralNode ); - if( mPlaybackButton.mEnabled ) - mGen->enable(); -} - -void SpectralTestApp::setupSample() -{ - mPlayerNode >> mMonitorSpectralNode >> audio::master()->getOutput(); - if( mPlaybackButton.mEnabled ) - mPlayerNode->enable(); -} - -void SpectralTestApp::setupUI() -{ - Rectf buttonRect( 0.0f, 0.0f, 200.0f, mSpectroMargin - 2.0f ); - float padding = 10.0f; - mEnableGraphButton.mIsToggle = true; - mEnableGraphButton.mTitleNormal = "graph off"; - mEnableGraphButton.mTitleEnabled = "graph on"; - mEnableGraphButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableGraphButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mPlaybackButton.mIsToggle = true; - mPlaybackButton.mTitleNormal = "play"; - mPlaybackButton.mTitleEnabled = "stop"; - mPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mLoopButton.mIsToggle = true; - mLoopButton.mTitleNormal = "loop off"; - mLoopButton.mTitleEnabled = "loop on"; - mLoopButton.mBounds = buttonRect; - mWidgets.push_back( &mLoopButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0.0f ); - mScaleDecibelsButton.mIsToggle = true; - mScaleDecibelsButton.mTitleNormal = "linear"; - mScaleDecibelsButton.mTitleEnabled = "decibels"; - mScaleDecibelsButton.mBounds = buttonRect; - mWidgets.push_back( &mScaleDecibelsButton ); - - vec2 sliderSize( 200.0f, 30.0f ); - Rectf selectorRect( getWindowWidth() - sliderSize.x - mSpectroMargin, buttonRect.y2 + padding, getWindowWidth() - mSpectroMargin, buttonRect.y2 + padding + sliderSize.y * 3 ); - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "sine (no output)" ); - mTestSelector.mSegments.push_back( "sample" ); - mTestSelector.mBounds = selectorRect; - mWidgets.push_back( &mTestSelector ); - - Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); - mSmoothingFactorSlider.mBounds = sliderRect; - mSmoothingFactorSlider.mTitle = "Smoothing"; - mSmoothingFactorSlider.mMin = 0.0f; - mSmoothingFactorSlider.mMax = 1.0f; - mSmoothingFactorSlider.set( mMonitorSpectralNode->getSmoothingFactor() ); - mWidgets.push_back( &mSmoothingFactorSlider ); - - sliderRect += vec2( 0.0f, sliderSize.y + padding ); - mFreqSlider.mBounds = sliderRect; - mFreqSlider.mTitle = "Sine Freq"; - mFreqSlider.mMin = 0.0f; -// mFreqSlider.mMax = mContext->getSampleRate() / 2.0f; - mFreqSlider.mMax = 800; - mFreqSlider.set( mGen->getFreq() ); - mWidgets.push_back( &mFreqSlider ); - - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void SpectralTestApp::printBinFreq( size_t xPos ) -{ - if( xPos < mSpectroMargin || xPos > getWindowWidth() - mSpectroMargin ) - return; - -// freq = bin * samplerate / sizeFft - - size_t numBins = mMonitorSpectralNode->getFftSize() / 2; - size_t spectroWidth = getWindowWidth() - mSpectroMargin * 2; - size_t bin = ( numBins * ( xPos - mSpectroMargin ) ) / spectroWidth; - float freq = bin * audio::master()->getSampleRate() / float( mMonitorSpectralNode->getFftSize() ); - - CI_LOG_V( "bin: " << bin << ", freq: " << freq ); -} - -// TODO: currently makes sense to enable processor + tap together - consider making these enabled together. -// - possible solution: add a silent flag that is settable by client -void SpectralTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - if( mEnableGraphButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mPlaybackButton.hitTest( pos ) ) { - if( mTestSelector.currentSection() == "sine" || mTestSelector.currentSection() == "sine (no output)" ) - mGen->setEnabled( mPlaybackButton.mEnabled ); - else { - if( mPlaybackButton.mEnabled ) - mPlayerNode->start(); - else - mPlayerNode->stop(); - } - } - else if( mLoopButton.hitTest( pos ) ) - mPlayerNode->setLoopEnabled( ! mPlayerNode->isLoopEnabled() ); - else if( mScaleDecibelsButton.hitTest( pos ) ) - mSpectrumPlot.enableScaleDecibels( ! mSpectrumPlot.getScaleDecibels() ); - else - printBinFreq( pos.x ); - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - bool enabled = ctx->isEnabled(); - ctx->disconnectAllNodes(); - - if( currentTest == "sine" ) - setupSine(); - if( currentTest == "sine (no output)" ) - setupSineNoOutput(); - if( currentTest == "sample" ) - setupSample(); - - ctx->setEnabled( enabled ); - } - -} - -void SpectralTestApp::processDrag( ivec2 pos ) -{ - if( mSmoothingFactorSlider.hitTest( pos ) ) - mMonitorSpectralNode->setSmoothingFactor( mSmoothingFactorSlider.mValueScaled ); - if( mFreqSlider.hitTest( pos ) ) - mGen->setFreq( mFreqSlider.mValueScaled ); -} - -void SpectralTestApp::fileDrop( FileDropEvent event ) -{ - const fs::path &filePath = event.getFile( 0 ); - CI_LOG_V( "File dropped: " << filePath ); - - mSourceFile = audio::load( loadFile( filePath ), audio::master()->getSampleRate() ); - - mPlayerNode->setBuffer( mSourceFile->loadBuffer() ); - - CI_LOG_V( "loaded and set new source buffer, frames: " << mSourceFile->getNumFrames() ); -} - -void SpectralTestApp::resize() -{ - mSpectrumPlot.setBounds( Rectf( mSpectroMargin, mSpectroMargin, getWindowWidth() - mSpectroMargin, getWindowHeight() - mSpectroMargin ) ); -} - -void SpectralTestApp::update() -{ - // update playback button, since the player node may stop itself at the end of a file. - if( mTestSelector.currentSection() == "sample" && ! mPlayerNode->isEnabled() ) - mPlaybackButton.setEnabled( false ); -} - -void SpectralTestApp::draw() -{ - gl::clear(); - - // draw magnitude spectrum - auto &mag = mMonitorSpectralNode->getMagSpectrum(); - mSpectrumPlot.draw( mag ); - - if( ! mag.empty() ) { - auto min = min_element( mag.begin(), mag.end() ); - auto max = max_element( mag.begin(), mag.end() ); - - string info = string( "min: " ) + toString( *min ) + string( ", max: " ) + toString( *max ); - gl::drawString( info, vec2( mSpectroMargin, getWindowHeight() - 30.0f ) ); - } - - // draw vertical line for spectral centroid - { - float spectralCentroid = mMonitorSpectralNode->getSpectralCentroid(); - float nyquist = (float)audio::master()->getSampleRate() / 2.0f; - Rectf bounds = mSpectrumPlot.getBounds(); - - float freqNormalized = spectralCentroid / nyquist; - float barCenter = bounds.x1 + freqNormalized * bounds.getWidth(); - Rectf bar = { barCenter - 2, bounds.y1, barCenter + 2, bounds.y2 }; - - gl::ScopedColor colorScope( 0.85f, 0.45f, 0, 0.4f ); - gl::drawSolidRect( bar ); - - //if( app::getElapsedFrames() % 30 == 0 ) { - // CI_LOG_I( "spectralCentroid: " << spectralCentroid ); - //} - } - - drawWidgets( mWidgets ); -} - -CINDER_APP( SpectralTestApp, RendererGl, []( App::Settings *settings ) { - settings->setWindowSize( 1200, 500 ); -} ) diff --git a/test/_audio/SpectralTest/vc2015/Resources.rc b/test/_audio/SpectralTest/vc2015/Resources.rc deleted file mode 100644 index e508499e68..0000000000 --- a/test/_audio/SpectralTest/vc2015/Resources.rc +++ /dev/null @@ -1,3 +0,0 @@ -#include "../include/Resources.h" - -RES_TONE440L220R_MP3 diff --git a/test/_audio/SpectralTest/vc2015/SpectralTest.sln b/test/_audio/SpectralTest/vc2015/SpectralTest.sln deleted file mode 100644 index ecdd930b77..0000000000 --- a/test/_audio/SpectralTest/vc2015/SpectralTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpectralTest", "SpectralTest.vcxproj", "{A576F01A-FF4D-44BE-BB7F-D589F7F3A376}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug|Win32.ActiveCfg = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Debug|Win32.Build.0 = Debug|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release|Win32.ActiveCfg = Release|Win32 - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj b/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj deleted file mode 100644 index d0fbf41eaa..0000000000 --- a/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {A576F01A-FF4D-44BE-BB7F-D589F7F3A376} - SpectralTest - Win32Proj - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - v140 - Unicode - - - Application - true - v120 - Unicode - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - - Disabled - ..\..\..\src;..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;..\include;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj.filters b/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj.filters deleted file mode 100644 index 70fc83a0ec..0000000000 --- a/test/_audio/SpectralTest/vc2015/SpectralTest.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - Header Files - - - Source Files - - - - - Header Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/test/_audio/SpectralTest/xcode/Info.plist b/test/_audio/SpectralTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/SpectralTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/SpectralTest/xcode/Prefix.pch b/test/_audio/SpectralTest/xcode/Prefix.pch deleted file mode 100644 index 061fc5a6ef..0000000000 --- a/test/_audio/SpectralTest/xcode/Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/project.pbxproj b/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/project.pbxproj deleted file mode 100644 index f4de9d634d..0000000000 --- a/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,425 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A61391921CC4A005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61371921CC4A005C3166 /* AudioDrawUtils.cpp */; }; - 111A613C1921CC66005C3166 /* tone440.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A613A1921CC66005C3166 /* tone440.wav */; }; - 111A613D1921CC66005C3166 /* tone440L220R.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A613B1921CC66005C3166 /* tone440L220R.wav */; }; - 111A613F1921CE8F005C3166 /* tone440L220R.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 111A613E1921CE8F005C3166 /* tone440L220R.mp3 */; }; - 111A628E192DCBE10024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A6287192DCBA90024BE66 /* libcinder_d.a */; }; - 1120DAAE19B63DD800522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAAC19B63DD800522276 /* AVFoundation.framework */; }; - 1120DAAF19B63DD800522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAAD19B63DD800522276 /* CoreMedia.framework */; }; - 114E54D71894F180005BFC20 /* SpectralTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 114E54D61894F180005BFC20 /* SpectralTestApp.cpp */; }; - 119C4EEB1B23A373006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EEA1B23A373006563C5 /* IOKit.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A6286192DCBA90024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6280192DCBA90024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A6288192DCBA90024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6280192DCBA90024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A628A192DCBA90024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6280192DCBA90024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A628C192DCBDB0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A6280192DCBA90024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 0C116A5339F74C6BA288F2C0 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A61371921CC4A005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61381921CC4A005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A613A1921CC66005C3166 /* tone440.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440.wav; path = ../../data/tone440.wav; sourceTree = ""; }; - 111A613B1921CC66005C3166 /* tone440L220R.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440L220R.wav; path = ../../data/tone440L220R.wav; sourceTree = ""; }; - 111A613E1921CE8F005C3166 /* tone440L220R.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = tone440L220R.mp3; path = ../../data/tone440L220R.mp3; sourceTree = ""; }; - 111A6280192DCBA90024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAAC19B63DD800522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAAD19B63DD800522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 114E54D61894F180005BFC20 /* SpectralTestApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpectralTestApp.cpp; path = ../src/SpectralTestApp.cpp; sourceTree = ""; }; - 119C4EEA1B23A373006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 6B81B15D2C044A47A309AA77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* SpectralTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpectralTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - F146757B94B4415C9F8412AA /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EEB1B23A373006563C5 /* IOKit.framework in Frameworks */, - 111A628E192DCBE10024BE66 /* libcinder_d.a in Frameworks */, - 1120DAAE19B63DD800522276 /* AVFoundation.framework in Frameworks */, - 1120DAAF19B63DD800522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - 111A61371921CC4A005C3166 /* AudioDrawUtils.cpp */, - 111A61381921CC4A005C3166 /* AudioDrawUtils.h */, - 114E54D61894F180005BFC20 /* SpectralTestApp.cpp */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6281192DCBA90024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A6287192DCBA90024BE66 /* libcinder_d.a */, - 111A6289192DCBA90024BE66 /* libcinder-iphone_d.a */, - 111A628B192DCBA90024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* SpectralTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* SpectralTest */ = { - isa = PBXGroup; - children = ( - 111A6280192DCBA90024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = SpectralTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - F146757B94B4415C9F8412AA /* Resources.h */, - 0C116A5339F74C6BA288F2C0 /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 111A613A1921CC66005C3166 /* tone440.wav */, - 111A613B1921CC66005C3166 /* tone440L220R.wav */, - 111A613E1921CE8F005C3166 /* tone440L220R.mp3 */, - 6B81B15D2C044A47A309AA77 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EEA1B23A373006563C5 /* IOKit.framework */, - 1120DAAC19B63DD800522276 /* AVFoundation.framework */, - 1120DAAD19B63DD800522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* SpectralTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpectralTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A628D192DCBDB0024BE66 /* PBXTargetDependency */, - ); - name = SpectralTest; - productInstallPath = "$(HOME)/Applications"; - productName = SpectralTest; - productReference = 8D1107320486CEB800E47090 /* SpectralTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpectralTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* SpectralTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6281192DCBA90024BE66 /* Products */; - ProjectRef = 111A6280192DCBA90024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* SpectralTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A6287192DCBA90024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A6286192DCBA90024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A6289192DCBA90024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A6288192DCBA90024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A628B192DCBA90024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A628A192DCBA90024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A613F1921CE8F005C3166 /* tone440L220R.mp3 in Resources */, - 111A613D1921CC66005C3166 /* tone440L220R.wav in Resources */, - 111A613C1921CC66005C3166 /* tone440.wav in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61391921CC4A005C3166 /* AudioDrawUtils.cpp in Sources */, - 114E54D71894F180005BFC20 /* SpectralTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A628D192DCBDB0024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A628C192DCBDB0024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = SpectralTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = SpectralTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SpectralTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpectralTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest.xcscheme b/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest.xcscheme deleted file mode 100644 index 7535b78cf1..0000000000 --- a/test/_audio/SpectralTest/xcode/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/SpectralTest/xcode_ios/Default-568h@2x.png b/test/_audio/SpectralTest/xcode_ios/Default-568h@2x.png deleted file mode 100644 index 858a072343225d53aa6d5c6ecdd2650615112fb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0g7B`)9nUwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk=hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VUMAqu^F;ONK(`emy~39VlOBy$^j?!lw|$X zoK&EvONxO3V~CmxQ22yseG*GCez(Z^IxwHO6vdbrb3a!*BK z0cLyxRa^Pyr(~v8x+IpQ+8G%b8tEFC>l&Gd7@Arcm|GbD0~}2aQY?XFoQqNuOY)0C z^7C`-z!8=U;wl*F8R!AC6uJt$@dOD2V3A|T1=I;EzU;U(KNijemU>e?T^vIyZoR#> zaqa2=2G)aXXD|sEnp!Sq5Mo-MBGT~W1Y_O){(ASz2RXx*FPrx5+`NAbY#&OtZ8y1k z=hnqskpziy_w3@mw|;#w<}~PupT8~c>$^$z2|HNg_P&0V&68kpf88GYgd5@+EC~^6 z3@ic;42%>Ll$!u?0>usi8{oshq0qp=3X4GZ?56RV>sAV-^AGxW<5y zDpAEjoiOH5ppI)2n5dDfs1?Qn4%BhY0TycHDr$wXLIZVN)4)lE0uY#~s1wFOQ>asz z3R9r~1ZFBKg)svYbqdqb3JYI^P$!I;s8pDaR#^D5;An+~uOUL6!W6l}I`CiezT2hY^~{?Y4aMO*LkW#W1KE+co{%B6cZAJ;e_ fFz?*AY0K)*Kdm?T(6rfr0SG)@{an^LB{Ts5-_Z&} diff --git a/test/_audio/SpectralTest/xcode_ios/Info.plist b/test/_audio/SpectralTest/xcode_ios/Info.plist deleted file mode 100644 index 06d3234c37..0000000000 --- a/test/_audio/SpectralTest/xcode_ios/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - CinderApp_ios.png - - UIPrerenderedIcon - - - - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/test/_audio/SpectralTest/xcode_ios/Prefix.pch b/test/_audio/SpectralTest/xcode_ios/Prefix.pch deleted file mode 100644 index 698cfa6b09..0000000000 --- a/test/_audio/SpectralTest/xcode_ios/Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -#if defined( __OBJC__ ) - #import - #import -#endif - -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif \ No newline at end of file diff --git a/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/project.pbxproj b/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/project.pbxproj deleted file mode 100644 index 74b5ff31cf..0000000000 --- a/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,334 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; - 0995D5CB69704862B46EAF1B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 91F7F295C48C4C49BFB9FAD7 /* Default-568h@2x.png */; }; - 111A61F21921D8FE005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61F01921D8FE005C3166 /* AudioDrawUtils.cpp */; }; - 111A61F41921D917005C3166 /* tone440L220R.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 111A61F31921D917005C3166 /* tone440L220R.mp3 */; }; - 11B04271179C591E0034BEE2 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11B04270179C591E0034BEE2 /* Accelerate.framework */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; - CEB251843F2F4327BAEB6041 /* SpectralTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 483EE1FA50E143D0AF6DA90A /* SpectralTestApp.cpp */; }; - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00692BCF14FF149000D0A05E /* SpectralTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpectralTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 111A61F01921D8FE005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61F11921D8FE005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A61F31921D917005C3166 /* tone440L220R.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = tone440L220R.mp3; path = ../../data/tone440L220R.mp3; sourceTree = ""; }; - 11B04270179C591E0034BEE2 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 23C6A72DF60244D5858DE553 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 483EE1FA50E143D0AF6DA90A /* SpectralTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = SpectralTestApp.cpp; path = ../src/SpectralTestApp.cpp; sourceTree = ""; }; - 91F7F295C48C4C49BFB9FAD7 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = "Default-568h@2x.png"; sourceTree = ""; }; - 93E00CB6635646CEAFC2541B /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - A288D0CECD4D4E9CA42E0CBB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00692BCC14FF149000D0A05E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 11B04271179C591E0034BEE2 /* Accelerate.framework in Frameworks */, - C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, - C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, - C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, - DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, - 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, - 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, - C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, - C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, - 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00692BC414FF149000D0A05E = { - isa = PBXGroup; - children = ( - 99692BD914FF149000D0A05F /* Headers */, - 00692BD914FF149000D0A05E /* Source */, - 00692BD914FF149000D0FFFF /* Resources */, - 00692BD214FF149000D0A05E /* Frameworks */, - 00692BD014FF149000D0A05E /* Products */, - ); - sourceTree = ""; - }; - 00692BD014FF149000D0A05E /* Products */ = { - isa = PBXGroup; - children = ( - 00692BCF14FF149000D0A05E /* SpectralTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 00692BD214FF149000D0A05E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 11B04270179C591E0034BEE2 /* Accelerate.framework */, - C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, - C727C02B121B400300192073 /* CoreMedia.framework */, - C727C02D121B400300192073 /* CoreVideo.framework */, - 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, - 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, - 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, - DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, - C725E000121DAC8F00FA186B /* AVFoundation.framework */, - 0087D25412CD809F002CD69F /* CoreText.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 00692BD914FF149000D0A05E /* Source */ = { - isa = PBXGroup; - children = ( - 483EE1FA50E143D0AF6DA90A /* SpectralTestApp.cpp */, - 111A61F01921D8FE005C3166 /* AudioDrawUtils.cpp */, - 111A61F11921D8FE005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 00692BD914FF149000D0FFFF /* Resources */ = { - isa = PBXGroup; - children = ( - 111A61F31921D917005C3166 /* tone440L220R.mp3 */, - 91F7F295C48C4C49BFB9FAD7 /* Default-568h@2x.png */, - A288D0CECD4D4E9CA42E0CBB /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 99692BD914FF149000D0A05F /* Headers */ = { - isa = PBXGroup; - children = ( - 93E00CB6635646CEAFC2541B /* Resources.h */, - 23C6A72DF60244D5858DE553 /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00692BCE14FF149000D0A05E /* SpectralTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "SpectralTest" */; - buildPhases = ( - 00692BCB14FF149000D0A05E /* Sources */, - 00692BCC14FF149000D0A05E /* Frameworks */, - 00692BCD14FF149000D0A05E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SpectralTest; - productName = SpectralTest; - productReference = 00692BCF14FF149000D0A05E /* SpectralTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 00692BC614FF149000D0A05E /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "SpectralTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 00692BC414FF149000D0A05E; - productRefGroup = 00692BD014FF149000D0A05E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 00692BCE14FF149000D0A05E /* SpectralTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00692BCD14FF149000D0A05E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61F41921D917005C3166 /* tone440L220R.mp3 in Resources */, - 0995D5CB69704862B46EAF1B /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00692BCB14FF149000D0A05E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61F21921D8FE005C3166 /* AudioDrawUtils.cpp in Sources */, - CEB251843F2F4327BAEB6041 /* SpectralTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 00692BF314FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Rich Eakin (27THF82Y5P)"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - }; - name = Debug; - }; - 00692BF414FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include \"../../../src\""; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 00692BF614FF149000D0A05E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 00692BF714FF149000D0A05E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - INFOPLIST_FILE = Info.plist; - "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = ( - "\"$(CINDER_PATH)/lib/ios-sim/$(CONFIGURATION)/libcinder.a\"", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "SpectralTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF314FF149000D0A05E /* Debug */, - 00692BF414FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "SpectralTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00692BF614FF149000D0A05E /* Debug */, - 00692BF714FF149000D0A05E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 00692BC614FF149000D0A05E /* Project object */; -} diff --git a/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest-ios.xcscheme b/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest-ios.xcscheme deleted file mode 100644 index fb24b19a19..0000000000 --- a/test/_audio/SpectralTest/xcode_ios/SpectralTest.xcodeproj/xcshareddata/xcschemes/SpectralTest-ios.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/StressTest/src/StressTestApp.cpp b/test/_audio/StressTest/src/StressTestApp.cpp deleted file mode 100644 index 455eddfb82..0000000000 --- a/test/_audio/StressTest/src/StressTestApp.cpp +++ /dev/null @@ -1,316 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/Rand.h" -#include "cinder/CinderAssert.h" -#include "cinder/Log.h" - -#include "cinder/audio/GenNode.h" -#include "cinder/audio/GainNode.h" -#include "cinder/audio/MonitorNode.h" - -#include "cinder/audio/Utilities.h" - -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -// FIXME: type switching should clear the cached wavetable - -using namespace ci; -using namespace ci::app; -using namespace std; - -enum GenType { SINE, TRIANGLE, OSC_SINE, OSC_SAW, OSC_SQUARE, OSC_TRIANGLE }; - -class StressTestApp : public App { -public: - void setup() override; - void draw() override; - void keyDown( KeyEvent event ) override; - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - void addGens(); - void removeGens(); - void clearGens(); - - audio::GenNodeRef makeSelectedGenType(); - audio::GenNodeRef makeOsc( audio::WaveformType type ); - - audio::GainNodeRef mGain; - audio::MonitorSpectralNodeRef mMonitor; - audio::WaveTable2dRef mWaveTable; - vector mGenBank; - - vector mWidgets; - Button mPlayButton, mAddGens, mRemoveGens, mClearGens; - VSelector mTestSelector; - HSlider mGainSlider; - TextInput mAddIncrInput; - SpectrumPlot mSpectrumPlot; - - bool mEnableDrawing; - size_t mAddIncr; - GenType mSelectedGenType; -}; - -void StressTestApp::setup() -{ - mAddIncr = 1; - mEnableDrawing = true; - mSelectedGenType = OSC_SQUARE; - - auto ctx = audio::master(); - mGain = ctx->makeNode( new audio::GainNode ); - mGain->setValue( 0.1f ); - - mMonitor = audio::master()->makeNode( new audio::MonitorSpectralNode( audio::MonitorSpectralNode::Format().fftSize( 1024 ).windowSize( 2048 ) ) ); - mMonitor->setSmoothingFactor( 0.4 ); - - mGain >> mMonitor >> ctx->getOutput(); - - addGens(); - - setupUI(); - -} - -void StressTestApp::addGens() -{ - auto ctx = audio::master(); - - for( size_t i = 0; i < mAddIncr; i++ ) { - auto gen = makeSelectedGenType(); - gen->setFreq( audio::midiToFreq( randInt( 40, 60 ) ) ); - - gen->connect( mGain ); - gen->enable(); - - mGenBank.push_back( gen ); - } - - PRINT_GRAPH( ctx ); - CI_LOG_V( "gen count: " << mGenBank.size() ); -} - -void StressTestApp::removeGens() -{ - for( size_t i = 0; i < mAddIncr; i++ ) { - mGenBank.back()->disconnectAll(); - mGenBank.pop_back(); - } - - PRINT_GRAPH( audio::master() ); - CI_LOG_V( "gen count: " << mGenBank.size() ); -} - -void StressTestApp::clearGens() -{ - while( ! mGenBank.empty() ) { - mGenBank.back()->disconnectAll(); - mGenBank.pop_back(); - } - - PRINT_GRAPH( audio::master() ); - CI_LOG_V( "gen count: " << mGenBank.size() ); -} - -audio::GenNodeRef StressTestApp::makeSelectedGenType() -{ - switch( mSelectedGenType ) { - case SINE: return audio::master()->makeNode( new audio::GenSineNode ); - case TRIANGLE: return audio::master()->makeNode( new audio::GenTriangleNode ); - case OSC_SINE: return makeOsc( audio::WaveformType::SINE ); - case OSC_SAW: return makeOsc( audio::WaveformType::SAWTOOTH ); - case OSC_SQUARE: return makeOsc( audio::WaveformType::SQUARE ); - case OSC_TRIANGLE: return makeOsc( audio::WaveformType::TRIANGLE ); - - default: CI_ASSERT_NOT_REACHABLE(); - } - - return audio::GenNodeRef(); -} - -audio::GenNodeRef StressTestApp::makeOsc( audio::WaveformType type ) -{ - auto ctx = audio::master(); - auto result = ctx->makeNode( new audio::GenOscNode( type ) ); - - if( mWaveTable ) - result->setWaveTable( mWaveTable ); - else { - ctx->initializeNode( result ); - - mWaveTable = result->getWaveTable(); - } - - return result; -} - -void StressTestApp::setupUI() -{ - - Rectf buttonRect( (float)getWindowWidth() - 200, 10, (float)getWindowWidth(), 60 ); - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = buttonRect; - mWidgets.push_back( &mPlayButton ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mAddGens = Button( false, "add gens" ); - mAddGens.mBounds = buttonRect; - mWidgets.push_back( &mAddGens ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mRemoveGens = Button( false, "remove gens" ); - mRemoveGens.mBounds = buttonRect; - mWidgets.push_back( &mRemoveGens ); - - buttonRect += vec2( 0, buttonRect.getHeight() + 10 ); - mClearGens = Button( false, "clear gens" ); - mClearGens.mBounds = buttonRect; - mWidgets.push_back( &mClearGens ); - - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "triangle" ); - mTestSelector.mSegments.push_back( "osc sine" ); - mTestSelector.mSegments.push_back( "osc sawtooth" ); - mTestSelector.mSegments.push_back( "osc square" ); - mTestSelector.mSegments.push_back( "osc triangle" ); - mTestSelector.mBounds = Rectf( (float)getWindowWidth() - 200, buttonRect.y2 + 10, (float)getWindowWidth(), buttonRect.y2 + 190 ); - mWidgets.push_back( &mTestSelector ); - - Rectf sliderRect = mTestSelector.mBounds; - sliderRect.y1 = sliderRect.y2 + 10; - sliderRect.y2 = sliderRect.y1 + 30; - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "gain"; - mGainSlider.mMax = 1; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + 30 ); - mAddIncrInput.mBounds = sliderRect; - mAddIncrInput.mFormat = TextInput::Format::NUMERICAL; - mAddIncrInput.mTitle = "add incr"; - mAddIncrInput.setValue( mAddIncr ); - mWidgets.push_back( &mAddIncrInput ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - mSpectrumPlot.setBorderColor( ColorA( 0, 0.9f, 0, 1 ) ); - - gl::enableAlphaBlending(); -} - -void StressTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.03f ); - -} - -void StressTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mAddGens.hitTest( pos ) ) - addGens(); - else if( mRemoveGens.hitTest( pos ) ) - removeGens(); - else if( mClearGens.hitTest( pos ) ) - clearGens(); - else if( mAddIncrInput.hitTest( pos ) ) { - } - else if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "sine" ) - mSelectedGenType = SINE; - else if( currentTest == "triangle" ) - mSelectedGenType = TRIANGLE; - else if( currentTest == "osc sine" ) { - mSelectedGenType = OSC_SINE; - mWaveTable.reset(); - } - else if( currentTest == "osc sawtooth" ) { - mSelectedGenType = OSC_SAW; - mWaveTable.reset(); - } - else if( currentTest == "osc square" ) { - mSelectedGenType = OSC_SQUARE; - mWaveTable.reset(); - } - else if( currentTest == "osc triangle" ) { - mSelectedGenType = OSC_TRIANGLE; - mWaveTable.reset(); - } - } - else - processDrag( pos ); -} - -void StressTestApp::keyDown( KeyEvent event ) -{ - TextInput *currentSelected = TextInput::getCurrentSelected(); - if( currentSelected ) { - if( event.getCode() == KeyEvent::KEY_RETURN ) { - if( currentSelected == &mAddIncrInput ) { - mAddIncr = currentSelected->getValue(); - CI_LOG_V( "add incriment: " << mAddIncr ); - } - TextInput::disableAll(); - } - else { - if( event.getCode() == KeyEvent::KEY_BACKSPACE ) - currentSelected->processBackspace(); - else - currentSelected->processChar( event.getChar() ); - } - - } - else { - if( event.getChar() == 'g' ) - mEnableDrawing = ! mEnableDrawing; - else if( event.getChar() == 'a' ) - addGens(); - } -} - -void StressTestApp::draw() -{ - gl::clear(); - - if( ! mEnableDrawing ) - return; - - const float padding = 10; - const float scopeHeight = ( getWindowHeight() - padding * 3 ) / 2; - - Rectf rect( padding, padding, getWindowWidth() - padding - 200, scopeHeight + padding ); - - drawAudioBuffer( mMonitor->getBuffer(), rect, true ); - - rect += vec2( 0, scopeHeight + padding ); - mSpectrumPlot.setBounds( rect ); - mSpectrumPlot.draw( mMonitor->getMagSpectrum() ); - - drawWidgets( mWidgets ); - - string countStr = string( "Gen count: " ) + to_string( mGenBank.size() ); - getTestWidgetTexFont()->drawString( countStr, vec2( mAddIncrInput.mBounds.x1, mAddIncrInput.mBounds.y2 + padding + getTestWidgetTexFont()->getFont().getAscent() + getTestWidgetTexFont()->getFont().getDescent() ) ); -} - -CINDER_APP( StressTestApp, RendererGl, []( App::Settings *settings ) { - settings->setWindowSize( 1000, 600 ); -} ) diff --git a/test/_audio/StressTest/vc2015/StressTest.sln b/test/_audio/StressTest/vc2015/StressTest.sln deleted file mode 100644 index 97c33d21cc..0000000000 --- a/test/_audio/StressTest/vc2015/StressTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StressTest", "StressTest.vcxproj", "{1620909D-C0A6-4C43-BB27-1AA36859A81E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug|Win32.ActiveCfg = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Debug|Win32.Build.0 = Debug|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release|Win32.ActiveCfg = Release|Win32 - {1620909D-C0A6-4C43-BB27-1AA36859A81E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/StressTest/vc2015/StressTest.vcxproj b/test/_audio/StressTest/vc2015/StressTest.vcxproj deleted file mode 100644 index 353f8ae21f..0000000000 --- a/test/_audio/StressTest/vc2015/StressTest.vcxproj +++ /dev/null @@ -1,223 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1620909D-C0A6-4C43-BB27-1AA36859A81E} - StressTest - Win32Proj - StressTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - Unicode - v140 - - - Application - true - Unicode - v120 - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/StressTest/vc2015/StressTest.vcxproj.filters b/test/_audio/StressTest/vc2015/StressTest.vcxproj.filters deleted file mode 100644 index d28e69982c..0000000000 --- a/test/_audio/StressTest/vc2015/StressTest.vcxproj.filters +++ /dev/null @@ -1,39 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Header Files - - - Source Files - - - Source Files - - - - - Header Files - - - Source Files - - - \ No newline at end of file diff --git a/test/_audio/StressTest/xcode/Info.plist b/test/_audio/StressTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/StressTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/StressTest/xcode/Prefix.pch b/test/_audio/StressTest/xcode/Prefix.pch deleted file mode 100644 index 29200b4b0c..0000000000 --- a/test/_audio/StressTest/xcode/Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) -// #include "cinder/Cinder.h" -// -// #include "cinder/app/App.h" -// -// #include "cinder/gl/gl.h" -// -// #include "cinder/CinderMath.h" -// #include "cinder/Matrix.h" -// #include "cinder/Vector.h" -// #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/StressTest/xcode/StressTest.xcodeproj/project.pbxproj b/test/_audio/StressTest/xcode/StressTest.xcodeproj/project.pbxproj deleted file mode 100644 index 9b614728c9..0000000000 --- a/test/_audio/StressTest/xcode/StressTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,419 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A61501921CF33005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A614E1921CF33005C3166 /* AudioDrawUtils.cpp */; }; - 111A629D192DCC090024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A6296192DCBF60024BE66 /* libcinder_d.a */; }; - 1120DAB219B63DE900522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB019B63DE900522276 /* AVFoundation.framework */; }; - 1120DAB319B63DE900522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB119B63DE900522276 /* CoreMedia.framework */; }; - 119C4EEF1B23A37D006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EEE1B23A37D006563C5 /* IOKit.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - FE6541737CFA406192BDC3E9 /* StressTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29ACADC4C05419E8F9B2D3D /* StressTestApp.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A6295192DCBF60024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A628F192DCBF60024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A6297192DCBF60024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A628F192DCBF60024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A6299192DCBF60024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A628F192DCBF60024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A629B192DCC000024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A628F192DCBF60024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A614E1921CF33005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A614F1921CF33005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A628F192DCBF60024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAB019B63DE900522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAB119B63DE900522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EEE1B23A37D006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 119CCEEA184A716B00853BEE /* AudioTestGui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioTestGui.h; path = ../../common/AudioTestGui.h; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 3D080E4252C34004B9ED31F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* StressTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StressTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; - B29ACADC4C05419E8F9B2D3D /* StressTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = StressTestApp.cpp; path = ../src/StressTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EEF1B23A37D006563C5 /* IOKit.framework in Frameworks */, - 111A629D192DCC090024BE66 /* libcinder_d.a in Frameworks */, - 1120DAB219B63DE900522276 /* AVFoundation.framework in Frameworks */, - 1120DAB319B63DE900522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - B29ACADC4C05419E8F9B2D3D /* StressTestApp.cpp */, - 119CCEEA184A716B00853BEE /* AudioTestGui.h */, - 111A614E1921CF33005C3166 /* AudioDrawUtils.cpp */, - 111A614F1921CF33005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A6290192DCBF60024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A6296192DCBF60024BE66 /* libcinder_d.a */, - 111A6298192DCBF60024BE66 /* libcinder-iphone_d.a */, - 111A629A192DCBF60024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* StressTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* StressTest */ = { - isa = PBXGroup; - children = ( - 111A628F192DCBF60024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = StressTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 3D080E4252C34004B9ED31F4 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EEE1B23A37D006563C5 /* IOKit.framework */, - 1120DAB019B63DE900522276 /* AVFoundation.framework */, - 1120DAB119B63DE900522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* StressTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "StressTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A629C192DCC000024BE66 /* PBXTargetDependency */, - ); - name = StressTest; - productInstallPath = "$(HOME)/Applications"; - productName = StressTest; - productReference = 8D1107320486CEB800E47090 /* StressTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "StressTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* StressTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A6290192DCBF60024BE66 /* Products */; - ProjectRef = 111A628F192DCBF60024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* StressTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A6296192DCBF60024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A6295192DCBF60024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A6298192DCBF60024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A6297192DCBF60024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A629A192DCBF60024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A6299192DCBF60024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61501921CF33005C3166 /* AudioDrawUtils.cpp in Sources */, - FE6541737CFA406192BDC3E9 /* StressTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A629C192DCC000024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A629B192DCC000024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = StressTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = StressTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "StressTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "StressTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/StressTest/xcode/StressTest.xcodeproj/xcshareddata/xcschemes/StressTest.xcscheme b/test/_audio/StressTest/xcode/StressTest.xcodeproj/xcshareddata/xcschemes/StressTest.xcscheme deleted file mode 100644 index 8c89780530..0000000000 --- a/test/_audio/StressTest/xcode/StressTest.xcodeproj/xcshareddata/xcschemes/StressTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/VoiceTest/include/Resources.h b/test/_audio/VoiceTest/include/Resources.h deleted file mode 100644 index 7671deec18..0000000000 --- a/test/_audio/VoiceTest/include/Resources.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "cinder/CinderResources.h" - -#define RES_DRAIN_OGG CINDER_RESOURCE( ../../../../samples/data/sound/, DrainMagic.ogg, 128, SOUND ) -#define RES_TONE_440L220R CINDER_RESOURCE( ../../data/, tone440L220R.wav, 129, SOUND ) diff --git a/test/_audio/VoiceTest/src/VoiceTestApp.cpp b/test/_audio/VoiceTest/src/VoiceTestApp.cpp deleted file mode 100644 index b596b9b5de..0000000000 --- a/test/_audio/VoiceTest/src/VoiceTestApp.cpp +++ /dev/null @@ -1,186 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/CinderAssert.h" -#include "cinder/Log.h" - -#include "cinder/audio/Voice.h" -#include "cinder/audio/MonitorNode.h" - -#include "Resources.h" -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -#include "cinder/audio/Utilities.h" - -const float DEFAULT_VOLUME = 0.4f; - -using namespace ci; -using namespace ci::app; -using namespace std; - -class VoiceTestApp : public App { -public: - void setup() override; - void fileDrop( FileDropEvent event ) override; - void resize() override; - void draw() override; - - void setupBasic(); - void setupBasicStereo(); - void setupDifferentFile(); - void setupScope(); - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - audio::VoiceRef mVoice; - audio::MonitorNodeRef mMonitor; - - vector mWidgets; - Button mPlayButton, mEnableNoiseButton, mEnableSineButton; - VSelector mTestSelector; - HSlider mVolumeSlider; - - enum InputBus { SINE, NOISE }; -}; - -void VoiceTestApp::setup() -{ - mVolumeSlider.set( DEFAULT_VOLUME ); - - setupBasic(); - setupUI(); - - PRINT_GRAPH( audio::master() ); - CI_LOG_I( "complete. context samplerate: " << audio::master()->getSampleRate() ); -} - -void VoiceTestApp::fileDrop( FileDropEvent event ) -{ - const fs::path &filePath = event.getFile( 0 ); - CI_LOG_I( "File dropped: " << filePath ); - - mVoice = audio::Voice::create( audio::load( loadFile( filePath ) ) ); - mVoice->setVolume( mVolumeSlider.mValueScaled ); -} - -void VoiceTestApp::setupBasic() -{ - mVoice = audio::Voice::create( audio::load( loadResource( RES_DRAIN_OGG ) ) ); - mVoice->setVolume( mVolumeSlider.mValueScaled ); -} - -void VoiceTestApp::setupBasicStereo() -{ - mVoice = audio::Voice::create( audio::load( loadResource( RES_DRAIN_OGG ) ), audio::Voice::Options().channels( 2 ) ); - mVoice->setVolume( mVolumeSlider.mValueScaled ); -} - -void VoiceTestApp::setupDifferentFile() -{ - mVoice = audio::Voice::create( audio::load( loadResource( RES_TONE_440L220R ) ) ); - mVoice->setVolume( mVolumeSlider.mValueScaled ); - -} -void VoiceTestApp::setupScope() -{ - auto sourceFile = audio::load( loadResource( RES_DRAIN_OGG ) ); - mVoice = audio::Voice::create( sourceFile, audio::Voice::Options().connectToMaster( false ) ); - mVoice->setVolume( mVolumeSlider.mValueScaled ); - - auto ctx = audio::master(); - mMonitor = ctx->makeNode( new audio::MonitorNode ); - - mVoice->getOutputNode() >> mMonitor >> ctx->getOutput(); -} - -void VoiceTestApp::setupUI() -{ - mPlayButton = Button( false, "start" ); - mPlayButton.mBounds = Rectf( 0, 0, 200, 60 ); - mWidgets.push_back( &mPlayButton ); - - mTestSelector.mSegments.push_back( "basic" ); - mTestSelector.mSegments.push_back( "basic stereo" ); - mTestSelector.mSegments.push_back( "file 2" ); - mTestSelector.mSegments.push_back( "scope" ); - mWidgets.push_back( &mTestSelector ); - - mVolumeSlider.mTitle = "Volume"; - mVolumeSlider.mMax = 1; - mVolumeSlider.set( mVoice->getVolume() ); - mWidgets.push_back( &mVolumeSlider ); - -// mEnableSineButton.mIsToggle = true; -// mEnableSineButton.mTitleNormal = "sine disabled"; -// mEnableSineButton.mTitleEnabled = "sine enabled"; -// mEnableSineButton.mBounds = Rectf( 0, 70, 200, 120 ); -// mWidgets.push_back( &mEnableSineButton ); - - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void VoiceTestApp::processDrag( ivec2 pos ) -{ - if( mVolumeSlider.hitTest( pos ) ) - mVoice->setVolume( mVolumeSlider.mValueScaled ); -} - -void VoiceTestApp::processTap( ivec2 pos ) -{ - if( mPlayButton.hitTest( pos ) ) - mVoice->start(); - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "basic" ) - setupBasic(); - if( currentTest == "basic stereo" ) - setupBasicStereo(); - else if( currentTest == "scope" ) - setupScope(); - else if( currentTest == "file 2" ) - setupDifferentFile(); - - PRINT_GRAPH( audio::master() ); - } -} - -void VoiceTestApp::resize() -{ - mTestSelector.mBounds = Rectf( (float)getWindowWidth() * 0.6f, 0, (float)getWindowWidth(), (float)getWindowHeight() * 0.3f ); - - const float padding = 10; - const float sliderHeght = 50; - Rectf sliderRect( padding, getWindowHeight() - sliderHeght - padding, getWindowCenter().x, getWindowHeight() - padding ); - mVolumeSlider.mBounds = sliderRect; -} - -void VoiceTestApp::draw() -{ - gl::clear(); - - if( mMonitor && mMonitor->getNumConnectedInputs() ) { - vec2 padding( 20, 4 ); - - Rectf scopeRect( padding.x, padding.y, getWindowWidth() - padding.x, getWindowHeight() - padding.y ); - drawAudioBuffer( mMonitor->getBuffer(), scopeRect, true ); - } - - drawWidgets( mWidgets ); -} - -CINDER_APP( VoiceTestApp, RendererGl ) diff --git a/test/_audio/VoiceTest/vc2015/Resources.rc b/test/_audio/VoiceTest/vc2015/Resources.rc deleted file mode 100644 index 4988aa83e3..0000000000 --- a/test/_audio/VoiceTest/vc2015/Resources.rc +++ /dev/null @@ -1,4 +0,0 @@ -#include "../include/Resources.h" - -RES_DRAIN_OGG -RES_TONE_440L220R diff --git a/test/_audio/VoiceTest/vc2015/VoiceTest.sln b/test/_audio/VoiceTest/vc2015/VoiceTest.sln deleted file mode 100644 index c83fb8d005..0000000000 --- a/test/_audio/VoiceTest/vc2015/VoiceTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceTest", "VoiceTest.vcxproj", "{98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug|Win32.ActiveCfg = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Debug|Win32.Build.0 = Debug|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release|Win32.ActiveCfg = Release|Win32 - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj b/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj deleted file mode 100644 index 5e6067b842..0000000000 --- a/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj +++ /dev/null @@ -1,226 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {98CAE2B2-EEA1-40AF-9A94-9EAC23268D25} - VoiceTest - Win32Proj - VoiceTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - Unicode - v140 - - - Application - true - Unicode - v120 - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - - Disabled - ..\include;..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\include;..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\include;..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - false - - MachineX86 - - - - - ..\include;..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - $(CINDER_PATH)\include;..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj.filters b/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj.filters deleted file mode 100644 index c7fa5c9ed6..0000000000 --- a/test/_audio/VoiceTest/vc2015/VoiceTest.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Header Files - - - Source Files - - - Source Files - - - - - Header Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/test/_audio/VoiceTest/xcode/Info.plist b/test/_audio/VoiceTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/VoiceTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/VoiceTest/xcode/Prefix.pch b/test/_audio/VoiceTest/xcode/Prefix.pch deleted file mode 100644 index 226b4a63fc..0000000000 --- a/test/_audio/VoiceTest/xcode/Prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#if defined( __cplusplus ) - #include "cinder/Cinder.h" - - #include "cinder/app/App.h" - - #include "cinder/gl/gl.h" - - #include "cinder/CinderMath.h" - #include "cinder/Matrix.h" - #include "cinder/Vector.h" - #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/project.pbxproj b/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/project.pbxproj deleted file mode 100644 index e9d97eef7f..0000000000 --- a/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,431 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A61611921CF71005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A615F1921CF71005C3166 /* AudioDrawUtils.cpp */; }; - 111A61631921CFB8005C3166 /* tone440L220R.wav in Resources */ = {isa = PBXBuildFile; fileRef = 111A61621921CFB8005C3166 /* tone440L220R.wav */; }; - 111A61651921CFDC005C3166 /* DrainMagic.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 111A61641921CFDC005C3166 /* DrainMagic.ogg */; }; - 111A62AC192DCCBB0024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A62A5192DCCAF0024BE66 /* libcinder_d.a */; }; - 1120DAB619B63DFA00522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB419B63DFA00522276 /* AVFoundation.framework */; }; - 1120DAB719B63DFA00522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB519B63DFA00522276 /* CoreMedia.framework */; }; - 119C4EF31B23A384006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EF21B23A384006563C5 /* IOKit.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - FE6541737CFA406192BDC3E9 /* VoiceTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29ACADC4C05419E8F9B2D3D /* VoiceTestApp.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A62A4192DCCAF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A62A6192DCCAF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A62A8192DCCAF0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A62AA192DCCB50024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A615F1921CF71005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61601921CF71005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A61621921CFB8005C3166 /* tone440L220R.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = tone440L220R.wav; path = ../../data/tone440L220R.wav; sourceTree = ""; }; - 111A61641921CFDC005C3166 /* DrainMagic.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; name = DrainMagic.ogg; path = ../../../../samples/data/sound/DrainMagic.ogg; sourceTree = ""; }; - 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAB419B63DFA00522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAB519B63DFA00522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EF21B23A384006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 119CCEEA184A716B00853BEE /* AudioTestGui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioTestGui.h; path = ../../common/AudioTestGui.h; sourceTree = ""; }; - 128572BBFD5C4118B6B34756 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 3D080E4252C34004B9ED31F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* VoiceTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VoiceTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; - B29ACADC4C05419E8F9B2D3D /* VoiceTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = VoiceTestApp.cpp; path = ../src/VoiceTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EF31B23A384006563C5 /* IOKit.framework in Frameworks */, - 111A62AC192DCCBB0024BE66 /* libcinder_d.a in Frameworks */, - 1120DAB619B63DFA00522276 /* AVFoundation.framework in Frameworks */, - 1120DAB719B63DFA00522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - B29ACADC4C05419E8F9B2D3D /* VoiceTestApp.cpp */, - 119CCEEA184A716B00853BEE /* AudioTestGui.h */, - 111A615F1921CF71005C3166 /* AudioDrawUtils.cpp */, - 111A61601921CF71005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A629F192DCCAF0024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A62A5192DCCAF0024BE66 /* libcinder_d.a */, - 111A62A7192DCCAF0024BE66 /* libcinder-iphone_d.a */, - 111A62A9192DCCAF0024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* VoiceTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* VoiceTest */ = { - isa = PBXGroup; - children = ( - 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = VoiceTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - 128572BBFD5C4118B6B34756 /* Resources.h */, - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 111A61641921CFDC005C3166 /* DrainMagic.ogg */, - 111A61621921CFB8005C3166 /* tone440L220R.wav */, - 3D080E4252C34004B9ED31F4 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EF21B23A384006563C5 /* IOKit.framework */, - 1120DAB419B63DFA00522276 /* AVFoundation.framework */, - 1120DAB519B63DFA00522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* VoiceTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "VoiceTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A62AB192DCCB50024BE66 /* PBXTargetDependency */, - ); - name = VoiceTest; - productInstallPath = "$(HOME)/Applications"; - productName = VoiceTest; - productReference = 8D1107320486CEB800E47090 /* VoiceTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "VoiceTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* VoiceTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A629F192DCCAF0024BE66 /* Products */; - ProjectRef = 111A629E192DCCAF0024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* VoiceTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A62A5192DCCAF0024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A62A4192DCCAF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A62A7192DCCAF0024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A62A6192DCCAF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A62A9192DCCAF0024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A62A8192DCCAF0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61651921CFDC005C3166 /* DrainMagic.ogg in Resources */, - 111A61631921CFB8005C3166 /* tone440L220R.wav in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61611921CF71005C3166 /* AudioDrawUtils.cpp in Sources */, - FE6541737CFA406192BDC3E9 /* VoiceTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A62AB192DCCB50024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A62AA192DCCB50024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/$(CONFIGURATION)/libcinder.a\""; - PRODUCT_NAME = VoiceTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/$(CONFIGURATION)/libcinder.a\""; - PRODUCT_NAME = VoiceTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "VoiceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "VoiceTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/xcshareddata/xcschemes/VoiceTest.xcscheme b/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/xcshareddata/xcschemes/VoiceTest.xcscheme deleted file mode 100644 index e5be642f72..0000000000 --- a/test/_audio/VoiceTest/xcode/VoiceTest.xcodeproj/xcshareddata/xcschemes/VoiceTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/_audio/WaveTableTest/src/WaveTableTestApp.cpp b/test/_audio/WaveTableTest/src/WaveTableTestApp.cpp deleted file mode 100644 index a0b8122efb..0000000000 --- a/test/_audio/WaveTableTest/src/WaveTableTestApp.cpp +++ /dev/null @@ -1,335 +0,0 @@ -#include "cinder/app/App.h" -#include "cinder/app/RendererGl.h" -#include "cinder/CinderAssert.h" -#include "cinder/Log.h" - -#include "cinder/audio/GenNode.h" -#include "cinder/audio/GainNode.h" -#include "cinder/audio/MonitorNode.h" - -#include "cinder/audio/Utilities.h" - -#include "../../common/AudioTestGui.h" -#include "../../../../samples/_audio/common/AudioDrawUtils.h" - -using namespace ci; -using namespace ci::app; -using namespace std; - - -class WaveTableTestApp : public App { -public: - void setup() override; - void update() override; - void draw() override; - void keyDown( KeyEvent event ) override; - - void setupUI(); - void processDrag( ivec2 pos ); - void processTap( ivec2 pos ); - - void setupTable(); - void setupOsc( audio::WaveformType type ); - void setupPulse(); - void setupTriangleCalc(); - - audio::GainNodeRef mGain; - audio::MonitorSpectralNodeRef mMonitor; - audio::GenOscNodeRef mGenOsc; - audio::GenPulseNodeRef mGenPulse; - audio::GenNodeRef mGen; - - audio::BufferDynamic mTableCopy; - - vector mWidgets; - Button mPlayButton; - VSelector mTestSelector; - HSlider mGainSlider, mFreqSlider, mFreqRampSlider, mPulseWidthSlider; - TextInput mNumPartialsInput, mTableSizeInput; - SpectrumPlot mSpectrumPlot; - -}; - -void WaveTableTestApp::setup() -{ - auto ctx = audio::master(); - mGain = ctx->makeNode( new audio::GainNode ); - mGain->setValue( 0.075f ); - - mMonitor = audio::master()->makeNode( new audio::MonitorSpectralNode( audio::MonitorSpectralNode::Format().fftSize( 1024 ).windowSize( 2048 ) ) ); - mMonitor->setSmoothingFactor( 0 ); - - mFreqSlider.set( 100 ); - - setupOsc( audio::WaveformType::SINE ); -// setupTable(); -// setupPulse(); - - mGen >> mMonitor >> mGain >> ctx->getOutput(); - - PRINT_GRAPH( ctx ); - - setupUI(); -} - -void WaveTableTestApp::setupTable() -{ - auto ctx = audio::master(); - - auto gen = ctx->makeNode( new audio::GenTableNode ); - gen->setFreq( mFreqSlider.mValueScaled ); - gen->enable(); - - mGen = gen; -} - -void WaveTableTestApp::setupOsc( audio::WaveformType type ) -{ - auto ctx = audio::master(); - - mGenOsc = ctx->makeNode( new audio::GenOscNode( type ) ); - mGenOsc->setFreq( mFreqSlider.mValueScaled ); - mGenOsc->enable(); - - mGen = mGenOsc; -} - -void WaveTableTestApp::setupPulse() -{ - if( ! mGenPulse ) { - mGenPulse = audio::master()->makeNode( new audio::GenPulseNode ); - mGenPulse->setFreq( mFreqSlider.mValueScaled ); - mGenPulse->enable(); - } - - if( mGenOsc ) - mGenOsc->disconnectAll(); - - mGenPulse >> mMonitor; - mGen = mGenPulse; - -#if 1 - // pwm - auto mod = audio::master()->makeNode( new audio::GenTableNode ); - - audio::master()->initializeNode( mod ); - - vector table( mod->getWaveTable()->getTableSize() ); - - mod->getWaveTable()->copyTo( table.data() ); - - // scale to [0.05 : 0.95] - audio::dsp::mul( table.data(), 0.45f, table.data(), table.size() ); - audio::dsp::add( table.data(), 0.5f, table.data(), table.size() ); - -// mTableCopy.setNumFrames( table.size() ); -// memmove( mTableCopy.getData(), table.data(), table.size() * sizeof( float ) ); - - mod->getWaveTable()->copyFrom( table.data() ); - mod->setFreq( 0.6f ); - mod->enable(); - - mGenPulse->getParamWidth()->setProcessor( mod ); -#endif - - PRINT_GRAPH( audio::master() ); -} - -// for comparison with GenOscNode's triangle spectra -void WaveTableTestApp::setupTriangleCalc() -{ - auto ctx = audio::master(); - - auto gen = ctx->makeNode( new audio::GenTriangleNode ); - gen->setFreq( mFreqSlider.mValueScaled ); - gen->enable(); - - mGen = gen; -} - -void WaveTableTestApp::setupUI() -{ - Rectf buttonRect( (float)getWindowWidth() - 200, 10, (float)getWindowWidth(), 60 ); - mPlayButton = Button( true, "stopped", "playing" ); - mPlayButton.mBounds = buttonRect; - mWidgets.push_back( &mPlayButton ); - - mTestSelector.mSegments.push_back( "sine" ); - mTestSelector.mSegments.push_back( "square" ); - mTestSelector.mSegments.push_back( "sawtooth" ); - mTestSelector.mSegments.push_back( "triangle" ); - mTestSelector.mSegments.push_back( "pulse" ); - mTestSelector.mSegments.push_back( "sine (table)" ); - mTestSelector.mSegments.push_back( "triangle (calc)" ); - mTestSelector.mBounds = Rectf( (float)getWindowWidth() - 200, buttonRect.y2 + 10, (float)getWindowWidth(), buttonRect.y2 + 190 ); - mWidgets.push_back( &mTestSelector ); - - // freq slider is longer, along top - mFreqSlider.mBounds = Rectf( 10, 10, getWindowWidth() - 210, 40 ); - mFreqSlider.mTitle = "freq"; - mFreqSlider.mMin = -220; - mFreqSlider.mMax = 5000; - - mFreqSlider.set( mGen->getFreq() ); - mWidgets.push_back( &mFreqSlider ); - - Rectf sliderRect = mTestSelector.mBounds; - sliderRect.y1 = sliderRect.y2 + 10; - sliderRect.y2 = sliderRect.y1 + 30; - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "gain"; - mGainSlider.mMax = 1; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + 10 ); - mFreqRampSlider.mBounds = sliderRect; - mFreqRampSlider.mTitle = "freq ramp"; - mFreqRampSlider.mMin = -5; - mFreqRampSlider.mMax = 10; - mFreqRampSlider.set( 0.2f ); - mWidgets.push_back( &mFreqRampSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + 10 ); - mPulseWidthSlider.mBounds = sliderRect; - mPulseWidthSlider.mTitle = "pulse width"; - mPulseWidthSlider.set( 0.05f ); - mWidgets.push_back( &mPulseWidthSlider ); - - - sliderRect += vec2( 0, sliderRect.getHeight() + 30 ); - mNumPartialsInput.mBounds = sliderRect; - mNumPartialsInput.mTitle = "num partials"; - mWidgets.push_back( &mNumPartialsInput ); - - sliderRect += vec2( 0, sliderRect.getHeight() + 30 ); - mTableSizeInput.mBounds = sliderRect; - mTableSizeInput.mTitle = "table size"; - mTableSizeInput.setValue( mGenOsc ? mGenOsc->getTableSize() : 0 ); - mWidgets.push_back( &mTableSizeInput ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - mSpectrumPlot.setBorderColor( ColorA( 0, 0.9f, 0, 1 ) ); - - gl::enableAlphaBlending(); -} - -void WaveTableTestApp::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->getParam()->applyRamp( mGainSlider.mValueScaled, 0.03f ); - else if( mFreqSlider.hitTest( pos ) ) - mGen->getParamFreq()->applyRamp( mFreqSlider.mValueScaled, mFreqRampSlider.mValueScaled ); - else if( mFreqRampSlider.hitTest( pos ) ) { - } - else if( mGenPulse && mPulseWidthSlider.hitTest( pos ) ) { -// mGenPulse->setWidth( mPulseWidthSlider.mValueScaled ); - mGenPulse->getParamWidth()->applyRamp( mPulseWidthSlider.mValueScaled, 0.5f ); - } - -} - -void WaveTableTestApp::processTap( ivec2 pos ) -{ - auto ctx = audio::master(); - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - - if( mPlayButton.hitTest( pos ) ) - ctx->setEnabled( ! ctx->isEnabled() ); - else if( mNumPartialsInput.hitTest( pos ) ) { - } - else if( mTableSizeInput.hitTest( pos ) ) { - } - else if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - mMonitor->disconnectAllInputs(); - - if( currentTest == "sine" ) - setupOsc( audio::WaveformType::SINE ); - else if( currentTest == "square" ) - setupOsc( audio::WaveformType::SQUARE ); - else if( currentTest == "sawtooth" ) - setupOsc( audio::WaveformType::SAWTOOTH ); - else if( currentTest == "triangle" ) - setupOsc( audio::WaveformType::TRIANGLE ); - else if( currentTest == "pulse" ) - setupPulse(); - else if( currentTest == "sine (table)" ) - setupTable(); - else if( currentTest == "triangle (calc)" ) - setupTriangleCalc(); - - mGen >> mMonitor; - } - else - processDrag( pos ); -} - -void WaveTableTestApp::keyDown( KeyEvent event ) -{ - TextInput *currentSelected = TextInput::getCurrentSelected(); - if( ! currentSelected ) - return; - - if( event.getCode() == KeyEvent::KEY_RETURN ) { -// if( currentSelected == &mTableSizeInput ) { -// int tableSize = currentSelected->getValue(); -// CI_LOG_V( "updating table size from: " << mGen->getTableSize() << " to: " << tableSize ); -// mGen->setWaveform( mGen->getWaveForm(), tableSize ); -// mTableCopy.setNumFrames( tableSize ); -// mGen->copyFromTable( mTableCopy.getData() ); -// } - - } - else { - if( event.getCode() == KeyEvent::KEY_BACKSPACE ) - currentSelected->processBackspace(); - else - currentSelected->processChar( event.getChar() ); - } -} - -void WaveTableTestApp::update() -{ - if( mGenOsc ) { - mTableCopy.setNumFrames( mGenOsc->getTableSize() ); - mGenOsc->getWaveTable()->copyTo( mTableCopy.getData(), mGenOsc->getWaveTable()->calcBandlimitedTableIndex( mGenOsc->getFreq() ) ); - } - if( mGenPulse ) - mPulseWidthSlider.set( mGenPulse->getWidth() ); - - mFreqSlider.set( mGen->getFreq() ); -} - -void WaveTableTestApp::draw() -{ - gl::clear(); - - const float padding = 10; - const float scopeHeight = ( getWindowHeight() - padding * 4 - mFreqSlider.mBounds.y2 ) / 3; - - Rectf rect( padding, padding + mFreqSlider.mBounds.y2, getWindowWidth() - padding - 200, mFreqSlider.mBounds.y2 + scopeHeight + padding ); - drawAudioBuffer( mTableCopy, rect, true ); - - rect += vec2( 0, scopeHeight + padding ); - drawAudioBuffer( mMonitor->getBuffer(), rect, true ); - - rect += vec2( 0, scopeHeight + padding ); - mSpectrumPlot.setBounds( rect ); - mSpectrumPlot.draw( mMonitor->getMagSpectrum() ); - - drawWidgets( mWidgets ); -} - -CINDER_APP( WaveTableTestApp, RendererGl, []( App::Settings *settings ) { - settings->setWindowSize( 1000, 800 ); -} ) diff --git a/test/_audio/WaveTableTest/vc2015/WaveTableTest.sln b/test/_audio/WaveTableTest/vc2015/WaveTableTest.sln deleted file mode 100644 index 4af132ea31..0000000000 --- a/test/_audio/WaveTableTest/vc2015/WaveTableTest.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WaveTableTest", "WaveTableTest.vcxproj", "{276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Debug|Win32.Build.0 = Debug|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release|Win32.ActiveCfg = Release|Win32 - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj b/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj deleted file mode 100644 index f93f4b0206..0000000000 --- a/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj +++ /dev/null @@ -1,223 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {276DA6AE-F82B-4757-9A51-9E1C9BCE12B2} - WaveTableTest - Win32Proj - WaveTableTest - - - - Application - false - v140 - Unicode - true - - - Application - false - v120 - Unicode - true - - - Application - true - Unicode - v140 - - - Application - true - Unicode - v120 - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - $(IncludePath) - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - Level3 - EditAndContinue - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - MachineX86 - LIBCMT;LIBCPMT - - - - - Disabled - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);_DEBUG;_WINDOW;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - true - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset)_d.lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - true - Windows - false - - - LIBCMT;LIBCPMT - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - false - - MachineX86 - - - - - ..\..\..\src;$(CINDER_PATH)\include;$(CINDER_PATH)\boost - WIN32;NOMINMAX;_WIN32_WINNT=$(AUDIO2_DEPLOYMENT_TARGET);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - true - - - true - - - "..\..\..\..\..\cinder-dev\include";..\include - - - cinder-$(PlatformToolset).lib;%(AdditionalDependencies) - ..\..\..\lib\msw;$(CINDER_PATH)\lib\msw\$(PlatformTarget);$(DXSDK_DIR)\Lib\x86 - false - true - Windows - true - - - false - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj.filters b/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj.filters deleted file mode 100644 index c2e18b41de..0000000000 --- a/test/_audio/WaveTableTest/vc2015/WaveTableTest.vcxproj.filters +++ /dev/null @@ -1,39 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Header Files - - - Source Files - - - Source Files - - - - - Header Files - - - Source Files - - - \ No newline at end of file diff --git a/test/_audio/WaveTableTest/xcode/Info.plist b/test/_audio/WaveTableTest/xcode/Info.plist deleted file mode 100644 index 76bfe73f68..0000000000 --- a/test/_audio/WaveTableTest/xcode/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - CinderApp.icns - CFBundleIdentifier - org.libcinder.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2013 __MyCompanyName__. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/test/_audio/WaveTableTest/xcode/Prefix.pch b/test/_audio/WaveTableTest/xcode/Prefix.pch deleted file mode 100644 index 29200b4b0c..0000000000 --- a/test/_audio/WaveTableTest/xcode/Prefix.pch +++ /dev/null @@ -1,13 +0,0 @@ - -#if defined( __cplusplus ) -// #include "cinder/Cinder.h" -// -// #include "cinder/app/App.h" -// -// #include "cinder/gl/gl.h" -// -// #include "cinder/CinderMath.h" -// #include "cinder/Matrix.h" -// #include "cinder/Vector.h" -// #include "cinder/Quaternion.h" -#endif diff --git a/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/project.pbxproj b/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/project.pbxproj deleted file mode 100644 index bb33ad0b85..0000000000 --- a/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,419 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; - 111A61761921D059005C3166 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 111A61741921D059005C3166 /* AudioDrawUtils.cpp */; }; - 111A62BB192DCD070024BE66 /* libcinder_d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 111A62B4192DCCFA0024BE66 /* libcinder_d.a */; }; - 1120DABA19B63E0B00522276 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB819B63E0B00522276 /* AVFoundation.framework */; }; - 1120DABB19B63E0B00522276 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1120DAB919B63E0B00522276 /* CoreMedia.framework */; }; - 119C4EF71B23A38E006563C5 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119C4EF61B23A38E006563C5 /* IOKit.framework */; }; - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - FE6541737CFA406192BDC3E9 /* WaveTableTestApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29ACADC4C05419E8F9B2D3D /* WaveTableTestApp.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 111A62B3192DCCFA0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = cinder; - }; - 111A62B5192DCCFA0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 007050BE1114F93F003FCAE4; - remoteInfo = cinder_iphone; - }; - 111A62B7192DCCFA0024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 00CFD9E11135C3520091E310; - remoteInfo = cinder_iphone_sim; - }; - 111A62B9192DCD010024BE66 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = cinder; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 111A61741921D059005C3166 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; - 111A61751921D059005C3166 /* AudioDrawUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioDrawUtils.h; path = ../../../../samples/_audio/common/AudioDrawUtils.h; sourceTree = ""; }; - 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cinder.xcodeproj; path = ../../../../xcode/cinder.xcodeproj; sourceTree = ""; }; - 1120DAB819B63E0B00522276 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 1120DAB919B63E0B00522276 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 119C4EF61B23A38E006563C5 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 119CCEEA184A716B00853BEE /* AudioTestGui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioTestGui.h; path = ../../common/AudioTestGui.h; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 3D080E4252C34004B9ED31F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* WaveTableTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WaveTableTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = Prefix.pch; sourceTree = ""; }; - B29ACADC4C05419E8F9B2D3D /* WaveTableTestApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = WaveTableTestApp.cpp; path = ../src/WaveTableTestApp.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 119C4EF71B23A38E006563C5 /* IOKit.framework in Frameworks */, - 111A62BB192DCD070024BE66 /* libcinder_d.a in Frameworks */, - 1120DABA19B63E0B00522276 /* AVFoundation.framework in Frameworks */, - 1120DABB19B63E0B00522276 /* CoreMedia.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, - 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, - 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, - 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, - 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, - 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, - 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Source */ = { - isa = PBXGroup; - children = ( - B29ACADC4C05419E8F9B2D3D /* WaveTableTestApp.cpp */, - 119CCEEA184A716B00853BEE /* AudioTestGui.h */, - 111A61741921D059005C3166 /* AudioDrawUtils.cpp */, - 111A61751921D059005C3166 /* AudioDrawUtils.h */, - ); - name = Source; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, - 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, - 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, - 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, - 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, - 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, - 0091D8F80E81B9330029341E /* OpenGL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 111A62AE192DCCFA0024BE66 /* Products */ = { - isa = PBXGroup; - children = ( - 111A62B4192DCCFA0024BE66 /* libcinder_d.a */, - 111A62B6192DCCFA0024BE66 /* libcinder-iphone_d.a */, - 111A62B8192DCCFA0024BE66 /* libcinder-iphone-sim_d.a */, - ); - name = Products; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* WaveTableTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* WaveTableTest */ = { - isa = PBXGroup; - children = ( - 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */, - 29B97315FDCFA39411CA2CEA /* Headers */, - 080E96DDFE201D6D7F000001 /* Source */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = WaveTableTest; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Headers */ = { - isa = PBXGroup; - children = ( - AA875CFE0DD64C10A99EF3AB /* Prefix.pch */, - ); - name = Headers; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 3D080E4252C34004B9ED31F4 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 119C4EF61B23A38E006563C5 /* IOKit.framework */, - 1120DAB819B63E0B00522276 /* AVFoundation.framework */, - 1120DAB919B63E0B00522276 /* CoreMedia.framework */, - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* WaveTableTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WaveTableTest" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 111A62BA192DCD010024BE66 /* PBXTargetDependency */, - ); - name = WaveTableTest; - productInstallPath = "$(HOME)/Applications"; - productName = WaveTableTest; - productReference = 8D1107320486CEB800E47090 /* WaveTableTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WaveTableTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* WaveTableTest */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 111A62AE192DCCFA0024BE66 /* Products */; - ProjectRef = 111A62AD192DCCFA0024BE66 /* cinder.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* WaveTableTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 111A62B4192DCCFA0024BE66 /* libcinder_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcinder_d.a; - remoteRef = 111A62B3192DCCFA0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A62B6192DCCFA0024BE66 /* libcinder-iphone_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone_d.a"; - remoteRef = 111A62B5192DCCFA0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 111A62B8192DCCFA0024BE66 /* libcinder-iphone-sim_d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcinder-iphone-sim_d.a"; - remoteRef = 111A62B7192DCCFA0024BE66 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 111A61761921D059005C3166 /* AudioDrawUtils.cpp in Sources */, - FE6541737CFA406192BDC3E9 /* WaveTableTestApp.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 111A62BA192DCD010024BE66 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = cinder; - targetProxy = 111A62B9192DCD010024BE66 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = WaveTableTest; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_FAST_MATH = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = YES; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - PRODUCT_NAME = WaveTableTest; - STRIP_INSTALLED_PRODUCT = YES; - SYMROOT = ./build; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CINDER_PATH = ../../../../; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src/"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WaveTableTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WaveTableTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/xcshareddata/xcschemes/WaveTableTest.xcscheme b/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/xcshareddata/xcschemes/WaveTableTest.xcscheme deleted file mode 100644 index 5624d03505..0000000000 --- a/test/_audio/WaveTableTest/xcode/WaveTableTest.xcodeproj/xcshareddata/xcschemes/WaveTableTest.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 8a2b0c687e827de719818afdefb6f906b88f2454 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Sat, 5 Oct 2024 12:12:49 -0700 Subject: [PATCH 24/38] audio test: disable Live++ and set window pos to a good general default for others --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 4a304c2a52..eb2ec12726 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -31,13 +31,13 @@ namespace im = ImGui; #endif // To use Live++, place necessary files in a folder called LivePP next to the cinder folder -#define LIVEPP_ENABLED 1 +#define LIVEPP_ENABLED 0 #if LIVEPP_ENABLED #include "LPP_API_x64_CPP.h" #endif -const int SCREEN_INDEX = 1; -const ivec2 WINDOW_POS = { 2000, 50 }; +const int SCREEN_INDEX = 0; +const ivec2 WINDOW_POS = { 200, 200 }; const ivec2 WINDOW_SIZE = { 1600, 1000 }; class AudioTestsApp : public app::App { From ff3bf9978b85999c2dba690c468c6e910d65043f Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Thu, 10 Oct 2024 16:34:26 -0700 Subject: [PATCH 25/38] Added cmake project file --- .../AudioTests/proj/cmake/CMakeLists.txt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/_audio/AudioTests/proj/cmake/CMakeLists.txt diff --git a/test/_audio/AudioTests/proj/cmake/CMakeLists.txt b/test/_audio/AudioTests/proj/cmake/CMakeLists.txt new file mode 100644 index 0000000000..cf03712077 --- /dev/null +++ b/test/_audio/AudioTests/proj/cmake/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +set( CMAKE_VERBOSE_MAKEFILE ON ) + +project( AudioTests ) + +get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) +get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) + +include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) + +set( SRC_FILES + ${APP_PATH}/src/AudioTestsApp.cpp + ${APP_PATH}/src/DeviceTest.cpp + ${APP_PATH}/src/DeviceTest.h + ${APP_PATH}/src/NodeBasicTest.cpp + ${APP_PATH}/src/NodeBasicTest.h + ${APP_PATH}/src/NodeEffectsTest.cpp + ${APP_PATH}/src/NodeEffectsTest.h + ${APP_PATH}/src/ParamTest.cpp + ${APP_PATH}/src/ParamTest.h + ${APP_PATH}/src/SamplePlayerTest.cpp + ${APP_PATH}/src/SamplePlayerTest.h + ${APP_PATH}/src/SpectralTest.cpp + ${APP_PATH}/src/SpectralTest.h + ${APP_PATH}/src/StressTest.cpp + ${APP_PATH}/src/StressTest.h + ${APP_PATH}/src/VoiceTest.cpp + ${APP_PATH}/src/VoiceTest.h + ${APP_PATH}/src/WaveTableTest.cpp + ${APP_PATH}/src/WaveTableTest.h + ${CINDER_PATH}/samples/_audio/common/AudioDrawUtils.cpp + ${CINDER_PATH}/samples/_audio/common/AudioDrawUtils.h +) + +ci_make_app( + APP_NAME "AudioTests" + CINDER_PATH ${CINDER_PATH} + SOURCES ${SRC_FILES} +) From f1cfd0a15bab1747038987073dbfaa497780ef0f Mon Sep 17 00:00:00 2001 From: "Rich E." Date: Wed, 16 Oct 2024 20:08:30 -0700 Subject: [PATCH 26/38] fix compile error with gcc on ubuntu --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index eb2ec12726..252f0a2b0c 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -243,7 +243,7 @@ void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) substituteNodeLabel( label ); ImGuiTreeNodeFlags treeNodeFlags = 0; - im::PushStyleColor( ImGuiCol_Text, node->isEnabled() ? vec4( 1 ) : im::GetStyleColorVec4( ImGuiCol_TextDisabled ) ); + im::PushStyleColor( ImGuiCol_Text, node->isEnabled() ? ImVec4( 1, 1, 1, 1 ) : im::GetStyleColorVec4( ImGuiCol_TextDisabled ) ); if( node->getNumConnectedInputs() > 0 ) { if( expand ) im::SetNextTreeNodeOpen( true ); From 6e607e14222670edb953c7fe716d41c601ed69d5 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 23 Oct 2024 12:38:35 -0700 Subject: [PATCH 27/38] adding Mac OS X project files from @andrewfb --- .../AudioTests.xcodeproj/project.pbxproj | 407 ++++++++++++++++++ .../proj/xcode/AudioTests_Prefix.pch | 12 + test/_audio/AudioTests/proj/xcode/Info.plist | 36 ++ 3 files changed, 455 insertions(+) create mode 100644 test/_audio/AudioTests/proj/xcode/AudioTests.xcodeproj/project.pbxproj create mode 100644 test/_audio/AudioTests/proj/xcode/AudioTests_Prefix.pch create mode 100644 test/_audio/AudioTests/proj/xcode/Info.plist diff --git a/test/_audio/AudioTests/proj/xcode/AudioTests.xcodeproj/project.pbxproj b/test/_audio/AudioTests/proj/xcode/AudioTests.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..246867a2b7 --- /dev/null +++ b/test/_audio/AudioTests/proj/xcode/AudioTests.xcodeproj/project.pbxproj @@ -0,0 +1,407 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 000874162CC8888F00308581 /* ParamTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0008740D2CC8888F00308581 /* ParamTest.cpp */; }; + 000874172CC8888F00308581 /* StressTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0008740E2CC8888F00308581 /* StressTest.cpp */; }; + 000874182CC8888F00308581 /* SamplePlayerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0008740F2CC8888F00308581 /* SamplePlayerTest.cpp */; }; + 000874192CC8888F00308581 /* VoiceTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874102CC8888F00308581 /* VoiceTest.cpp */; }; + 0008741A2CC8888F00308581 /* NodeEffectsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874112CC8888F00308581 /* NodeEffectsTest.cpp */; }; + 0008741B2CC8888F00308581 /* WaveTableTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874122CC8888F00308581 /* WaveTableTest.cpp */; }; + 0008741C2CC8888F00308581 /* NodeBasicTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874132CC8888F00308581 /* NodeBasicTest.cpp */; }; + 0008741D2CC8888F00308581 /* SpectralTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874142CC8888F00308581 /* SpectralTest.cpp */; }; + 0008741E2CC8888F00308581 /* DeviceTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 000874152CC8888F00308581 /* DeviceTest.cpp */; }; + 0008742C2CC8898400308581 /* AudioDrawUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0008742B2CC8898400308581 /* AudioDrawUtils.cpp */; }; + 006D720419952D00008149E2 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006D720219952D00008149E2 /* AVFoundation.framework */; }; + 006D720519952D00008149E2 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 006D720319952D00008149E2 /* CoreMedia.framework */; }; + 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; + 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; + 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; + 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; + 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; + 00B9955A1B128DF400A5C623 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B995581B128DF400A5C623 /* IOKit.framework */; }; + 00B9955B1B128DF400A5C623 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B995591B128DF400A5C623 /* IOSurface.framework */; }; + 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + F48A208995EB462296153DE1 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = A4958FA06DA347F9A95DC7E5 /* CinderApp.icns */; }; + FE9AF78043264E5F92762E90 /* AudioTestsApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90AC3C89D50342FA89D871EB /* AudioTestsApp.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0008740D2CC8888F00308581 /* ParamTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParamTest.cpp; path = ../../src/ParamTest.cpp; sourceTree = ""; }; + 0008740E2CC8888F00308581 /* StressTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StressTest.cpp; path = ../../src/StressTest.cpp; sourceTree = ""; }; + 0008740F2CC8888F00308581 /* SamplePlayerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SamplePlayerTest.cpp; path = ../../src/SamplePlayerTest.cpp; sourceTree = ""; }; + 000874102CC8888F00308581 /* VoiceTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VoiceTest.cpp; path = ../../src/VoiceTest.cpp; sourceTree = ""; }; + 000874112CC8888F00308581 /* NodeEffectsTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NodeEffectsTest.cpp; path = ../../src/NodeEffectsTest.cpp; sourceTree = ""; }; + 000874122CC8888F00308581 /* WaveTableTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WaveTableTest.cpp; path = ../../src/WaveTableTest.cpp; sourceTree = ""; }; + 000874132CC8888F00308581 /* NodeBasicTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NodeBasicTest.cpp; path = ../../src/NodeBasicTest.cpp; sourceTree = ""; }; + 000874142CC8888F00308581 /* SpectralTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpectralTest.cpp; path = ../../src/SpectralTest.cpp; sourceTree = ""; }; + 000874152CC8888F00308581 /* DeviceTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeviceTest.cpp; path = ../../src/DeviceTest.cpp; sourceTree = ""; }; + 0008741F2CC888AB00308581 /* DeviceTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DeviceTest.h; path = ../../src/DeviceTest.h; sourceTree = ""; }; + 000874202CC888AB00308581 /* NodeEffectsTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NodeEffectsTest.h; path = ../../src/NodeEffectsTest.h; sourceTree = ""; }; + 000874212CC888AB00308581 /* Factory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Factory.h; path = ../../src/Factory.h; sourceTree = ""; }; + 000874222CC888AB00308581 /* StressTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StressTest.h; path = ../../src/StressTest.h; sourceTree = ""; }; + 000874232CC888AB00308581 /* VoiceTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VoiceTest.h; path = ../../src/VoiceTest.h; sourceTree = ""; }; + 000874242CC888AB00308581 /* WaveTableTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WaveTableTest.h; path = ../../src/WaveTableTest.h; sourceTree = ""; }; + 000874252CC888AB00308581 /* ParamTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ParamTest.h; path = ../../src/ParamTest.h; sourceTree = ""; }; + 000874262CC888AB00308581 /* AudioTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioTest.h; path = ../../src/AudioTest.h; sourceTree = ""; }; + 000874272CC888AB00308581 /* SamplePlayerTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SamplePlayerTest.h; path = ../../src/SamplePlayerTest.h; sourceTree = ""; }; + 000874282CC888AB00308581 /* SpectralTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SpectralTest.h; path = ../../src/SpectralTest.h; sourceTree = ""; }; + 000874292CC888AB00308581 /* NodeBasicTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NodeBasicTest.h; path = ../../src/NodeBasicTest.h; sourceTree = ""; }; + 0008742A2CC888AB00308581 /* InterleavedPassThruNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InterleavedPassThruNode.h; path = ../../src/InterleavedPassThruNode.h; sourceTree = ""; }; + 0008742B2CC8898400308581 /* AudioDrawUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDrawUtils.cpp; path = ../../../../../samples/_audio/common/AudioDrawUtils.cpp; sourceTree = ""; }; + 006D720219952D00008149E2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 006D720319952D00008149E2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; + 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; + 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + 00B995581B128DF400A5C623 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 00B995591B128DF400A5C623 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 20712DDA6D8E439399F07FDD /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../../../../../samples/_opengl/NormalMapping/include/Resources.h; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 2FECB4E39D224674A1624500 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* AudioTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AudioTests.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 90AC3C89D50342FA89D871EB /* AudioTestsApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AudioTestsApp.cpp; path = ../../src/AudioTestsApp.cpp; sourceTree = ""; }; + A4958FA06DA347F9A95DC7E5 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../../../../../samples/data/CinderApp.icns; sourceTree = ""; }; + E1662BAB2F3847E99976025E /* AudioTests_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = AudioTests_Prefix.pch; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 006D720419952D00008149E2 /* AVFoundation.framework in Frameworks */, + 006D720519952D00008149E2 /* CoreMedia.framework in Frameworks */, + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, + 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, + 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, + 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, + 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, + 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, + 00B9955A1B128DF400A5C623 /* IOKit.framework in Frameworks */, + 00B9955B1B128DF400A5C623 /* IOSurface.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 01B97315FEAEA392516A2CEA /* Blocks */ = { + isa = PBXGroup; + children = ( + ); + name = Blocks; + sourceTree = ""; + }; + 080E96DDFE201D6D7F000001 /* Source */ = { + isa = PBXGroup; + children = ( + 0008742B2CC8898400308581 /* AudioDrawUtils.cpp */, + 000874152CC8888F00308581 /* DeviceTest.cpp */, + 000874132CC8888F00308581 /* NodeBasicTest.cpp */, + 000874112CC8888F00308581 /* NodeEffectsTest.cpp */, + 0008740D2CC8888F00308581 /* ParamTest.cpp */, + 0008740F2CC8888F00308581 /* SamplePlayerTest.cpp */, + 000874142CC8888F00308581 /* SpectralTest.cpp */, + 0008740E2CC8888F00308581 /* StressTest.cpp */, + 000874102CC8888F00308581 /* VoiceTest.cpp */, + 000874122CC8888F00308581 /* WaveTableTest.cpp */, + 90AC3C89D50342FA89D871EB /* AudioTestsApp.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 006D720219952D00008149E2 /* AVFoundation.framework */, + 006D720319952D00008149E2 /* CoreMedia.framework */, + 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, + 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, + 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, + 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, + 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, + 0091D8F80E81B9330029341E /* OpenGL.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + 00B995581B128DF400A5C623 /* IOKit.framework */, + 00B995591B128DF400A5C623 /* IOSurface.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* AudioTests.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* AudioTests */ = { + isa = PBXGroup; + children = ( + 01B97315FEAEA392516A2CEA /* Blocks */, + 29B97315FDCFA39411CA2CEA /* Headers */, + 080E96DDFE201D6D7F000001 /* Source */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = AudioTests; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Headers */ = { + isa = PBXGroup; + children = ( + 000874262CC888AB00308581 /* AudioTest.h */, + 0008741F2CC888AB00308581 /* DeviceTest.h */, + 000874212CC888AB00308581 /* Factory.h */, + 0008742A2CC888AB00308581 /* InterleavedPassThruNode.h */, + 000874292CC888AB00308581 /* NodeBasicTest.h */, + 000874202CC888AB00308581 /* NodeEffectsTest.h */, + 000874252CC888AB00308581 /* ParamTest.h */, + 000874272CC888AB00308581 /* SamplePlayerTest.h */, + 000874282CC888AB00308581 /* SpectralTest.h */, + 000874222CC888AB00308581 /* StressTest.h */, + 000874232CC888AB00308581 /* VoiceTest.h */, + 000874242CC888AB00308581 /* WaveTableTest.h */, + 20712DDA6D8E439399F07FDD /* Resources.h */, + E1662BAB2F3847E99976025E /* AudioTests_Prefix.pch */, + ); + name = Headers; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + A4958FA06DA347F9A95DC7E5 /* CinderApp.icns */, + 2FECB4E39D224674A1624500 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* AudioTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "AudioTests" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AudioTests; + productInstallPath = "$(HOME)/Applications"; + productName = AudioTests; + productReference = 8D1107320486CEB800E47090 /* AudioTests.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AudioTests" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* AudioTests */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* AudioTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F48A208995EB462296153DE1 /* CinderApp.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0008741A2CC8888F00308581 /* NodeEffectsTest.cpp in Sources */, + 0008741E2CC8888F00308581 /* DeviceTest.cpp in Sources */, + 000874182CC8888F00308581 /* SamplePlayerTest.cpp in Sources */, + 0008741C2CC8888F00308581 /* NodeBasicTest.cpp in Sources */, + 000874172CC8888F00308581 /* StressTest.cpp in Sources */, + 0008741D2CC8888F00308581 /* SpectralTest.cpp in Sources */, + FE9AF78043264E5F92762E90 /* AudioTestsApp.cpp in Sources */, + 0008741B2CC8888F00308581 /* WaveTableTest.cpp in Sources */, + 0008742C2CC8898400308581 /* AudioDrawUtils.cpp in Sources */, + 000874192CC8888F00308581 /* VoiceTest.cpp in Sources */, + 000874162CC8888F00308581 /* ParamTest.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AudioTests_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/$(CONFIGURATION)/libcinder.a\""; + PRODUCT_BUNDLE_IDENTIFIER = "org.libcinder.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = AudioTests; + SYMROOT = ./build; + USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../../include"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_FAST_MATH = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = AudioTests_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + "NDEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/macosx/$(CONFIGURATION)/libcinder.a\""; + PRODUCT_BUNDLE_IDENTIFIER = "org.libcinder.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = AudioTests; + STRIP_INSTALLED_PRODUCT = YES; + SYMROOT = ./build; + USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../../include"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CINDER_PATH = ../../../../..; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LIBRARY = "libc++"; + ENABLE_TESTABILITY = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; + MACOSX_DEPLOYMENT_TARGET = 10.13; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include"; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CINDER_PATH = ../../../../..; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; + MACOSX_DEPLOYMENT_TARGET = 10.13; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "AudioTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AudioTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/test/_audio/AudioTests/proj/xcode/AudioTests_Prefix.pch b/test/_audio/AudioTests/proj/xcode/AudioTests_Prefix.pch new file mode 100644 index 0000000000..226b4a63fc --- /dev/null +++ b/test/_audio/AudioTests/proj/xcode/AudioTests_Prefix.pch @@ -0,0 +1,12 @@ +#if defined( __cplusplus ) + #include "cinder/Cinder.h" + + #include "cinder/app/App.h" + + #include "cinder/gl/gl.h" + + #include "cinder/CinderMath.h" + #include "cinder/Matrix.h" + #include "cinder/Vector.h" + #include "cinder/Quaternion.h" +#endif diff --git a/test/_audio/AudioTests/proj/xcode/Info.plist b/test/_audio/AudioTests/proj/xcode/Info.plist new file mode 100644 index 0000000000..08a8c2a276 --- /dev/null +++ b/test/_audio/AudioTests/proj/xcode/Info.plist @@ -0,0 +1,36 @@ + + + + + NSHighResolutionCapable + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + CinderApp.icns + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2015 __MyCompanyName__. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + From 4dc57a8556d37ef492d44290d2cb2b95edf06c1a Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 23 Oct 2024 12:41:03 -0700 Subject: [PATCH 28/38] remove obsolete AudioTestGui.h --- test/_audio/common/AudioTestGui.h | 385 ------------------------------ 1 file changed, 385 deletions(-) delete mode 100644 test/_audio/common/AudioTestGui.h diff --git a/test/_audio/common/AudioTestGui.h b/test/_audio/common/AudioTestGui.h deleted file mode 100644 index 7f3f6228eb..0000000000 --- a/test/_audio/common/AudioTestGui.h +++ /dev/null @@ -1,385 +0,0 @@ -/* - Copyright (c) 2014, The Cinder Project - - This code is intended to be used with the Cinder C++ library, http://libcinder.org - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that - the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and - the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and - the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -// note: this minimal gui set is not meant to be reusable beyond the scope of cinder's audio tests, it is -// merely written in the most convenient way possible in order to provide cross-platform UI functionality. - -#pragma once - -#include "cinder/gl/gl.h" -#include "cinder/gl/TextureFont.h" -#include - -#include -#include - -using namespace ci; - -static gl::TextureFontRef getTestWidgetTexFont() { - static gl::TextureFontRef sTestWidgetTexFont; - if( ! sTestWidgetTexFont ) - sTestWidgetTexFont = gl::TextureFont::create( ci::Font( ci::Font::getDefault().getName(), 22 ) ); - return sTestWidgetTexFont; -} - -struct TestWidget { - TestWidget() : mHidden( false ), mPadding( 10.0f ) {} - - virtual void draw() {} - - Rectf mBounds; - ColorA mBackgroundColor; - - gl::TextureFontRef mTexFont; - bool mHidden; - float mPadding; -}; - -inline void drawWidgets( const std::vector &widgets ) -{ - for( auto w : widgets ) - w->draw(); -} - -struct Button : public TestWidget { - Button( bool isToggle = false, const std::string& titleNormal = "", const std::string& titleEnabled = "" ) - : TestWidget(), mIsToggle( isToggle ), mTitleNormal( titleNormal ), mTitleEnabled( titleEnabled ) - { - mTextColor = Color::white(); - mNormalColor = Color( "SlateGray" ); - mEnabledColor = Color( "RoyalBlue" ); - setEnabled( false ); - mTimeout = 30; - mFadeFrames = 0; - } - - void setEnabled( bool b ) - { - if( b ) { - mBackgroundColor = mEnabledColor; - } else { - mBackgroundColor = mNormalColor; - } - mEnabled = b; - } - - bool hitTest( const ivec2 &pos ) - { - if( mHidden ) - return false; - - bool b = mBounds.contains( pos ); - if( b ) { - if( mIsToggle ) - setEnabled( ! mEnabled ); - else { - setEnabled( true ); - mFadeFrames = mTimeout; - } - } - - return b; - } - - void draw() - { - if( mHidden ) - return; - if( ! mTexFont ) - mTexFont = getTestWidgetTexFont(); - - if( mIsToggle || ! mFadeFrames ) - gl::color( mBackgroundColor ); - else { - mFadeFrames--; - setEnabled( false ); - gl::color( lerp( mNormalColor, mEnabledColor, (float)mFadeFrames / (float)mTimeout ) ); - } - - gl::drawSolidRect( mBounds ); - - std::string& title = mEnabled ? mTitleEnabled : mTitleNormal; - - gl::color( mTextColor ); - mTexFont->drawString( title, vec2( mBounds.x1 + mPadding, mBounds.getCenter().y + mTexFont->getFont().getDescent() ) ); - } - - ColorA mTextColor; - std::string mTitleNormal, mTitleEnabled; - ColorA mNormalColor, mEnabledColor; - bool mEnabled, mIsToggle; - size_t mTimeout, mFadeFrames; -}; - -struct HSlider : public TestWidget { - HSlider() : TestWidget() - { - mValue = mValueScaled = 0.0f; - mMin = 0.0f; - mMax = 1.0f; - mBackgroundColor = ColorA( "DarkGreen", 0.75f ); - mValueColor = ColorA( "SpringGreen", 0.75f ); - mTextColor = Color::white(); - } - - void set( float val ) { - mValueScaled = val; - mValue = ( mValueScaled - mMin ) / ( mMax - mMin ); - } - - bool hitTest( const ivec2 &pos ) - { - if( mHidden ) - return false; - - bool b = mBounds.contains( pos ); - if( b ) { - mValue = ( pos.x - mBounds.x1 ) / mBounds.getWidth(); - mValueScaled = (mMax - mMin) * mValue + mMin; - } - return b; - } - - void draw() - { - if( mHidden ) - return; - if( ! mTexFont ) - mTexFont = getTestWidgetTexFont(); - - gl::color( mBackgroundColor ); - gl::drawSolidRect( mBounds ); - - auto valFormatted = boost::format( "%0.3f" ) % mValueScaled; - - std::string str = mTitle + ": " + valFormatted.str(); - gl::color( mTextColor ); - mTexFont->drawString( str, vec2( mBounds.x1 + mPadding, mBounds.getCenter().y + mTexFont->getFont().getDescent() ) ); - - gl::color( mValueColor ); - gl::drawStrokedRect( mBounds ); - - float offset = mBounds.x1 + mBounds.getWidth() * mValue; - float w = 2.0f; - Rectf valRect( offset - w, mBounds.y1, offset + w, mBounds.y2 ); - - gl::drawSolidRect( valRect ); - } - - float mValue, mValueScaled, mMin, mMax; - ColorA mTextColor, mValueColor; - std::string mTitle; -}; - -struct VSelector : public TestWidget { - VSelector() : TestWidget() - { - mCurrentSectionIndex = 0; - mBackgroundColor = ColorA( "MidnightBlue", 0.75f ); - mSelectedColor = ColorA( "SpringGreen", 0.95f ); - mUnselectedColor = ColorA::gray( 0.5 ); - mTitleColor = ColorA::gray( 0.75f, 0.5f ); - } - - bool hitTest( const ivec2 &pos ) - { - if( mHidden ) - return false; - - bool b = mBounds.contains( pos ); - if( b ) { - int offset = pos.y - (int)mBounds.y1; - int sectionHeight = (int)mBounds.getHeight() / mSegments.size(); - mCurrentSectionIndex = std::min( offset / sectionHeight, mSegments.size() - 1 ); - } - return b; - } - - std::string currentSection() const - { - if( mSegments.empty() ) - return ""; - - return mSegments[mCurrentSectionIndex]; - } - - void draw() - { - if( mHidden ) - return; - - if( ! mTexFont ) - mTexFont = getTestWidgetTexFont(); - - gl::color( mBackgroundColor ); - gl::drawSolidRect( mBounds ); - - float sectionHeight = mBounds.getHeight() / mSegments.size(); - Rectf section( mBounds.x1, mBounds.y1, mBounds.x2, mBounds.y1 + sectionHeight ); - gl::color( mUnselectedColor ); - for( size_t i = 0; i < mSegments.size(); i++ ) { - if( i != mCurrentSectionIndex ) { - gl::drawStrokedRect( section ); - gl::color( mUnselectedColor ); - mTexFont->drawString( mSegments[i], vec2( section.x1 + mPadding, section.getCenter().y + mTexFont->getFont().getDescent() ) ); - } - section += vec2( 0.0f, sectionHeight ); - } - - gl::color( mSelectedColor ); - - section.y1 = mBounds.y1 + mCurrentSectionIndex * sectionHeight; - section.y2 = section.y1 + sectionHeight; - gl::drawStrokedRect( section ); - - if( ! mSegments.empty() ) { - gl::color( mSelectedColor ); - mTexFont->drawString( mSegments[mCurrentSectionIndex], vec2( section.x1 + mPadding, section.getCenter().y + mTexFont->getFont().getDescent() ) ); - } - - if( ! mTitle.empty() ) { - gl::color( mTitleColor ); - mTexFont->drawString( mTitle, vec2( mBounds.x1 + mPadding, mBounds.y1 - mTexFont->getFont().getDescent() ) ); - } - } - - std::vector mSegments; - ColorA mSelectedColor, mUnselectedColor, mTitleColor; - size_t mCurrentSectionIndex; - std::string mTitle; -}; - -struct TextInput : public TestWidget { - enum Format { NUMERICAL, ALL }; - - TextInput( Format format = Format::NUMERICAL, const std::string& title = "" ) - : TestWidget(), mFormat( format ), mTitle( title ) - { - mBackgroundColor = ColorA( "MidnightBlue", 0.65f ); - mTitleColor = ColorA::gray( 0.75f, 0.5f ); - mNormalColor = Color( "SlateGray" ); - mEnabledColor = ColorA( "SpringGreen", 0.95f ); - setSelected( false ); - - sTextInputs.push_back( this ); - } - - void setSelected( bool b ) - { - disableAll(); - mSelected = b; - } - - bool hitTest( const ivec2 &pos ) - { - if( mHidden ) - return false; - - bool b = mBounds.contains( pos ); - if( b ) { - setSelected( true ); - } - - return b; - } - - void setValue( int value ) - { - mInputString = std::to_string( value ); - } - - int getValue() - { - if( mInputString.empty() ) - return 0; - - return stoi( mInputString ); - } - - void processChar( char c ) - { - if( mFormat == Format::NUMERICAL && ! isdigit( c ) ) - return; - - mInputString.push_back( c ); - } - - void processBackspace() - { - if( ! mInputString.empty() ) - mInputString.pop_back(); - } - - static void disableAll() - { - for( TextInput *t : sTextInputs ) - t->mSelected = false; - } - - static TextInput *getCurrentSelected() - { - for( TextInput *t : sTextInputs ) { - if( t->mSelected ) - return t; - } - - return nullptr; - } - - void draw() - { - if( mHidden ) - return; - if( ! mTexFont ) - mTexFont = getTestWidgetTexFont(); - - gl::color( mBackgroundColor ); - gl::drawSolidRect( mBounds ); - - vec2 titleOffset = vec2( mBounds.x1 + mPadding, mBounds.y1 - mTexFont->getFont().getDescent() ); - gl::color( mTitleColor ); - mTexFont->drawString( mTitle, titleOffset ); - - vec2 textOffset = vec2( mBounds.x1 + mPadding, mBounds.getCenter().y + mTexFont->getFont().getDescent() ); - - gl::color( ( mSelected ? mEnabledColor : mNormalColor ) ); - - gl::drawStrokedRect( mBounds ); - mTexFont->drawString( mInputString, textOffset ); - } - - Format mFormat; - std::string mTitle, mInputString; - ColorA mNormalColor, mEnabledColor, mTitleColor; - bool mSelected; - - static std::vector sTextInputs; -}; - -std::vector TextInput::sTextInputs; - -#define PRINT_GRAPH( context ) { \ - ci::app::console() << "-------------- Graph configuration: --------------" << endl; \ - ci::app::console() << context->printGraphToString(); \ - ci::app::console() << "--------------------------------------------------" << endl; \ -} From 347cecacd1bbf612faf0e5e9af6579d9d5b30691 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 23 Oct 2024 15:03:56 -0700 Subject: [PATCH 29/38] set initial ImGui window sizes --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 252f0a2b0c..4ad46bf259 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -218,6 +218,10 @@ void AudioTestsApp::draw() namespace { +const ImGuiCond sWindowCond = ImGuiCond_FirstUseEver; +//const ImGuiCond sWindowCond = ImGuiCond_Always; +const float sWindowPadding = 10; + static bool sThemeIsDark = true; static float sThemeAlpha = 0.85f; @@ -287,9 +291,8 @@ void AudioTestsApp::updateImGui() im::GetIO().FontGlobalScale = getWindowContentScale(); im::GetIO().FontAllowUserScaling = true; - //im::GetIO().ConfigWindowsMoveFromTitleBarOnly = false; - //im::GetIO().ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; - + im::SetNextWindowPos( { sWindowPadding, sWindowPadding }, sWindowCond ); + im::SetNextWindowSize( { 334, 375 }, sWindowCond ); if( im::Begin( "General", nullptr ) ) { im::Text( "fps: %0.2f, seconds running: %0.1f", app::App::get()->getAverageFps(), app::App::get()->getElapsedSeconds() ); im::Separator(); @@ -328,8 +331,8 @@ void AudioTestsApp::updateImGui() im::End(); // "General" if( mCurrentTest ) { - im::SetNextWindowPos( { 400, 100 }, ImGuiCond_FirstUseEver ); - im::SetNextWindowSize( { 800, 600 }, ImGuiCond_FirstUseEver ); + im::SetNextWindowPos( { 354, 100 }, sWindowCond ); + im::SetNextWindowSize( { 800, 490 }, sWindowCond ); im::Begin( mCurrentTest->getName().c_str() ); mCurrentTest->updateUI(); @@ -344,9 +347,9 @@ void AudioTestsApp::updateImGui() void AudioTestsApp::updateContextUI() { - im::SetNextWindowPos( ivec2( 681, 2 ), ImGuiCond_FirstUseEver ); - im::SetNextWindowSize( ivec2( 330, 420 ), ImGuiCond_FirstUseEver ); - im::SetNextWindowCollapsed( true, ImGuiCond_FirstUseEver ); + const vec2 contextWindowSize = { 430, 420 }; + im::SetNextWindowPos( vec2( getWindowSize() ) - contextWindowSize - vec2( sWindowPadding ), sWindowCond ); + im::SetNextWindowSize( contextWindowSize, sWindowCond ); if( ! im::Begin( "Audio Context", &mContextUIEnabled ) ) { im::End(); From 99e5ed17df39c5fdb62fcfebf1658f6d9dbf1f18 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 23 Oct 2024 15:11:31 -0700 Subject: [PATCH 30/38] Context UI function makes a copy of auto-pulled nodes before displaying properties --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 4ad46bf259..5b6ecc1d5d 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -370,11 +370,11 @@ void AudioTestsApp::updateContextUI() audio::Node *hovered = nullptr; printNodeFn( ctx->getOutput().get(), expand, &hovered ); - size_t numAutoPulledNodes = ctx->getAutoPulledNodes().size(); - if( numAutoPulledNodes ) { + const auto autoPulledNodes = ctx->getAutoPulledNodes(); + if( autoPulledNodes.size() > 0 ) { im::Separator(); - im::Text( "auto pulled nodes: %d", numAutoPulledNodes ); - for( const auto& node : ctx->getAutoPulledNodes() ) { + im::Text( "auto pulled nodes: %d", (int)autoPulledNodes.size() ); + for( const auto& node : autoPulledNodes ) { printNodeFn( node, expand, &hovered ); } } From d79d1697f66a74913b3073d3202943fc7ed4174b Mon Sep 17 00:00:00 2001 From: moldybeats Date: Sun, 27 Oct 2024 12:18:23 -0500 Subject: [PATCH 31/38] Fix typo in Audio Context GUI window --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 5b6ecc1d5d..0cc563e5c3 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -358,7 +358,7 @@ void AudioTestsApp::updateContextUI() auto ctx = audio::master(); - im::Text( "dsp %s, samplerate: %d, frames per black: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate(), (int)ctx->getFramesPerBlock() ); + im::Text( "dsp %s, samplerate: %d, frames per block: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate(), (int)ctx->getFramesPerBlock() ); im::Separator(); im::Text( "Context Graph:" ); im::SameLine(); From 59a45bb4001c8bf4698649c076ed3b2b57af800f Mon Sep 17 00:00:00 2001 From: moldybeats Date: Sun, 27 Oct 2024 12:58:02 -0500 Subject: [PATCH 32/38] Guard against removing more gens than are available in StressTest --- test/_audio/AudioTests/src/StressTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/_audio/AudioTests/src/StressTest.cpp b/test/_audio/AudioTests/src/StressTest.cpp index 459a6c8f42..ea1005665b 100644 --- a/test/_audio/AudioTests/src/StressTest.cpp +++ b/test/_audio/AudioTests/src/StressTest.cpp @@ -76,7 +76,9 @@ void StressTest::addGens() void StressTest::removeGens() { - for( size_t i = 0; i < mAddIncr; i++ ) { + size_t gensToRemove = ( mAddIncr > mGenBank.size() ) ? mGenBank.size() : mAddIncr; + + for( size_t i = 0; i < gensToRemove; i++ ) { mGenBank.back()->disconnectAll(); mGenBank.pop_back(); } From 40f269b2cbe1f1f1d495116561d9e7b1d0ba3739 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 29 Oct 2024 16:05:48 -0700 Subject: [PATCH 33/38] rename Factory namespace --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 6 +++--- test/_audio/AudioTests/src/Factory.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 0cc563e5c3..4854d8eef6 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -59,9 +59,9 @@ class AudioTestsApp : public app::App { bool mImGuiEnabled = true; bool mContextUIEnabled = true; - mason::Factory mTestFactory; - AudioTestRef mCurrentTest; - int mCurrenTestIndex = 0; + audiotest::Factory mTestFactory; + AudioTestRef mCurrentTest; + int mCurrenTestIndex = 0; }; void prepareSettings( app::App::Settings *settings ) diff --git a/test/_audio/AudioTests/src/Factory.h b/test/_audio/AudioTests/src/Factory.h index aeac71cb5a..0d6dde05be 100644 --- a/test/_audio/AudioTests/src/Factory.h +++ b/test/_audio/AudioTests/src/Factory.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2014-15, Richard Eakin - All rights reserved. + Copyright (c) 2014-24, Richard Eakin - All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,7 +28,7 @@ #include #include -namespace mason { +namespace audiotest { //! Exception thrown when Factory cannot build an object for the requested key class FactoryExceptionBuilderNotFound : public cinder::Exception { @@ -101,4 +101,4 @@ class Factory { std::vector mBuilders; }; -} // namespace mason +} // namespace audiotest From 742ce2b00055b233a13a02189d85f73b0bd27418 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 29 Oct 2024 17:57:11 -0700 Subject: [PATCH 34/38] fix initial tests setup --- test/_audio/AudioTests/src/NodeEffectsTest.cpp | 5 +---- test/_audio/AudioTests/src/SpectralTest.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp index cbb6b5de98..dad696d066 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.cpp +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -25,10 +25,7 @@ NodeEffectsTest::NodeEffectsTest() //mUseSine = true; // set to start with GenSineNode makeNodes(); - setupOne(); - setupDelay(); - //setupFeedback(); - //setupEcho(); + setupSubTest( "one" ); } void NodeEffectsTest::setupSubTest( const string &testName ) diff --git a/test/_audio/AudioTests/src/SpectralTest.cpp b/test/_audio/AudioTests/src/SpectralTest.cpp index b8523e1d68..9ba349083c 100644 --- a/test/_audio/AudioTests/src/SpectralTest.cpp +++ b/test/_audio/AudioTests/src/SpectralTest.cpp @@ -46,7 +46,7 @@ SpectralTest::SpectralTest() mPlayerNode = ctx->makeNode( new audio::BufferPlayerNode( audioBuffer ) ); - setupSine(); + setupSubTest( "sine" ); CI_LOG_V( "MonitorSpectralNode fftSize: " << mMonitorSpectralNode->getFftSize() << ", windowSize: " << mMonitorSpectralNode->getWindowSize() ); } From bca8ac175e56cf09caaf0eca4b769578c58db277 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 29 Oct 2024 17:58:38 -0700 Subject: [PATCH 35/38] added more UI to NodeEffectsTest --- .../_audio/AudioTests/src/NodeEffectsTest.cpp | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/test/_audio/AudioTests/src/NodeEffectsTest.cpp b/test/_audio/AudioTests/src/NodeEffectsTest.cpp index dad696d066..2a1f86f46f 100644 --- a/test/_audio/AudioTests/src/NodeEffectsTest.cpp +++ b/test/_audio/AudioTests/src/NodeEffectsTest.cpp @@ -191,15 +191,34 @@ void NodeEffectsTest::updateUI() mGain->setValue( gain ); } - if( im::Checkbox( "use sine", &mUseSine ) ) { - makeNodes(); - setupSubTest( mSubTests[mCurrentSubTest] ); + float pan = mPan->getPos(); + if( im::SliderFloat( "pan", &pan, 0, 1 ) ) { + mPan->setPos( pan ); + } + + float lowpassCutoff = mLowPass->getCutoffFreq(); + if( im::DragFloat( "lowpass cutoff", &lowpassCutoff, 1, 0, 10000 ) ) { + mLowPass->setCutoffFreq( lowpassCutoff ); + } + float lowpassResonance = mLowPass->getResonance(); + if( im::DragFloat( "lowpass resonance", &lowpassResonance, 0.01f, 0, 10 ) ) { + mLowPass->setResonance( lowpassResonance ); + } + + float delaySeconds = mDelay->getDelaySeconds(); + if( im::DragFloat( "delay (s)", &delaySeconds, 0.01f, 0, 10 ) ) { + mDelay->setDelaySeconds( delaySeconds ); } bool genEnabled = mGen->isEnabled(); if( im::Checkbox( "Gen enabled", &genEnabled ) ) { mGen->setEnabled( genEnabled ); } + if( im::Checkbox( "use sine", &mUseSine ) ) { + makeNodes(); + setupSubTest( mSubTests[mCurrentSubTest] ); + } + if( im::Button( "chirp" ) ) { applyChirp(); From 7e7f996b5e3d69c454c2d1a789527420de0c01e7 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Tue, 29 Oct 2024 18:18:12 -0700 Subject: [PATCH 36/38] UI context graph viewer handles recursive graphs (thanks @moldybeats for reporting) --- test/_audio/AudioTests/src/AudioTestsApp.cpp | 118 +++++++++++-------- 1 file changed, 68 insertions(+), 50 deletions(-) diff --git a/test/_audio/AudioTests/src/AudioTestsApp.cpp b/test/_audio/AudioTests/src/AudioTestsApp.cpp index 4854d8eef6..f1bd942b06 100644 --- a/test/_audio/AudioTests/src/AudioTestsApp.cpp +++ b/test/_audio/AudioTests/src/AudioTestsApp.cpp @@ -240,8 +240,7 @@ void substituteNodeLabel( std::string &label ) } } -// note: recursion level currently only for debugging -void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) +void showNodeFn( audio::Node *node, bool expand, audio::Node **hovered, set &traversedNodes ) { string label = node->getName(); substituteNodeLabel( label ); @@ -253,12 +252,23 @@ void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) im::SetNextTreeNodeOpen( true ); if( im::TreeNodeEx( label.c_str(), treeNodeFlags ) ) { + + if( traversedNodes.count( node ) ) { + im::Text( "** recursion detected **" ); + im::PopStyleColor(); + im::TreePop(); + return; + } + else { + traversedNodes.insert( node ); + } + if( im::IsItemHovered() ) { *hovered = node; } for( const auto &input : node->getInputs() ) { - printNodeFn( input.get(), expand, hovered ); + showNodeFn( input.get(), expand, hovered, traversedNodes ); } im::TreePop(); @@ -276,6 +286,60 @@ void printNodeFn( audio::Node *node, bool expand, audio::Node **hovered ) im::PopStyleColor(); }; +//! util function for showing all nodes in a tree +void showContextGraph( ci::audio::Context *ctx ) +{ + set traversedNodes; + im::Text( "Context Graph:" ); + im::SameLine(); + + static bool expand = false; + im::Checkbox( "expand all", &expand ); + + im::BeginChild( "Context Graph", vec2( 0, im::GetWindowHeight() - 100 ) ); + audio::Node *hovered = nullptr; + showNodeFn( ctx->getOutput().get(), expand, &hovered, traversedNodes ); + + const auto autoPulledNodes = ctx->getAutoPulledNodes(); + if( autoPulledNodes.size() > 0 ) { + im::Separator(); + im::Text( "auto pulled nodes: %d", (int)autoPulledNodes.size() ); + for( const auto& node : autoPulledNodes ) { + showNodeFn( node, expand, &hovered, traversedNodes ); + } + } + + im::EndChild(); + + // show info at bottom of window for hovered audio::Nodes + im::Separator(); + if( hovered ) { + string name = hovered->getName(); + substituteNodeLabel( name ); + + const char *processMode = hovered->getProcessesInPlace() ? "in-place" : "sum"; + string channelMode; + switch( hovered->getChannelMode() ) { + case audio::Node::ChannelMode::SPECIFIED: channelMode = "specified"; break; + case audio::Node::ChannelMode::MATCHES_INPUT: channelMode = "matches input"; break; + case audio::Node::ChannelMode::MATCHES_OUTPUT: channelMode = "matches output"; break; + default: CI_ASSERT_NOT_REACHABLE(); break; + } + + im::Text( "%s: channels: %d, mode: %s (%s)", name.c_str(), hovered->getNumChannels(), processMode, channelMode.c_str() ); + + auto mathNode = dynamic_cast( hovered ); + if( mathNode ) { + im::SameLine(); + im::Text( "| value: %0.3f", mathNode->getValue() ); + } + } + else { + im::Text( "" ); + } + +} + } // anon namespace // called on first render loop, because we need a valid gl::context @@ -360,53 +424,7 @@ void AudioTestsApp::updateContextUI() im::Text( "dsp %s, samplerate: %d, frames per block: %d", ( ctx->isEnabled() ? "enabled" : "disabled" ), (int)ctx->getSampleRate(), (int)ctx->getFramesPerBlock() ); im::Separator(); - im::Text( "Context Graph:" ); - im::SameLine(); - - static bool expand = false; - im::Checkbox( "expand all", &expand ); - - im::BeginChild( "Context Graph", vec2( 0, im::GetWindowHeight() - 100 ) ); - audio::Node *hovered = nullptr; - printNodeFn( ctx->getOutput().get(), expand, &hovered ); - - const auto autoPulledNodes = ctx->getAutoPulledNodes(); - if( autoPulledNodes.size() > 0 ) { - im::Separator(); - im::Text( "auto pulled nodes: %d", (int)autoPulledNodes.size() ); - for( const auto& node : autoPulledNodes ) { - printNodeFn( node, expand, &hovered ); - } - } - - im::EndChild(); - - // show info at bottom of window for hovered audio::Nodes - im::Separator(); - if( hovered ) { - string name = hovered->getName(); - substituteNodeLabel( name ); - - const char *processMode = hovered->getProcessesInPlace() ? "in-place" : "sum"; - string channelMode; - switch( hovered->getChannelMode() ) { - case audio::Node::ChannelMode::SPECIFIED: channelMode = "specified"; break; - case audio::Node::ChannelMode::MATCHES_INPUT: channelMode = "matches input"; break; - case audio::Node::ChannelMode::MATCHES_OUTPUT: channelMode = "matches output"; break; - default: CI_ASSERT_NOT_REACHABLE(); break; - } - - im::Text( "%s: channels: %d, mode: %s (%s)", name.c_str(), hovered->getNumChannels(), processMode, channelMode.c_str() ); - - auto mathNode = dynamic_cast( hovered ); - if( mathNode ) { - im::SameLine(); - im::Text( "| value: %0.3f", mathNode->getValue() ); - } - } - else { - im::Text( "" ); - } + showContextGraph( ctx ); im::End(); // Audio Context } From d6e6f21d9dd3022765321d97e5a73308aa2fd1d8 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 30 Oct 2024 21:58:01 -0700 Subject: [PATCH 37/38] fix SamplePlayerTest's xrun visual, remove dead code --- .../AudioTests/src/SamplePlayerTest.cpp | 212 +----------------- test/_audio/AudioTests/src/SamplePlayerTest.h | 3 +- 2 files changed, 10 insertions(+), 205 deletions(-) diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.cpp b/test/_audio/AudioTests/src/SamplePlayerTest.cpp index a1c1e5bf65..50f1bc62a4 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.cpp +++ b/test/_audio/AudioTests/src/SamplePlayerTest.cpp @@ -193,209 +193,6 @@ void SamplePlayerTest::triggerStartStop( bool start ) } } -#if 0 -void SamplePlayerTest::setupUI() -{ - const float padding = 6.0f; - - auto buttonRect = Rectf( padding, padding, 160, 50 ); - mEnableSamplePlayerNodeButton.mIsToggle = true; - mEnableSamplePlayerNodeButton.mTitleNormal = "player off"; - mEnableSamplePlayerNodeButton.mTitleEnabled = "player on"; - mEnableSamplePlayerNodeButton.mBounds = buttonRect; - mWidgets.push_back( &mEnableSamplePlayerNodeButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mStartPlaybackButton.mIsToggle = false; - mStartPlaybackButton.mTitleNormal = "start"; - mStartPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mStartPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mStopPlaybackButton.mIsToggle = false; - mStopPlaybackButton.mTitleNormal = "stop"; - mStopPlaybackButton.mBounds = buttonRect; - mWidgets.push_back( &mStopPlaybackButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - buttonRect.x2 -= 30; - mLoopButton.mIsToggle = true; - mLoopButton.mTitleNormal = "loop off"; - mLoopButton.mTitleEnabled = "loop on"; - mLoopButton.setEnabled( mSamplePlayerNode->isLoopEnabled() ); - mLoopButton.mBounds = buttonRect; - mWidgets.push_back( &mLoopButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mAsyncButton.mIsToggle = true; - mAsyncButton.mTitleNormal = "async off"; - mAsyncButton.mTitleEnabled = "async on"; - mAsyncButton.mBounds = buttonRect; - mWidgets.push_back( &mAsyncButton ); - - buttonRect = Rectf( padding, buttonRect.y2 + padding, padding + buttonRect.getWidth(), buttonRect.y2 + buttonRect.getHeight() + padding ); - mRecordButton.mIsToggle = true; - mRecordButton.mTitleNormal = "record off"; - mRecordButton.mTitleEnabled = "record on"; - mRecordButton.mBounds = buttonRect; - mWidgets.push_back( &mRecordButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mWriteButton.mIsToggle = false; - mWriteButton.mTitleNormal = "write to file"; - mWriteButton.mBounds = buttonRect; - mWidgets.push_back( &mWriteButton ); - - buttonRect += vec2( buttonRect.getWidth() + padding, 0 ); - mAutoResizeButton.mIsToggle = true; - mAutoResizeButton.mTitleNormal = "auto resize off"; - mAutoResizeButton.mTitleEnabled = "auto resize on"; - mAutoResizeButton.mBounds = buttonRect; - mWidgets.push_back( &mAutoResizeButton ); - - vec2 sliderSize( 200, 30 ); - Rectf selectorRect( getWindowWidth() - sliderSize.x - padding, padding, getWindowWidth() - padding, sliderSize.y * 3 + padding ); - mTestSelector.mSegments.push_back( "BufferPlayerNode" ); - mTestSelector.mSegments.push_back( "FilePlayerNode" ); - mTestSelector.mSegments.push_back( "recorder" ); - mTestSelector.mBounds = selectorRect; - mWidgets.push_back( &mTestSelector ); - - Rectf sliderRect( selectorRect.x1, selectorRect.y2 + padding, selectorRect.x2, selectorRect.y2 + padding + sliderSize.y ); - mGainSlider.mBounds = sliderRect; - mGainSlider.mTitle = "GainNode"; - mGainSlider.set( mGain->getValue() ); - mWidgets.push_back( &mGainSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mPanSlider.mBounds = sliderRect; - mPanSlider.mTitle = "Pan"; - mPanSlider.set( mPan->getPos() ); - mWidgets.push_back( &mPanSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mLoopBeginSlider.mBounds = sliderRect; - mLoopBeginSlider.mTitle = "Loop Begin"; - mLoopBeginSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopBeginSlider.set( (float)mSamplePlayerNode->getLoopBeginTime() ); - mWidgets.push_back( &mLoopBeginSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mLoopEndSlider.mBounds = sliderRect; - mLoopEndSlider.mTitle = "Loop End"; - mLoopEndSlider.mMax = (float)mSamplePlayerNode->getNumSeconds(); - mLoopEndSlider.set( (float)mSamplePlayerNode->getLoopEndTime() ); - mWidgets.push_back( &mLoopEndSlider ); - - sliderRect += vec2( 0, sliderRect.getHeight() + padding ); - mTriggerDelaySlider.mBounds = sliderRect; - mTriggerDelaySlider.mTitle = "Trigger Delay"; - mTriggerDelaySlider.mMin = 0.0f; // TODO: test negative numbers don't blow up - mTriggerDelaySlider.mMax = 5.0f; - mTriggerDelaySlider.set( 0 ); - mWidgets.push_back( &mTriggerDelaySlider ); - - vec2 xrunSize( 80, 26 ); - mUnderrunRect = Rectf( padding, getWindowHeight() - xrunSize.y - padding, xrunSize.x + padding, getWindowHeight() - padding ); - mOverrunRect = mUnderrunRect + vec2( xrunSize.x + padding, 0 ); - mRecorderOverrunRect = mOverrunRect + vec2( xrunSize.x + padding, 0 ); - - getWindow()->getSignalMouseDown().connect( [this] ( MouseEvent &event ) { processTap( event.getPos() ); } ); - getWindow()->getSignalMouseDrag().connect( [this] ( MouseEvent &event ) { processDrag( event.getPos() ); } ); - getWindow()->getSignalTouchesBegan().connect( [this] ( TouchEvent &event ) { processTap( event.getTouches().front().getPos() ); } ); - getWindow()->getSignalTouchesMoved().connect( [this] ( TouchEvent &event ) { - for( const TouchEvent::Touch &touch : getActiveTouches() ) - processDrag( touch.getPos() ); - } ); - - gl::enableAlphaBlending(); -} - -void SamplePlayerTest::processDrag( ivec2 pos ) -{ - if( mGainSlider.hitTest( pos ) ) - mGain->setValue( mGainSlider.mValueScaled ); - else if( mPanSlider.hitTest( pos ) ) { -#if TEST_STEREO_INPUT_PANNING - mPan->getParamPos()->applyRamp( mPanSlider.mValueScaled, 0.6f ); -#else - mPan->setPos( mPanSlider.mValueScaled ); -#endif - } - else if( mLoopBeginSlider.hitTest( pos ) ) - mSamplePlayerNode->setLoopBeginTime( mLoopBeginSlider.mValueScaled ); - else if( mLoopEndSlider.hitTest( pos ) ) - mSamplePlayerNode->setLoopEndTime( mLoopEndSlider.mValueScaled ); - else if( mTriggerDelaySlider.hitTest( pos ) ) { - } - else if( pos.y > getWindowCenter().y ) - seek( pos.x ); -} - -void SamplePlayerTest::processTap( ivec2 pos ) -{ - if( mEnableSamplePlayerNodeButton.hitTest( pos ) ) - mSamplePlayerNode->setEnabled( ! mSamplePlayerNode->isEnabled() ); - else if( mStartPlaybackButton.hitTest( pos ) ) - triggerStartStop( true ); - else if( mStopPlaybackButton.hitTest( pos ) ) - triggerStartStop( false ); - else if( mLoopButton.hitTest( pos ) ) - mSamplePlayerNode->setLoopEnabled( ! mSamplePlayerNode->isLoopEnabled() ); - else if( mRecordButton.hitTest( pos ) ) { - if( mRecordButton.mEnabled ) - mRecorder->start(); - else - mRecorder->disable(); - } - else if( mWriteButton.hitTest( pos ) ) - writeRecordedToFile(); - else if( mAutoResizeButton.hitTest( pos ) ) - ; - else if( mAsyncButton.hitTest( pos ) ) - ; - else if( pos.y > getWindowCenter().y ) - seek( pos.x ); - - size_t currentIndex = mTestSelector.mCurrentSectionIndex; - if( mTestSelector.hitTest( pos ) && currentIndex != mTestSelector.mCurrentSectionIndex ) { - string currentTest = mTestSelector.currentSection(); - CI_LOG_V( "selected: " << currentTest ); - - if( currentTest == "BufferPlayerNode" ) - setupBufferPlayerNode(); - if( currentTest == "FilePlayerNode" ) - setupFilePlayerNode(); - if( currentTest == "recorder" ) - setupBufferRecorderNode(); - } -} -#endif - -void SamplePlayerTest::seek( size_t xPos ) -{ - mSamplePlayerNode->seek( mSamplePlayerNode->getNumFrames() * xPos / app::getWindowWidth() ); -} - -void SamplePlayerTest::printBufferSamples( size_t xPos ) -{ - auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); - if( ! bufferPlayer ) - return; - - auto buffer = bufferPlayer->getBuffer(); - size_t step = buffer->getNumFrames() / app::getWindowWidth(); - size_t xScaled = xPos * step; - CI_LOG_I( "samples starting at " << xScaled << ":" ); - for( int i = 0; i < 100; i++ ) { - if( buffer->getNumChannels() == 1 ) - app::console() << buffer->getChannel( 0 )[xScaled + i] << ", "; - else - app::console() << "[" << buffer->getChannel( 0 )[xScaled + i] << ", " << buffer->getChannel( 0 )[xScaled + i] << "], "; - } - app::console() << endl; -} - void SamplePlayerTest::printSupportedExtensions() { CI_LOG_I( "supported SourceFile extensions: " ); @@ -439,6 +236,15 @@ void SamplePlayerTest::openFile( const ci::fs::path &fullPath ) CI_LOG_I( "loaded and set new source buffer, channels: " << mSourceFile->getNumChannels() << ", frames: " << mSourceFile->getNumFrames() ); } +void SamplePlayerTest::resize() +{ + const float padding = 6.0f; + const vec2 xrunSize( 80, 26 ); + mUnderrunRect = Rectf( padding, app::getWindowHeight() - xrunSize.y - padding, xrunSize.x + padding, app::getWindowHeight() - padding ); + mOverrunRect = mUnderrunRect + vec2( xrunSize.x + padding, 0 ); + mRecorderOverrunRect = mOverrunRect + vec2( xrunSize.x + padding, 0 ); +} + void SamplePlayerTest::update() { // light up rects if an xrun was detected diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.h b/test/_audio/AudioTests/src/SamplePlayerTest.h index 39b91f9d16..fd1ae41c0d 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.h +++ b/test/_audio/AudioTests/src/SamplePlayerTest.h @@ -19,6 +19,7 @@ class SamplePlayerTest : public AudioTest { void openFile( const ci::fs::path &fullPath ) override; void update() override; + void resize() override; void draw() override; void updateUI() override; @@ -31,8 +32,6 @@ class SamplePlayerTest : public AudioTest { void writeRecordedToFile(); void triggerStartStop( bool start ); - void seek( size_t xPos ); - void printBufferSamples( size_t xPos ); void printSupportedExtensions(); void testConverter(); From 48f916ab3a1ef8977ad4bac03af7cac8a3f5adc2 Mon Sep 17 00:00:00 2001 From: Richard Eakin Date: Wed, 30 Oct 2024 22:26:15 -0700 Subject: [PATCH 38/38] fix SamplePlayerTest's async file load when using BufferPlayerNode --- .../AudioTests/src/SamplePlayerTest.cpp | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/test/_audio/AudioTests/src/SamplePlayerTest.cpp b/test/_audio/AudioTests/src/SamplePlayerTest.cpp index 50f1bc62a4..2a6917f624 100644 --- a/test/_audio/AudioTests/src/SamplePlayerTest.cpp +++ b/test/_audio/AudioTests/src/SamplePlayerTest.cpp @@ -76,9 +76,7 @@ void SamplePlayerTest::setupBufferPlayerNode() auto loadFn = [bufferPlayer, this] { bufferPlayer->loadBuffer( mSourceFile->clone() ); - mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); - CI_LOG_V( "loaded source buffer, frames: " << bufferPlayer->getBuffer()->getNumFrames() ); - + CI_LOG_I( "loaded source buffer, frames: " << bufferPlayer->getBuffer()->getNumFrames() ); }; auto connectFn = [bufferPlayer, this] { @@ -98,12 +96,14 @@ void SamplePlayerTest::setupBufferPlayerNode() mAsyncLoadFuture = std::async( [=] { loadFn(); app::App::get()->dispatchAsync( [=] { + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); connectFn(); } ); } ); } else { loadFn(); + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); connectFn(); }; } @@ -202,9 +202,6 @@ void SamplePlayerTest::printSupportedExtensions() app::console() << endl; } -// TODO: if mLoadAsync is true then use std::async like in setupBufferPlayerNode() -// - for setSourceFile() -// - for bufferPlayer->loadBuffer() void SamplePlayerTest::openFile( const ci::fs::path &fullPath ) { try { @@ -221,8 +218,18 @@ void SamplePlayerTest::openFile( const ci::fs::path &fullPath ) auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); if( bufferPlayer ) { - bufferPlayer->loadBuffer( mSourceFile->clone() ); - mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); + if( mLoadAsync ) { + mAsyncLoadFuture = std::async( [=] { + bufferPlayer->loadBuffer( mSourceFile->clone() ); + app::App::get()->dispatchAsync( [=] { + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); + } ); + } ); + } + else { + bufferPlayer->loadBuffer( mSourceFile->clone() ); + mWaveformPlot.load( bufferPlayer->getBuffer(), app::getWindowBounds() ); + } } else { auto filePlayer = dynamic_pointer_cast( mSamplePlayerNode ); @@ -258,7 +265,7 @@ void SamplePlayerTest::update() } // testing delayed trigger: print SamplePlayerNode start / stop times - if( mSamplePlayerNodeEnabledState != mSamplePlayerNode->isEnabled() ) { + if( mSamplePlayerNode && mSamplePlayerNodeEnabledState != mSamplePlayerNode->isEnabled() ) { mSamplePlayerNodeEnabledState = mSamplePlayerNode->isEnabled(); string stateStr = mSamplePlayerNodeEnabledState ? "started" : "stopped"; CI_LOG_I( "mSamplePlayerNode " << stateStr << " at " << app::getElapsedSeconds() << ", isEof: " << boolalpha << mSamplePlayerNode->isEof() << dec ); @@ -291,7 +298,7 @@ void SamplePlayerTest::draw() audio::BufferRef recordedBuffer = mRecorder->getRecordedCopy(); drawAudioBuffer( *recordedBuffer, app::getWindowBounds() ); } - else { + else if( mSamplePlayerNode ) { auto bufferPlayer = dynamic_pointer_cast( mSamplePlayerNode ); if( bufferPlayer ) mWaveformPlot.draw();