annotate Isolated/SoundDecoder.h @ 56:208a9ed20087

Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
author Eric Wing <ewing@anscamobile.com>
date Tue, 29 May 2012 19:43:23 -0700
parents 71b465ff0622
children be97ae4f30c0
rev   line source
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
1
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
2 /*
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
3 * This is a wrapper interface that tries to provide a similar
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
4 * front-end interface to SDL_sound.
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
5 */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
6
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
7 #ifndef SOUNDDECODER_H
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
8 #define SOUNDDECODER_H
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
9
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
10 #ifdef __cplusplus
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
11 extern "C" {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
12 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
13
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
14 #if defined(_WIN32)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
15 #if defined(SOUND_DECODER_BUILD_LIBRARY)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
16 #define SOUND_DECODER_DECLSPEC __declspec(dllexport)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
17 #else
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
18 #define SOUND_DECODER_DECLSPEC __declspec(dllimport)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
19 #endif
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
20 #else
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
21 #if defined(SOUND_DECODER_BUILD_LIBRARY)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
22 #if defined (__GNUC__) && __GNUC__ >= 4
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
23 #define SOUND_DECODER_DECLSPEC __attribute__((visibility("default")))
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
24 #else
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
25 #define SOUND_DECODER_DECLSPEC
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
26 #endif
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
27 #else
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
28 #define SOUND_DECODER_DECLSPEC
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
29 #endif
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
30 #endif
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
31
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
32 #if defined(_WIN32)
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
33 #define SOUND_DECODER_CALL __cdecl
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
34 #else
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
35 #define SOUND_DECODER_CALL
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
36 #endif
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
37
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
38 #include <stdint.h>
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
39 #include <stddef.h>
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
40
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
41 #include "al.h" /* OpenAL */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
42
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
43 /* Compatibility defines for SDL */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
44 #define AUDIO_U8 0x0008
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
45 #define AUDIO_S8 0x8008
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
46 #define AUDIO_U16LSB 0x0010
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
47 #define AUDIO_S16LSB 0x8010
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
48 #define AUDIO_U16MSB 0x1010
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
49 #define AUDIO_S16MSB 0x9010
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
50 #define AUDIO_U16 AUDIO_U16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
51 #define AUDIO_S16 AUDIO_S16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
52
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
53 #ifdef ANDROID_NDK
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
54 #include <endian.h>
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
55 #if _BYTE_ORDER == _BIG_ENDIAN
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
56 #define __BIG_ENDIAN__ 1
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
57 #elif _BYTE_ORDER == _LITTLE_ENDIAN
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
58 #define __LITTLE_ENDIAN__ 1
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
59 #else
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
60 #warning "Android falling back to __LITTLE_ENDIAN__"
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
61 #define __LITTLE_ENDIAN__ 1
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
62 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
63 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
64
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
65 #if __BIG_ENDIAN__
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
66 #warning "Using __BIG_ENDIAN__"
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
67 #define AUDIO_U16SYS AUDIO_U16MSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
68 #define AUDIO_S16SYS AUDIO_S16MSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
69 #elif __LITTLE_ENDIAN__
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
70 #define AUDIO_U16SYS AUDIO_U16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
71 #define AUDIO_S16SYS AUDIO_S16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
72 #else
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
73 #warning "Using __LITTLE_ENDIAN__ as fallback"
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
74 #define AUDIO_U16SYS AUDIO_U16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
75 #define AUDIO_S16SYS AUDIO_S16LSB
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
76 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
77
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
78 struct ALmixer_RWops;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
79
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
80 typedef enum
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
81 {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
82 SOUND_SAMPLEFLAG_NONE = 0,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
83 SOUND_SAMPLEFLAG_CANSEEK = 1,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
84 SOUND_SAMPLEFLAG_EOF = 1 << 29,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
85 SOUND_SAMPLEFLAG_ERROR = 1 << 30,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
86 SOUND_SAMPLEFLAG_EAGAIN = 1 << 31
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
87 } SoundDecoder_SampleFlags;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
88
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
89 #define Sound_SampleFlags SoundDecoder_SampleFlags;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
90
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
91 typedef struct SoundDecoder_AudioInfo
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
92 {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
93 //uint16_t format; /**< Equivalent of SDL_AudioSpec.format. */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
94 ALushort format; /**< Equivalent of SDL_AudioSpec.format. */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
95 ALubyte channels;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
96 // uint8_t channels;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
97 //uint32_t rate;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
98 ALuint rate;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
99 } SoundDecoder_AudioInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
100
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
101 //#define Sound_AudioInfo SoundDecoder_AudioInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
102 typedef struct SoundDecoder_AudioInfo Sound_AudioInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
103
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
104
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
105
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
106 typedef struct SoundDecoder_DecoderInfo
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
107 {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
108 const char** extensions;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
109 const char* description;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
110 const char* author;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
111 const char* url;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
112 } SoundDecoder_DecoderInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
113
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
114 //#define Sound_DecoderInfo SoundDecoder_DecoderInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
115 typedef struct SoundDecoder_DecoderInfo Sound_DecoderInfo;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
116
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
117
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
118
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
119 typedef struct SoundDecoder_Sample
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
120 {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
121 void* opaque;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
122 const SoundDecoder_DecoderInfo* decoder;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
123 SoundDecoder_AudioInfo desired;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
124 SoundDecoder_AudioInfo actual;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
125 void *buffer;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
126 size_t buffer_size;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
127 SoundDecoder_SampleFlags flags;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
128 } SoundDecoder_Sample;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
129
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
130 //#define Sound_Sample SoundDecoder_Sample;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
131 typedef struct SoundDecoder_Sample Sound_Sample;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
132
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
133
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
134 typedef struct SoundDecoder_Version
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
135 {
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
136 int major;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
137 int minor;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
138 int patch;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
139 } SoundDecoder_Version;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
140
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
141 //#define Sound_Version SoundDecoder_Version;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
142 typedef struct SoundDecoder_Version Sound_Version;
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
143
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
144
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
145 #define SOUNDDECODER_VER_MAJOR 0
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
146 #define SOUNDDECODER_VER_MINOR 0
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
147 #define SOUNDDECODER_VER_PATCH 1
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
148
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
149 #define SOUNDDECODER_VERSION(x) \
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
150 { \
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
151 (x)->major = SOUNDDECODER_VER_MAJOR; \
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
152 (x)->minor = SOUNDDECODER_VER_MINOR; \
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
153 (x)->patch = SOUNDDECODER_VER_PATCH; \
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
154 }
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
155
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
156 #define SOUND_VERSION SOUNDDECODER_VERSION
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
157
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
158 extern SOUND_DECODER_DECLSPEC void SOUND_DECODER_CALL SoundDecoder_GetLinkedVersion(SoundDecoder_Version *ver);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
159 #define Sound_GetLinkedVersion SoundDecoder_GetLinkedVersion
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
160
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
161 extern SOUND_DECODER_DECLSPEC int SOUND_DECODER_CALL SoundDecoder_Init(void);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
162 #define Sound_Init SoundDecoder_Init
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
163
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
164 extern SOUND_DECODER_DECLSPEC void SOUND_DECODER_CALL SoundDecoder_Quit(void);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
165 #define Sound_Quit SoundDecoder_Quit
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
166
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
167
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
168 extern SOUND_DECODER_DECLSPEC const SOUND_DECODER_CALL SoundDecoder_DecoderInfo** SoundDecoder_AvailableDecoders(void);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
169 #define Sound_AvailableDecoders SoundDecoder_AvailableDecoders
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
170
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
171
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
172 extern SOUND_DECODER_DECLSPEC const char* SOUND_DECODER_CALL SoundDecoder_GetError(void);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
173 #define Sound_GetError SoundDecoder_GetError
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
174
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
175
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
176 extern SOUND_DECODER_DECLSPEC void SOUND_DECODER_CALL SoundDecoder_ClearError(void);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
177 #define Sound_ClearError SoundDecoder_ClearError
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
178
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
179
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
180
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
181 extern SOUND_DECODER_DECLSPEC SoundDecoder_Sample* SOUND_DECODER_CALL SoundDecoder_NewSample(
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
182 struct ALmixer_RWops* rw_ops,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
183 const char* ext,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
184 SoundDecoder_AudioInfo* desired,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
185 size_t buffer_size);
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
186 #define Sound_NewSample SoundDecoder_NewSample
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
187
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
188 extern SOUND_DECODER_DECLSPEC SoundDecoder_Sample* SOUND_DECODER_CALL SoundDecoder_NewSampleFromFile(const char* file_name,
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
189 SoundDecoder_AudioInfo* desired,
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
190 size_t bufferSize);
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
191 #define Sound_NewSampleFromFile SoundDecoder_NewSampleFromFile
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
192
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
193
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
194 extern SOUND_DECODER_DECLSPEC void SOUND_DECODER_CALL SoundDecoder_FreeSample(SoundDecoder_Sample* sound_sample);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
195 #define Sound_FreeSample SoundDecoder_FreeSample
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
196
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
197
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
198 extern SOUND_DECODER_DECLSPEC ptrdiff_t SOUND_DECODER_CALL SoundDecoder_GetDuration(SoundDecoder_Sample* sound_sample);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
199 #define Sound_GetDuration SoundDecoder_GetDuration
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
200
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
201 extern SOUND_DECODER_DECLSPEC int SOUND_DECODER_CALL SoundDecoder_SetBufferSize(SoundDecoder_Sample* sound_sample, size_t new_buffer_size);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
202 #define Sound_SetBufferSize SoundDecoder_SetBufferSize
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
203
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
204 extern SOUND_DECODER_DECLSPEC size_t SOUND_DECODER_CALL SoundDecoder_Decode(SoundDecoder_Sample* sound_sample);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
205 #define Sound_Decode SoundDecoder_Decode
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
206
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
207 extern SOUND_DECODER_DECLSPEC size_t SOUND_DECODER_CALL SoundDecoder_DecodeAll(SoundDecoder_Sample* sound_sample);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
208 #define Sound_DecodeAll SoundDecoder_DecodeAll
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
209
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
210 extern SOUND_DECODER_DECLSPEC int SOUND_DECODER_CALL SoundDecoder_Rewind(SoundDecoder_Sample* sound_sample);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
211 #define Sound_Rewind SoundDecoder_Rewind
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
212
56
208a9ed20087 Added explicit symbol visibility markers to audio support files in ALmixer for public headers so they can be built as a dynamic library if needed.
Eric Wing <ewing@anscamobile.com>
parents: 38
diff changeset
213 extern SOUND_DECODER_DECLSPEC int SOUND_DECODER_CALL SoundDecoder_Seek(SoundDecoder_Sample* sound_sample, size_t ms);
38
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
214 #define Sound_Seek SoundDecoder_Seek
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
215
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
216
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
217 /* Ends C function definitions when using C++ */
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
218 #ifdef __cplusplus
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
219 }
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
220 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
221
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
222 #endif
71b465ff0622 Added support files.
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
223