-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathSpatialaudioAPI.h
More file actions
48 lines (42 loc) · 1.88 KB
/
SpatialaudioAPI.h
File metadata and controls
48 lines (42 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*############################################################################*/
/*# #*/
/*# Helpers to mark exported API symbols #*/
/*# #*/
/*# Author(s): Marvin Scholz #*/
/*# Licence: LGPL + proprietary #*/
/*# #*/
/*############################################################################*/
#ifndef SPATIALAUDIO_API_H
#define SPATIALAUDIO_API_H
#include "SpatialaudioConfig.h"
#if defined(__GNUC__) && (__GNUC__ >= 4)
// GCC/Clang symbol visibility
# define SPATIALAUDIO_EXPORT __attribute__((__visibility__("default")))
# define SPATIALAUDIO_IMPORT
#elif (defined(_WIN32) || defined(__CYGWIN__)) && \
!defined(SPATIALAUDIO_STATIC)
// Windows symbol visibility, but only set while building
// or consuming the dynamic library.
# define SPATIALAUDIO_EXPORT __declspec(dllexport)
# define SPATIALAUDIO_IMPORT __declspec(dllimport)
#else
# define SPATIALAUDIO_EXPORT
# define SPATIALAUDIO_IMPORT
#endif
// While we are building the shared library, we need to build
// with the export attribute, else with the import attribute.
#if defined(SPATIALAUDIO_COMPILATION)
# define SPAUDIO_API SPATIALAUDIO_EXPORT
#else
# define SPAUDIO_API SPATIALAUDIO_IMPORT
#endif
// Deprecation annotation
// For GCC 12 and older we must not mix the attribute syntax
// styles, so in that case, we use __attribute__(()) here, else
// we just use the normal C++ attribute syntax
#if defined(__GNUC__) && (__GNUC__ < 13)
# define SPAUDIO_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
# define SPAUDIO_DEPRECATED(msg) [[deprecated(msg)]]
#endif
#endif /* SPATIALAUDIO_API_H */