From 7abbf67a1ae5c4f703e051e640f5cce3f2a5fd7e Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 1 Jun 2016 10:33:28 +0100 Subject: [PATCH] Tweaked the iOS audio device to make the default buffer size play in the simulator --- .../Source/Project/jucer_ProjectContentComponent.cpp | 4 +--- modules/juce_audio_devices/native/juce_ios_Audio.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp index 30baf32985..f65729fdfb 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -453,9 +453,7 @@ Component* ProjectContentComponent::createBuildTab (CompileEngineChildProcess* c #else if (child != nullptr) { - child->crashHandler = [this] (const String& m) { - this->handleCrash (m); - }; + child->crashHandler = [this] (const String& m) { this->handleCrash (m); }; return new BuildTabComponent (child, new ProjucerAppClasses::ErrorListComp (child->errorList)); } diff --git a/modules/juce_audio_devices/native/juce_ios_Audio.cpp b/modules/juce_audio_devices/native/juce_ios_Audio.cpp index e55d1371b7..d4734a0e06 100644 --- a/modules/juce_audio_devices/native/juce_ios_Audio.cpp +++ b/modules/juce_audio_devices/native/juce_ios_Audio.cpp @@ -287,7 +287,14 @@ public: return r; } - int getDefaultBufferSize() override { return 256; } + int getDefaultBufferSize() override + { + #if TARGET_IPHONE_SIMULATOR + return 512; + #else + return 256; + #endif + } String open (const BigInteger& inputChannelsWanted, const BigInteger& outputChannelsWanted,