Skip to content

Commit 33fac6e

Browse files
committed
Added macros to represent the version of the modules.
And applied this to the Demo itself + fixed a quick audio bug.
1 parent 5840467 commit 33fac6e

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

demo/SquarePineDemo.jucer

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<JUCERPROJECT id="jumC7J" name="SquarePine Demo" projectType="guiapp" jucerFormatVersion="1"
44
companyName="SquarePine" companyCopyright="SquarePine (C)" companyWebsite="squarepine.io"
55
companyEmail="joel.r.langlois@gmail.com" useAppConfig="1" addUsingNamespaceToJuceHeader="1"
6-
maxBinaryFileSize="20971520" cppLanguageStandard="latest" defines="_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING=1">
6+
maxBinaryFileSize="20971520" cppLanguageStandard="latest" defines="_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING=1"
7+
version="1.6.0">
78
<MAINGROUP id="m6sryU" name="SquarePine Demo">
89
<GROUP id="{A87106D4-97C8-8B6E-ABEF-2127F24885D5}" name="assets">
910
<GROUP id="{AA4AFFDE-833A-2EE9-7061-76FBD8E33B4A}" name="Android">
@@ -252,9 +253,7 @@
252253
</VS2022>
253254
<XCODE_IPHONE targetFolder="builds/ios" iosScreenOrientation="UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight,UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown"
254255
iPadScreenOrientation="UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight,UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown"
255-
UIFileSharingEnabled="1" UISupportsDocumentBrowser="1" microphonePermissionNeeded="1"
256-
cameraPermissionNeeded="1" iosBluetoothPermissionNeeded="1" iosContentSharing="1"
257-
iosBackgroundAudio="1" iosBackgroundBle="1" smallIcon="jqPxuh"
256+
UIFileSharingEnabled="1" UISupportsDocumentBrowser="1" smallIcon="jqPxuh"
258257
bigIcon="jqPxuh">
259258
<CONFIGURATIONS>
260259
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" recommendedWarnings="LLVM"/>
@@ -289,8 +288,7 @@
289288
<MODULEPATH id="squarepine_cryptography" path="../modules"/>
290289
</MODULEPATHS>
291290
</XCODE_IPHONE>
292-
<XCODE_MAC targetFolder="builds/macos" xcodeValidArchs="arm64,x86_64" applicationCategory="public.app-category.utilities"
293-
microphonePermissionNeeded="1" cameraPermissionNeeded="1" iosBluetoothPermissionNeeded="1"
291+
<XCODE_MAC targetFolder="builds/macos" xcodeValidArchs="arm64,x86_64" applicationCategory="public.app-category.games"
294292
smallIcon="jqPxuh" bigIcon="jqPxuh">
295293
<CONFIGURATIONS>
296294
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" recommendedWarnings="LLVM"

demo/source/demos/EffectChainDemo.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ EffectChainDemo::EffectChainDemo (SharedObjects& sharedObjs) :
440440

441441
EffectChainDemo::~EffectChainDemo()
442442
{
443+
audioProcessorPlayer.setProcessor (nullptr);
443444
sharedObjects.audioDeviceManager.removeChangeListener (this);
444445
sharedObjects.audioDeviceManager.removeAudioCallback (&audioProcessorPlayer);
445-
audioProcessorPlayer.setProcessor (nullptr);
446446
}
447447

448448
void EffectChainDemo::changeListenerCallback (ChangeBroadcaster*)
@@ -546,6 +546,8 @@ void EffectChainDemo::paint (Graphics& g)
546546

547547
void EffectChainDemo::updateFromAudioDeviceManager()
548548
{
549+
rewindAndStop();
550+
549551
timeKeeper.setSamplingRate (sharedObjects.audioDeviceManager);
550552
}
551553

demo/source/main/Main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class SquarePineDemoApplication final : public sp::SimpleApplication
151151
/** @internal */
152152
String getAppName() const override { return ProjectInfo::projectName; }
153153
/** @internal */
154-
String getAppVersion() const override { return ProjectInfo::versionString; }
154+
String getAppVersion() const override { return SQUAREPINE_VERSION_STRING; }
155155

156156
//==============================================================================
157157
/** @internal */
@@ -160,8 +160,8 @@ class SquarePineDemoApplication final : public sp::SimpleApplication
160160
String windowName;
161161
windowName
162162
<< ProjectInfo::companyName
163-
<< " - " << ProjectInfo::projectName
164-
<< " - v" << ProjectInfo::versionString;
163+
<< " - " << getAppName()
164+
<< " - v" << getAppVersion();
165165

166166
#if JUCE_DEBUG
167167
windowName << " [DEBUG]";

modules/squarepine_core/squarepine_core.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
#include <stack>
3333
#include <type_traits>
3434

35+
//==============================================================================
36+
/** Current SquarePine major version number. */
37+
#define SQUAREPINE_MAJOR_VERSION 1
38+
/** Current SquarePine minor version number. */
39+
#define SQUAREPINE_MINOR_VERSION 6
40+
/** Current SquarePine build version number. */
41+
#define SQUAREPINE_BUILDNUMBER 0
42+
/** Current SquarePine version number as a string. */
43+
#define SQUAREPINE_VERSION_STRING "1.6.0"
44+
/** Current SquarePine version number as a string. */
45+
#define SQUAREPINE_FULL_VERSION_STRING "SquarePine v1.6.0"
46+
3547
//==============================================================================
3648
#undef JUCE_CORE_INCLUDE_JNI_HELPERS
3749
#define JUCE_CORE_INCLUDE_JNI_HELPERS 1

0 commit comments

Comments
 (0)