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