OpenShot Audio Library | OpenShotAudio 0.3.2
Loading...
Searching...
No Matches
juce_core.cpp
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
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 <locale>
40#include <cctype>
41#include <cstdarg>
42
43#if ! JUCE_ANDROID
44 #include <sys/timeb.h>
45 #include <cwctype>
46#endif
47
48#if JUCE_WINDOWS
49 #include <ctime>
50
51 #if JUCE_MINGW
52 #include <ws2spi.h>
53 #include <cstdio>
54 #include <locale.h>
55 #else
56 #pragma warning (push)
57 #pragma warning (disable: 4091)
58 #include <Dbghelp.h>
59 #pragma warning (pop)
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_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_LINUX
76 #include <stdio.h>
77 #include <langinfo.h>
78 #include <ifaddrs.h>
79 #include <sys/resource.h>
80
81 #if JUCE_USE_CURL
82 #include <curl/curl.h>
83 #endif
84 #endif
85
86 #include <pwd.h>
87 #include <fcntl.h>
88 #include <netdb.h>
89 #include <arpa/inet.h>
90 #include <netinet/tcp.h>
91 #include <sys/time.h>
92 #include <net/if.h>
93 #include <sys/ioctl.h>
94
95 #if ! JUCE_ANDROID && defined(__GLIBC__)
96 #include <execinfo.h>
97 #endif
98#endif
99
100#if JUCE_MAC || JUCE_IOS
101 #include <xlocale.h>
102 #include <mach/mach.h>
103 #include <signal.h>
104#endif
105
106#if JUCE_ANDROID
107 #include <ifaddrs.h>
108 #include <android/log.h>
109#endif
110
111#undef check
112
113//==============================================================================
114#ifndef JUCE_STANDALONE_APPLICATION
115 JUCE_COMPILER_WARNING ("Please re-save your project with the latest Projucer version to avoid this warning")
116 #define JUCE_STANDALONE_APPLICATION 0
117#endif
118
119//==============================================================================
120#include "containers/juce_AbstractFifo.cpp"
121#include "containers/juce_ArrayBase.cpp"
122#include "containers/juce_NamedValueSet.cpp"
123#include "containers/juce_OwnedArray.cpp"
124#include "containers/juce_PropertySet.cpp"
125#include "containers/juce_ReferenceCountedArray.cpp"
126#include "containers/juce_SparseSet.cpp"
127#include "files/juce_DirectoryIterator.cpp"
128#include "files/juce_File.cpp"
129#include "files/juce_FileInputStream.cpp"
130#include "files/juce_FileOutputStream.cpp"
131#include "files/juce_FileSearchPath.cpp"
132#include "files/juce_TemporaryFile.cpp"
133#include "logging/juce_FileLogger.cpp"
134#include "logging/juce_Logger.cpp"
135#include "maths/juce_BigInteger.cpp"
136#include "maths/juce_Expression.cpp"
137#include "maths/juce_Random.cpp"
138#include "memory/juce_MemoryBlock.cpp"
139#include "misc/juce_RuntimePermissions.cpp"
140#include "misc/juce_Result.cpp"
141#include "misc/juce_Uuid.cpp"
142#include "misc/juce_ConsoleApplication.cpp"
143#include "network/juce_MACAddress.cpp"
144#include "network/juce_NamedPipe.cpp"
145#include "network/juce_Socket.cpp"
146#include "network/juce_IPAddress.cpp"
147#include "streams/juce_BufferedInputStream.cpp"
148#include "streams/juce_FileInputSource.cpp"
149#include "streams/juce_InputStream.cpp"
150#include "streams/juce_MemoryInputStream.cpp"
151#include "streams/juce_MemoryOutputStream.cpp"
152#include "streams/juce_SubregionStream.cpp"
153#include "system/juce_SystemStats.cpp"
154#include "text/juce_CharacterFunctions.cpp"
155#include "text/juce_Identifier.cpp"
156#include "text/juce_LocalisedStrings.cpp"
157#include "text/juce_String.cpp"
158#include "streams/juce_OutputStream.cpp"
159#include "text/juce_StringArray.cpp"
160#include "text/juce_StringPairArray.cpp"
161#include "text/juce_StringPool.cpp"
162#include "text/juce_TextDiff.cpp"
163#include "text/juce_Base64.cpp"
164#include "threads/juce_ReadWriteLock.cpp"
165#include "threads/juce_Thread.cpp"
166#include "threads/juce_ThreadPool.cpp"
167#include "threads/juce_TimeSliceThread.cpp"
168#include "time/juce_PerformanceCounter.cpp"
169#include "time/juce_RelativeTime.cpp"
170#include "time/juce_Time.cpp"
171#include "unit_tests/juce_UnitTest.cpp"
172#include "containers/juce_Variant.cpp"
173#include "javascript/juce_JSON.cpp"
174#include "javascript/juce_Javascript.cpp"
175#include "containers/juce_DynamicObject.cpp"
176#include "xml/juce_XmlDocument.cpp"
177#include "xml/juce_XmlElement.cpp"
178#include "zip/juce_GZIPDecompressorInputStream.cpp"
179#include "zip/juce_GZIPCompressorOutputStream.cpp"
180#include "zip/juce_ZipFile.cpp"
181#include "files/juce_FileFilter.cpp"
182#include "files/juce_WildcardFileFilter.cpp"
183
184//==============================================================================
185#if ! JUCE_WINDOWS
186 #include "native/juce_posix_SharedCode.h"
187 #include "native/juce_posix_NamedPipe.cpp"
188 #if ! JUCE_ANDROID || __ANDROID_API__ >= 24
189 #include "native/juce_posix_IPAddress.h"
190 #endif
191#endif
192
193//==============================================================================
194#if JUCE_MAC || JUCE_IOS
195 #include "native/juce_mac_Files.mm"
196 #include "native/juce_mac_Network.mm"
197 #include "native/juce_mac_Strings.mm"
198 #include "native/juce_mac_SystemStats.mm"
199 #include "native/juce_mac_Threads.mm"
200
201//==============================================================================
202#elif JUCE_WINDOWS
203 #include "native/juce_win32_Files.cpp"
204 #include "native/juce_win32_Network.cpp"
205 #include "native/juce_win32_Registry.cpp"
206 #include "native/juce_win32_SystemStats.cpp"
207 #include "native/juce_win32_Threads.cpp"
208
209//==============================================================================
210#elif JUCE_LINUX
211 #include "native/juce_linux_CommonFile.cpp"
212 #include "native/juce_linux_Files.cpp"
213 #include "native/juce_linux_Network.cpp"
214 #if JUCE_USE_CURL
215 #include "native/juce_curl_Network.cpp"
216 #endif
217 #include "native/juce_linux_SystemStats.cpp"
218 #include "native/juce_linux_Threads.cpp"
219
220//==============================================================================
221#elif JUCE_ANDROID
222 #include "native/juce_linux_CommonFile.cpp"
223 #include "native/juce_android_JNIHelpers.cpp"
224 #include "native/juce_android_Files.cpp"
225 #include "native/juce_android_Misc.cpp"
226 #include "native/juce_android_Network.cpp"
227 #include "native/juce_android_SystemStats.cpp"
228 #include "native/juce_android_Threads.cpp"
229 #include "native/juce_android_RuntimePermissions.cpp"
230
231#endif
232
233#include "threads/juce_ChildProcess.cpp"
234#include "threads/juce_HighResolutionTimer.cpp"
235#include "threads/juce_WaitableEvent.cpp"
236#include "network/juce_URL.cpp"
237#include "network/juce_WebInputStream.cpp"
238#include "streams/juce_URLInputSource.cpp"
239
240//==============================================================================
241#if JUCE_UNIT_TESTS
242 #include "containers/juce_HashMap_test.cpp"
243#endif
244
245//==============================================================================
246namespace juce
247{
248/*
249 As the very long class names here try to explain, the purpose of this code is to cause
250 a linker error if not all of your compile units are consistent in the options that they
251 enable before including JUCE headers. The reason this is important is that if you have
252 two cpp files, and one includes the juce headers with debug enabled, and the other doesn't,
253 then each will be generating code with different memory layouts for the classes, and
254 you'll get subtle and hard-to-track-down memory corruption bugs!
255*/
256#if JUCE_DEBUG
257 this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode
258 ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_debug_mode() noexcept {}
259#else
260 this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode
261 ::this_will_fail_to_link_if_some_of_your_compile_units_are_built_in_release_mode() noexcept {}
262#endif
263}