Skip to content

Commit ea0e0c2

Browse files
committed
v2 work
1 parent 51c8969 commit ea0e0c2

File tree

62 files changed

+2106
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2106
-743
lines changed

demo/JuceLibraryCode/AppConfig.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// [END_USER_CODE_SECTION]
2222

23-
#define JUCE_PROJUCER_VERSION 0x80003
23+
#define JUCE_PROJUCER_VERSION 0x80004
2424

2525
//==============================================================================
2626
#define JUCE_MODULE_AVAILABLE_juce_analytics 1
@@ -319,14 +319,6 @@
319319
//#define SQUAREPINE_USE_R8BRAIN 0
320320
#endif
321321

322-
#ifndef SQUAREPINE_USE_ELASTIQUE
323-
//#define SQUAREPINE_USE_ELASTIQUE 0
324-
#endif
325-
326-
#ifndef SQUAREPINE_USE_AUFTAKT
327-
//#define SQUAREPINE_USE_AUFTAKT 0
328-
#endif
329-
330322
#ifndef SQUAREPINE_USE_REX_AUDIO_FORMAT
331323
#define SQUAREPINE_USE_REX_AUDIO_FORMAT 1
332324
#endif

demo/SquarePineDemo.jucer

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
<FILE id="L8YGDM" name="SharedObjects.h" compile="0" resource="0" file="source/core/SharedObjects.h"/>
4949
</GROUP>
5050
<GROUP id="{775B98BE-1BF2-5AF2-2E31-B17D3A9219DD}" name="demos">
51+
<FILE id="jr4Dg5" name="AndroidPermissionsDemo.h" compile="0" resource="0"
52+
file="source/demos/AndroidPermissionsDemo.h"/>
5153
<FILE id="R6fnWY" name="AnimationDemo.cpp" compile="0" resource="0"
5254
file="source/demos/AnimationDemo.cpp"/>
5355
<FILE id="CfsYbc" name="AnimationDemo.h" compile="0" resource="0" file="source/demos/AnimationDemo.h"/>
@@ -176,19 +178,21 @@
176178
<VS2022 targetFolder="builds/vs2022" smallIcon="jqPxuh" bigIcon="jqPxuh">
177179
<CONFIGURATIONS>
178180
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" headerPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"
179-
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"/>
181+
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\" winArchitecture="x64"/>
180182
<CONFIGURATION isDebug="0" name="Release" targetName="SquarePine Demo" characterSet="Unicode"
181183
useRuntimeLibDLL="0" linkTimeOptimisation="1" headerPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"
182-
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"/>
184+
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\" winArchitecture="x64"/>
183185
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" winArchitecture="ARM64"/>
184186
<CONFIGURATION isDebug="0" name="Release" targetName="SquarePine Demo" characterSet="Unicode"
185187
useRuntimeLibDLL="0" winArchitecture="ARM64" linkTimeOptimisation="1"/>
186-
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" winArchitecture="ARM"/>
187-
<CONFIGURATION isDebug="0" name="Release" targetName="SquarePine Demo" characterSet="Unicode"
188-
useRuntimeLibDLL="0" winArchitecture="ARM" linkTimeOptimisation="1"/>
189188
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" winArchitecture="Win32"/>
190189
<CONFIGURATION isDebug="0" name="Release" targetName="SquarePine Demo" characterSet="Unicode"
191190
useRuntimeLibDLL="0" winArchitecture="Win32" linkTimeOptimisation="1"/>
191+
<CONFIGURATION isDebug="1" name="Debug" targetName="SquarePine Demo" headerPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"
192+
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\" winArchitecture="ARM64EC"/>
193+
<CONFIGURATION isDebug="0" name="Release" targetName="SquarePine Demo" characterSet="Unicode"
194+
useRuntimeLibDLL="0" linkTimeOptimisation="1" headerPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\"
195+
libraryPath="C:\Users\joelr\Downloads\iCUESDK_4.0.84\" winArchitecture="ARM64EC"/>
192196
</CONFIGURATIONS>
193197
<MODULEPATHS>
194198
<MODULEPATH id="juce_analytics" path="../../JUCE/modules"/>
@@ -222,12 +226,12 @@
222226
<CONFIGURATIONS>
223227
<CONFIGURATION isDebug="1" name="Debug" winArchitecture="Win32"/>
224228
<CONFIGURATION isDebug="0" name="Release" winArchitecture="Win32" linkTimeOptimisation="1"/>
225-
<CONFIGURATION isDebug="1" name="Debug"/>
226-
<CONFIGURATION isDebug="0" name="Release" linkTimeOptimisation="1"/>
227-
<CONFIGURATION isDebug="1" name="Debug" winArchitecture="ARM"/>
228-
<CONFIGURATION isDebug="0" name="Release" winArchitecture="ARM" linkTimeOptimisation="1"/>
229+
<CONFIGURATION isDebug="1" name="Debug" winArchitecture="x64"/>
230+
<CONFIGURATION isDebug="0" name="Release" linkTimeOptimisation="1" winArchitecture="x64"/>
229231
<CONFIGURATION isDebug="1" name="Debug" winArchitecture="ARM64"/>
230232
<CONFIGURATION isDebug="0" name="Release" winArchitecture="ARM64" linkTimeOptimisation="1"/>
233+
<CONFIGURATION isDebug="1" name="Debug" winArchitecture="ARM64EC"/>
234+
<CONFIGURATION isDebug="0" name="Release" winArchitecture="ARM64EC" linkTimeOptimisation="1"/>
231235
</CONFIGURATIONS>
232236
<MODULEPATHS>
233237
<MODULEPATH id="juce_analytics" path="../../JUCE/modules"/>

