OpenShot Audio Library | OpenShotAudio: juce_SystemStats.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_SystemStats.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
32 class JUCE_API SystemStats final
33{
34public:
35 //==============================================================================
39 static String getJUCEVersion();
40
41 //==============================================================================
43 enum OperatingSystemType
44 {
45 UnknownOS = 0,
46
47 MacOSX = 0x0100,
49 Windows = 0x0200,
51 Linux = 0x0400,
52 Android = 0x0800,
53 iOS = 0x1000,
54
55 MacOSX_10_4 = MacOSX | 4,
56 MacOSX_10_5 = MacOSX | 5,
57 MacOSX_10_6 = MacOSX | 6,
58 MacOSX_10_7 = MacOSX | 7,
59 MacOSX_10_8 = MacOSX | 8,
60 MacOSX_10_9 = MacOSX | 9,
61 MacOSX_10_10 = MacOSX | 10,
62 MacOSX_10_11 = MacOSX | 11,
63 MacOSX_10_12 = MacOSX | 12,
64 MacOSX_10_13 = MacOSX | 13,
65 MacOSX_10_14 = MacOSX | 14,
66
67 Win2000 = Windows | 1,
68 WinXP = Windows | 2,
69 WinVista = Windows | 3,
70 Windows7 = Windows | 4,
71 Windows8_0 = Windows | 5,
72 Windows8_1 = Windows | 6,
73 Windows10 = Windows | 7
74 };
75
81 static OperatingSystemType getOperatingSystemType();
82
88 static String getOperatingSystemName();
89
91 static bool isOperatingSystem64Bit();
92
96 static String getEnvironmentVariable (const String& name, const String& defaultValue);
97
98 //==============================================================================
102 static String getLogonName();
103
108 static String getFullUserName();
109
111 static String getComputerName();
112
116 static String getUserLanguage();
117
121 static String getUserRegion();
122
128 static String getDisplayLanguage();
129
134 static String getDeviceDescription();
135
139 static String getDeviceManufacturer();
140
146 static StringArray getDeviceIdentifiers();
147
148 //==============================================================================
149 // CPU and memory information..
150
152 static int getNumCpus() noexcept;
153
155 static int getNumPhysicalCpus() noexcept;
156
161 static int getCpuSpeedInMegahertz();
162
166 static String getCpuVendor();
167
171 static String getCpuModel();
172
173 static bool hasMMX() noexcept;
174 static bool has3DNow() noexcept;
175 static bool hasFMA3() noexcept;
176 static bool hasFMA4() noexcept;
177 static bool hasSSE() noexcept;
178 static bool hasSSE2() noexcept;
179 static bool hasSSE3() noexcept;
180 static bool hasSSSE3() noexcept;
181 static bool hasSSE41() noexcept;
182 static bool hasSSE42() noexcept;
183 static bool hasAVX() noexcept;
184 static bool hasAVX2() noexcept;
185 static bool hasAVX512F() noexcept;
186 static bool hasAVX512BW() noexcept;
187 static bool hasAVX512CD() noexcept;
188 static bool hasAVX512DQ() noexcept;
189 static bool hasAVX512ER() noexcept;
190 static bool hasAVX512IFMA() noexcept;
191 static bool hasAVX512PF() noexcept;
192 static bool hasAVX512VBMI() noexcept;
193 static bool hasAVX512VL() noexcept;
194 static bool hasAVX512VPOPCNTDQ() noexcept;
195 static bool hasNeon() noexcept;
197 //==============================================================================
202 static int getMemorySizeInMegabytes();
203
207 static int getPageSize();
208
209 //==============================================================================
214 static String getStackBacktrace();
215
219 using CrashHandlerFunction = void(*)(void*);
220
227 static void setApplicationCrashHandler (CrashHandlerFunction);
228
232 static bool isRunningInAppExtensionSandbox() noexcept;
233
234
235 //==============================================================================
236 // This method was spelt wrong! Please change your code to use getCpuSpeedInMegahertz() instead
237 JUCE_DEPRECATED_WITH_BODY (static int getCpuSpeedInMegaherz(), { return getCpuSpeedInMegahertz(); })
238
239private:
240 SystemStats() = delete; // uses only static methods
241 JUCE_DECLARE_NON_COPYABLE (SystemStats)
242};
243
244} // namespace juce
juce::StringArray
Definition: juce_StringArray.h:35
juce::String
Definition: juce_String.h:39
juce::SystemStats
Definition: juce_SystemStats.h:33
juce::SystemStats::getOperatingSystemName
static String getOperatingSystemName()
juce::SystemStats::CrashHandlerFunction
void(*)(void *) CrashHandlerFunction
Definition: juce_SystemStats.h:219
juce::SystemStats::getUserRegion
static String getUserRegion()
juce::SystemStats::getFullUserName
static String getFullUserName()
juce::SystemStats::getLogonName
static String getLogonName()
juce::SystemStats::getOperatingSystemType
static OperatingSystemType getOperatingSystemType()
juce::SystemStats::getDeviceManufacturer
static String getDeviceManufacturer()
juce::SystemStats::isOperatingSystem64Bit
static bool isOperatingSystem64Bit()
juce::SystemStats::getDisplayLanguage
static String getDisplayLanguage()
juce::SystemStats::getEnvironmentVariable
static String getEnvironmentVariable(const String &name, const String &defaultValue)
juce::SystemStats::OperatingSystemType
OperatingSystemType
Definition: juce_SystemStats.h:44
juce::SystemStats::getComputerName
static String getComputerName()
juce::SystemStats::getDeviceDescription
static String getDeviceDescription()
juce::SystemStats::getUserLanguage
static String getUserLanguage()