OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
juce_core.cpp
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
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
23#ifdef JUCE_CORE_H_INCLUDED
24 /* When you add this cpp file to your project, you mustn't include it in a file where you've
25 already included any other headers - just put it inside a file on its own, possibly with your config
26 flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
27 header files that the compiler may be using.
28 */
29 #error "Incorrect use of JUCE cpp file"
30#endif
31
32#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
33#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
34#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
35#define JUCE_CORE_INCLUDE_JNI_HELPERS 1
36
37#include "juce_core.h"
38
39#include <cctype>
40#include <cstdarg>
41#include <locale>
42#include <thread>
43
44#if ! (JUCE_ANDROID || JUCE_BSD)
45 #include <sys/timeb.h>
46 #include <cwctype>
47#endif
48
49#if JUCE_WINDOWS
50 #include <ctime>
51
52 #if JUCE_MINGW
53 #include <ws2spi.h>
54 #include <cstdio>
55 #include <locale.h>
56 #else
57 JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4091)
58 #include <Dbghelp.h>
59 JUCE_END_IGNORE_WARNINGS_MSVC
60
61 #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
62 #pragma comment (lib, "DbgHelp.lib")
63 #endif
64 #endif
65
66#else
67 #if JUCE_LINUX || JUCE_BSD || JUCE_ANDROID
68 #include <sys/types.h>
69 #include <sys/socket.h>
70 #include <sys/errno.h>
71 #include <unistd.h>
72 #include <netinet/in.h>
73 #endif
74
75 #if JUCE_WASM
76 #include <stdio.h>
77 #include <sys/types.h>
78 #include <sys/socket.h>
79 #include <errno.h>
80 #include <unistd.h>
81 #include <netinet/in.h>
82 #include <sys/stat.h>
83 #endif
84
85 #if JUCE_LINUX || JUCE_BSD
86 #include <stdio.h>
87 #include <langinfo.h>
88 #include <ifaddrs.h>
89 #include <sys/resource.h>
90
91 #if JUCE_USE_CURL
92 #include <curl/curl.h>
93 #endif
94 #endif
95
96 #include <pwd.h>
97 #include <fcntl.h>
98 #include <netdb.h>
99 #include <arpa/inet.h>
100 #include <netinet/tcp.h>
101 #include <sys/time.h>
102 #include <net/if.h>
103 #include <sys/ioctl.h>
104
105 #if ! (JUCE_ANDROID || JUCE_WASM)
106 #include <execinfo.h>
107 #endif
108#endif
109
110#if JUCE_MAC || JUCE_IOS
111 #include <xlocale.h>
112 #include <mach/mach.h>
113#endif
114
115#if JUCE_ANDROID
116 #include <ifaddrs.h>
117 #include <android/log.h>
118#endif
119
120#undef check
121
122//==============================================================================
123#include "containers/juce_AbstractFifo.cpp"
124#include "containers/juce_ArrayBase.cpp"
125#include "containers/juce_ListenerList.cpp"
126#include "containers/juce_NamedValueSet.cpp"
127#include "containers/juce_OwnedArray.cpp"
128#include "containers/juce_PropertySet.cpp"
129#include "containers/juce_ReferenceCountedArray.cpp"
130#include "containers/juce_SparseSet.cpp"
131#include "files/juce_DirectoryIterator.cpp"
132#include "files/juce_RangedDirectoryIterator.cpp"
133#include "files/juce_File.cpp"
134#include "files/juce_FileInputStream.cpp"
135#include "files/juce_FileOutputStream.cpp"
136#include "files/juce_FileSearchPath.cpp"
137#include "files/juce_TemporaryFile.cpp"
138#include "logging/juce_FileLogger.cpp"
139#include "logging/juce_Logger.cpp"
140#include "maths/juce_BigInteger.cpp"
141#include "maths/juce_Expression.cpp"
142#include "maths/juce_Random.cpp"
143#include "memory/juce_MemoryBlock.cpp"
144#include "memory/juce_AllocationHooks.cpp"
145#include "misc/juce_RuntimePermissions.cpp"
146#include "misc/juce_Result.cpp"
147#include "misc/juce_Uuid.cpp"
148#include "misc/juce_ConsoleApplication.cpp"
149#include "misc/juce_ScopeGuard.cpp"
150#include "network/juce_MACAddress.cpp"
151#include "network/juce_NamedPipe.cpp"
152#include "network/juce_Socket.cpp"
153#include "network/juce_IPAddress.cpp"
154#include "streams/juce_BufferedInputStream.cpp"
155#include "streams/juce_FileInputSource.cpp"
156#include "streams/juce_InputStream.cpp"
157#include "streams/juce_MemoryInputStream.cpp"
158#include "streams/juce_MemoryOutputStream.cpp"
159#include "streams/juce_SubregionStream.cpp"
160#include "system/juce_SystemStats.cpp"
161#include "text/juce_CharacterFunctions.cpp"
162#include "text/juce_Identifier.cpp"
163#include "text/juce_LocalisedStrings.cpp"
164#include "text/juce_String.cpp"
165#include "streams/juce_OutputStream.cpp"
166#include "text/juce_StringArray.cpp"
167#include "text/juce_StringPairArray.cpp"
168#include "text/juce_StringPool.cpp"
169#include "text/juce_TextDiff.cpp"
170#include "text/juce_Base64.cpp"
171#include "threads/juce_ReadWriteLock.cpp"
172#include "threads/juce_Thread.cpp"
173#include "threads/juce_ThreadPool.cpp"
174#include "threads/juce_TimeSliceThread.cpp"
175#include "time/juce_PerformanceCounter.cpp"
176#include "time/juce_RelativeTime.cpp"
177#include "time/juce_Time.cpp"
178#include "unit_tests/juce_UnitTest.cpp"
179#include "containers/juce_Variant.cpp"
180#include "javascript/juce_JSON.cpp"
181#include "javascript/juce_JSONUtils.cpp"
182#include "javascript/juce_Javascript.cpp"
183#include "containers/juce_DynamicObject.cpp"
184#include "xml/juce_XmlDocument.cpp"
185#include "xml/juce_XmlElement.cpp"
186#include "zip/juce_GZIPDecompressorInputStream.cpp"
187#include "zip/juce_GZIPCompressorOutputStream.cpp"
188#include "zip/juce_ZipFile.cpp"
189#include "files/juce_FileFilter.cpp"
190#include "files/juce_WildcardFileFilter.cpp"
191#include "native/juce_ThreadPriorities_native.h"
192#include "native/juce_PlatformTimerListener.h"
193
194//==============================================================================
195#if ! JUCE_WINDOWS
196 #include "native/juce_SharedCode_posix.h"
197 #include "native/juce_NamedPipe_posix.cpp"
198 #if ! JUCE_ANDROID || __ANDROID_API__ >= 24
199 #include "native/juce_IPAddress_posix.h"
200 #endif
201#endif
202
203//==============================================================================
204#if JUCE_MAC || JUCE_IOS
205 #include "native/juce_Files_mac.mm"
206 #include "native/juce_Network_mac.mm"
207 #include "native/juce_Strings_mac.mm"
208 #include "native/juce_SharedCode_intel.h"
209 #include "native/juce_SystemStats_mac.mm"
210 #include "native/juce_Threads_mac.mm"
211 #include "native/juce_PlatformTimer_generic.cpp"
212 #include "native/juce_Process_mac.mm"
213
214//==============================================================================
215#elif JUCE_WINDOWS
216 #include "native/juce_Files_windows.cpp"
217 #include "native/juce_Network_windows.cpp"
218 #include "native/juce_Registry_windows.cpp"
219 #include "native/juce_SystemStats_windows.cpp"
220 #include "native/juce_Threads_windows.cpp"
221 #include "native/juce_PlatformTimer_windows.cpp"
222
223//==============================================================================
224#elif JUCE_LINUX
225 #include "native/juce_CommonFile_linux.cpp"
226 #include "native/juce_Files_linux.cpp"
227 #include "native/juce_Network_linux.cpp"
228 #if JUCE_USE_CURL
229 #include "native/juce_Network_curl.cpp"
230 #endif
231 #include "native/juce_SystemStats_linux.cpp"
232 #include "native/juce_Threads_linux.cpp"
233 #include "native/juce_PlatformTimer_generic.cpp"
234
235//==============================================================================
236#elif JUCE_BSD
237 #include "native/juce_CommonFile_linux.cpp"
238 #include "native/juce_Files_linux.cpp"
239 #include "native/juce_Network_linux.cpp"
240 #if JUCE_USE_CURL
241 #include "native/juce_Network_curl.cpp"
242 #endif
243 #include "native/juce_SharedCode_intel.h"
244 #include "native/juce_SystemStats_linux.cpp"
245 #include "native/juce_Threads_linux.cpp"
246 #include "native/juce_PlatformTimer_generic.cpp"
247
248//==============================================================================
249#elif JUCE_ANDROID
250 #include "native/juce_CommonFile_linux.cpp"
251 #include "native/juce_JNIHelpers_android.cpp"
252 #include "native/juce_Files_android.cpp"
253 #include "native/juce_Misc_android.cpp"
254 #include "native/juce_Network_android.cpp"
255 #include "native/juce_SystemStats_android.cpp"
256 #include "native/juce_Threads_android.cpp"
257 #include "native/juce_RuntimePermissions_android.cpp"
258 #include "native/juce_PlatformTimer_generic.cpp"
259
260//==============================================================================
261#elif JUCE_WASM
262 #include "native/juce_SystemStats_wasm.cpp"
263 #include "native/juce_PlatformTimer_generic.cpp"
264#endif
265
266#include "files/juce_common_MimeTypes.h"
267#include "files/juce_common_MimeTypes.cpp"
268#include "native/juce_AndroidDocument_android.cpp"
269#include "threads/juce_HighResolutionTimer.cpp"
270#include "threads/juce_WaitableEvent.cpp"
271#include "network/juce_URL.cpp"
272
273#if ! JUCE_WASM
274 #include "threads/juce_ChildProcess.cpp"
275 #include "network/juce_WebInputStream.cpp"
276 #include "streams/juce_URLInputSource.cpp"
277#endif
278
279//==============================================================================
280#if JUCE_UNIT_TESTS
281 #include "containers/juce_HashMap_test.cpp"
282 #include "containers/juce_Optional_test.cpp"
283 #include "containers/juce_Enumerate_test.cpp"
284 #include "maths/juce_MathsFunctions_test.cpp"
285 #include "misc/juce_EnumHelpers_test.cpp"
286 #include "containers/juce_FixedSizeFunction_test.cpp"
287 #include "javascript/juce_JSONSerialisation_test.cpp"
288 #include "memory/juce_SharedResourcePointer_test.cpp"
289 #if JUCE_MAC || JUCE_IOS
290 #include "native/juce_ObjCHelpers_mac_test.mm"
291 #endif
292#endif
293
294//==============================================================================
295 namespace juce
296{
297/*
298 As the very long class names here try to explain, the purpose of this code is to cause
299 a linker error if not all of your compile units are consistent in the options that they
300 enable before including JUCE headers. The reason this is important is that if you have
301 two cpp files, and one includes the juce headers with debug enabled, and the other doesn't,
302 then each will be generating code with different memory layouts for the classes, and
303 you'll get subtle and hard-to-track-down memory corruption bugs!
304*/
305#if JUCE_DEBUG
306 this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode
307 ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode() noexcept {}
308#else
309 this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode
310 ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode() noexcept {}
311#endif
312}