demo/source/MainModule.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#include <JuceHeader.h>
55

6-
#include <type_traits>
7-
86
/** Config: SP_DEMO_USE_OPENGL
97
108
Enables or disables setting the application up for OpenGL.
@@ -19,8 +17,8 @@
1917
#include "core/GlobalIDs.h"
2018
#include "core/GlobalPathSettings.h"
2119
#include "core/SharedObjects.h"
22-
2320
#include "demos/DemoBase.h"
21+
//#include "demos/AndroidPermissionsDemo.h"
2422
#include "demos/AnimationDemo.h"
2523
#include "demos/CodeEditorDemo.h"
2624
#include "demos/iCUESDKDemo.h"

demo/source/core/SharedObjects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Result SharedObjects::reloadAudioDeviceManagerFromSettings()
190190
{
191191
SQUAREPINE_CRASH_TRACER
192192

193-
if (RuntimePermissions::isGranted (RuntimePermissions::recordAudio))
193+
if (sp::RuntimePermissions::isGranted ("android.permission.RECORD_AUDIO"))
194194
{
195195
#if 0
196196
if (auto* us = applicationProperties.getUserSettings())
@@ -232,7 +232,7 @@ Result SharedObjects::reloadAudioDeviceManagerFromSettings()
232232
return Result::fail (result);
233233
}
234234

235-
RuntimePermissions::request (RuntimePermissions::recordAudio, [this] (bool wasGranted)
235+
sp::RuntimePermissions::request ("android.permission.RECORD_AUDIO", [this] (bool wasGranted)
236236
{
237237
if (wasGranted)
238238
MessageManager::callAsync ([this]() { reloadAudioDeviceManagerFromSettings(); });
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/** */
2+
class AndroidPermissionDemo final : public DemoBase
3+
{
4+
public:
5+
/** */
6+
AndroidPermissionDemo (SharedObjects& sharedObjs) :
7+
DemoBase (sharedObjs, NEEDS_TRANS ("Android Permissions"))
8+
{
9+
}
10+
11+
//==============================================================================
12+
/** @internal */
13+
void resized() override
14+
{
15+
}
16+
17+
/** @internal */
18+
void updateWithNewTranslations() override
19+
{
20+
repaint();
21+
}
22+
23+
#if JUCE_ANDROID
24+
#endif // JUCE_ANDROID
25+
26+
private:
27+
//==============================================================================
28+
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AndroidPermissionDemo)
29+
};

demo/source/main/Main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class TrayIconComponent final : public SystemTrayIconComponent
2828
for (int i = desktop.getNumComponents(); --i >= 0;)
2929
desktop.getComponent (i)->toFront (true);
3030

31-
// NB: by this point, the mouse buttons are... well, up/inactive.
31+
// NB: by this point, the mouse buttons are... well, up/inactive,
32+
// hence why we store the event mods on mouse down to know what we started with.
3233
if (lastEventMods.isPopupMenu()
3334
&& commandManager.getNumCommands() > 0)
3435
{
@@ -47,7 +48,7 @@ class TrayIconComponent final : public SystemTrayIconComponent
4748
private:
4849
//==============================================================================
4950
ApplicationCommandManager& commandManager;
50-
ModifierKeys lastEventMods;
51+
ModifierKeys lastEventMods; // Stored on mouse down, cleared on mouse up.
5152

5253
//==============================================================================
5354
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TrayIconComponent)
@@ -64,6 +65,7 @@ class MainWindow final : public DocumentWindow
6465
customLookAndFeel (sharedObjects),
6566
mainComponent (sharedObjects)
6667
{
68+
/*
6769
RuntimePermissions::request (RuntimePermissions::recordAudio, [this] (bool)
6870
{
6971
audioWaiter.signal();
@@ -76,7 +78,7 @@ class MainWindow final : public DocumentWindow
7678
closeButtonPressed();
7779
return;
7880
}
79-
81+
*/
8082
googleAnalyticsReporter->startSession();
8183

8284
setUsingNativeTitleBar (true);

demo/source/main/MainComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class MainComponent final : public juce::Component,
55
{
66
public:
77
/** */
8-
MainComponent (SharedObjects& sharedObjects);
8+
MainComponent (SharedObjects&);
99
/** */
1010
~MainComponent() override;
1111

0 commit comments

Comments
 (0)