react-native-audio-api 0.7.1-nightly-5a218c6-20250810 → 0.7.1-nightly-4d86c14-20250811

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/RNAudioAPI.podspec +31 -7
  2. package/android/src/main/cpp/audioapi/CMakeLists.txt +22 -1
  3. package/android/src/main/cpp/audioapi/android/core/AudioDecoder.cpp +81 -63
  4. package/common/cpp/audioapi/core/utils/AudioDecoder.h +54 -29
  5. package/common/cpp/audioapi/external/arm64-v8a/libogg.a +0 -0
  6. package/common/cpp/audioapi/external/arm64-v8a/libopus.a +0 -0
  7. package/common/cpp/audioapi/external/arm64-v8a/libopusfile.a +0 -0
  8. package/common/cpp/audioapi/external/arm64-v8a/libvorbis.a +0 -0
  9. package/common/cpp/audioapi/external/arm64-v8a/libvorbisenc.a +0 -0
  10. package/common/cpp/audioapi/external/arm64-v8a/libvorbisfile.a +0 -0
  11. package/common/cpp/audioapi/external/armeabi-v7a/libogg.a +0 -0
  12. package/common/cpp/audioapi/external/armeabi-v7a/libopus.a +0 -0
  13. package/common/cpp/audioapi/external/armeabi-v7a/libopusfile.a +0 -0
  14. package/common/cpp/audioapi/external/armeabi-v7a/libvorbis.a +0 -0
  15. package/common/cpp/audioapi/external/armeabi-v7a/libvorbisenc.a +0 -0
  16. package/common/cpp/audioapi/external/armeabi-v7a/libvorbisfile.a +0 -0
  17. package/common/cpp/audioapi/external/include/ogg/config_types.h +26 -0
  18. package/common/cpp/audioapi/external/include/ogg/config_types.h.in +26 -0
  19. package/common/cpp/audioapi/external/include/ogg/ogg.h +212 -0
  20. package/common/cpp/audioapi/external/include/ogg/os_types.h +157 -0
  21. package/common/cpp/audioapi/external/include/opus/opus.h +1286 -0
  22. package/common/cpp/audioapi/external/include/opus/opus_custom.h +390 -0
  23. package/common/cpp/audioapi/external/include/opus/opus_defines.h +896 -0
  24. package/common/cpp/audioapi/external/include/opus/opus_multistream.h +728 -0
  25. package/common/cpp/audioapi/external/include/opus/opus_projection.h +621 -0
  26. package/common/cpp/audioapi/external/include/opus/opus_types.h +170 -0
  27. package/common/cpp/audioapi/external/include/opusfile/opusfile.h +2151 -0
  28. package/common/cpp/audioapi/external/include/vorbis/codec.h +241 -0
  29. package/common/cpp/audioapi/external/include/vorbis/vorbisenc.h +446 -0
  30. package/common/cpp/audioapi/external/include/vorbis/vorbisfile.h +226 -0
  31. package/common/cpp/audioapi/external/iphoneos/libogg.a +0 -0
  32. package/common/cpp/audioapi/external/iphoneos/libopus.a +0 -0
  33. package/common/cpp/audioapi/external/iphoneos/libopusfile.a +0 -0
  34. package/common/cpp/audioapi/external/iphoneos/libvorbis.a +0 -0
  35. package/common/cpp/audioapi/external/iphoneos/libvorbisenc.a +0 -0
  36. package/common/cpp/audioapi/external/iphoneos/libvorbisfile.a +0 -0
  37. package/common/cpp/audioapi/external/iphonesimulator/libogg.a +0 -0
  38. package/common/cpp/audioapi/external/iphonesimulator/libopus.a +0 -0
  39. package/common/cpp/audioapi/external/iphonesimulator/libopusfile.a +0 -0
  40. package/common/cpp/audioapi/external/iphonesimulator/libvorbis.a +0 -0
  41. package/common/cpp/audioapi/external/iphonesimulator/libvorbisenc.a +0 -0
  42. package/common/cpp/audioapi/external/iphonesimulator/libvorbisfile.a +0 -0
  43. package/common/cpp/audioapi/external/x86/libogg.a +0 -0
  44. package/common/cpp/audioapi/external/x86/libopus.a +0 -0
  45. package/common/cpp/audioapi/external/x86/libopusfile.a +0 -0
  46. package/common/cpp/audioapi/external/x86/libvorbis.a +0 -0
  47. package/common/cpp/audioapi/external/x86/libvorbisenc.a +0 -0
  48. package/common/cpp/audioapi/external/x86/libvorbisfile.a +0 -0
  49. package/common/cpp/audioapi/external/x86_64/libogg.a +0 -0
  50. package/common/cpp/audioapi/external/x86_64/libopus.a +0 -0
  51. package/common/cpp/audioapi/external/x86_64/libopusfile.a +0 -0
  52. package/common/cpp/audioapi/external/x86_64/libvorbis.a +0 -0
  53. package/common/cpp/audioapi/external/x86_64/libvorbisenc.a +0 -0
  54. package/common/cpp/audioapi/external/x86_64/libvorbisfile.a +0 -0
  55. package/common/cpp/audioapi/libs/miniaudio/decoders/libopus/miniaudio_libopus.c +623 -0
  56. package/common/cpp/audioapi/libs/miniaudio/decoders/libopus/miniaudio_libopus.h +71 -0
  57. package/common/cpp/audioapi/libs/miniaudio/decoders/libvorbis/miniaudio_libvorbis.c +574 -0
  58. package/common/cpp/audioapi/libs/miniaudio/decoders/libvorbis/miniaudio_libvorbis.h +41 -0
  59. package/common/cpp/test/CMakeLists.txt +7 -0
  60. package/common/cpp/test/RunTests.sh +3 -8
  61. package/ios/audioapi/ios/core/AudioDecoder.mm +62 -51
  62. package/package.json +1 -1
@@ -0,0 +1,226 @@
1
+ /********************************************************************
2
+ * *
3
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7
+ * *
8
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9
+ * by the Xiph.Org Foundation https://xiph.org/ *
10
+ * *
11
+ ********************************************************************
12
+
13
+ function: stdio-based convenience library for opening/seeking/decoding
14
+
15
+ ********************************************************************/
16
+
17
+ #ifndef _OV_FILE_H_
18
+ #define _OV_FILE_H_
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif /* __cplusplus */
23
+
24
+ #include <stdio.h>
25
+ #include "codec.h"
26
+
27
+ /* The function prototypes for the callbacks are basically the same as for
28
+ * the stdio functions fread, fseek, fclose, ftell.
29
+ * The one difference is that the FILE * arguments have been replaced with
30
+ * a void * - this is to be used as a pointer to whatever internal data these
31
+ * functions might need. In the stdio case, it's just a FILE * cast to a void *
32
+ *
33
+ * If you use other functions, check the docs for these functions and return
34
+ * the right values. For seek_func(), you *MUST* return -1 if the stream is
35
+ * unseekable
36
+ */
37
+ typedef struct {
38
+ size_t (*read_func)(void *ptr, size_t size, size_t nmemb, void *datasource);
39
+ int (*seek_func)(void *datasource, ogg_int64_t offset, int whence);
40
+ int (*close_func)(void *datasource);
41
+ long (*tell_func)(void *datasource);
42
+ } ov_callbacks;
43
+
44
+ #ifndef OV_EXCLUDE_STATIC_CALLBACKS
45
+
46
+ /* a few sets of convenient callbacks, especially for use under
47
+ * Windows where ov_open_callbacks() should always be used instead of
48
+ * ov_open() to avoid problems with incompatible crt.o version linking
49
+ * issues. */
50
+
51
+ static int _ov_header_fseek_wrap(FILE *f, ogg_int64_t off, int whence) {
52
+ if (f == NULL)
53
+ return (-1);
54
+
55
+ #ifdef __MINGW32__
56
+ return fseeko64(f, off, whence);
57
+ #elif defined(_WIN32)
58
+ return _fseeki64(f, off, whence);
59
+ #else
60
+ return fseek(f, off, whence);
61
+ #endif
62
+ }
63
+
64
+ /* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as
65
+ * static data. That means that every file which includes this header
66
+ * will get its own copy of these structs whether it uses them or
67
+ * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS.
68
+ * These static symbols are essential on platforms such as Windows on
69
+ * which several different versions of stdio support may be linked to
70
+ * by different DLLs, and we need to be certain we know which one
71
+ * we're using (the same one as the main application).
72
+ */
73
+
74
+ static ov_callbacks OV_CALLBACKS_DEFAULT = {
75
+ (size_t (*)(void *, size_t, size_t, void *))fread,
76
+ (int (*)(void *, ogg_int64_t, int))_ov_header_fseek_wrap,
77
+ (int (*)(void *))fclose,
78
+ (long (*)(void *))ftell};
79
+
80
+ static ov_callbacks OV_CALLBACKS_NOCLOSE = {
81
+ (size_t (*)(void *, size_t, size_t, void *))fread,
82
+ (int (*)(void *, ogg_int64_t, int))_ov_header_fseek_wrap,
83
+ (int (*)(void *))NULL,
84
+ (long (*)(void *))ftell};
85
+
86
+ static ov_callbacks OV_CALLBACKS_STREAMONLY = {
87
+ (size_t (*)(void *, size_t, size_t, void *))fread,
88
+ (int (*)(void *, ogg_int64_t, int))NULL,
89
+ (int (*)(void *))fclose,
90
+ (long (*)(void *))NULL};
91
+
92
+ static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = {
93
+ (size_t (*)(void *, size_t, size_t, void *))fread,
94
+ (int (*)(void *, ogg_int64_t, int))NULL,
95
+ (int (*)(void *))NULL,
96
+ (long (*)(void *))NULL};
97
+
98
+ #endif
99
+
100
+ #define NOTOPEN 0
101
+ #define PARTOPEN 1
102
+ #define OPENED 2
103
+ #define STREAMSET 3
104
+ #define INITSET 4
105
+
106
+ typedef struct OggVorbis_File {
107
+ void *datasource; /* Pointer to a FILE *, etc. */
108
+ int seekable;
109
+ ogg_int64_t offset;
110
+ ogg_int64_t end;
111
+ ogg_sync_state oy;
112
+
113
+ /* If the FILE handle isn't seekable (eg, a pipe), only the current
114
+ stream appears */
115
+ int links;
116
+ ogg_int64_t *offsets;
117
+ ogg_int64_t *dataoffsets;
118
+ long *serialnos;
119
+ ogg_int64_t *pcmlengths; /* overloaded to maintain binary
120
+ compatibility; x2 size, stores both
121
+ beginning and end values */
122
+ vorbis_info *vi;
123
+ vorbis_comment *vc;
124
+
125
+ /* Decoding working state local storage */
126
+ ogg_int64_t pcm_offset;
127
+ int ready_state;
128
+ long current_serialno;
129
+ int current_link;
130
+
131
+ double bittrack;
132
+ double samptrack;
133
+
134
+ ogg_stream_state os; /* take physical pages, weld into a logical
135
+ stream of packets */
136
+ vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
137
+ vorbis_block vb; /* local working space for packet->PCM decode */
138
+
139
+ ov_callbacks callbacks;
140
+
141
+ } OggVorbis_File;
142
+
143
+ extern int ov_clear(OggVorbis_File *vf);
144
+ extern int ov_fopen(const char *path, OggVorbis_File *vf);
145
+ extern int
146
+ ov_open(FILE *f, OggVorbis_File *vf, const char *initial, long ibytes);
147
+ extern int ov_open_callbacks(
148
+ void *datasource,
149
+ OggVorbis_File *vf,
150
+ const char *initial,
151
+ long ibytes,
152
+ ov_callbacks callbacks);
153
+
154
+ extern int
155
+ ov_test(FILE *f, OggVorbis_File *vf, const char *initial, long ibytes);
156
+ extern int ov_test_callbacks(
157
+ void *datasource,
158
+ OggVorbis_File *vf,
159
+ const char *initial,
160
+ long ibytes,
161
+ ov_callbacks callbacks);
162
+ extern int ov_test_open(OggVorbis_File *vf);
163
+
164
+ extern long ov_bitrate(OggVorbis_File *vf, int i);
165
+ extern long ov_bitrate_instant(OggVorbis_File *vf);
166
+ extern long ov_streams(OggVorbis_File *vf);
167
+ extern long ov_seekable(OggVorbis_File *vf);
168
+ extern long ov_serialnumber(OggVorbis_File *vf, int i);
169
+
170
+ extern ogg_int64_t ov_raw_total(OggVorbis_File *vf, int i);
171
+ extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf, int i);
172
+ extern double ov_time_total(OggVorbis_File *vf, int i);
173
+
174
+ extern int ov_raw_seek(OggVorbis_File *vf, ogg_int64_t pos);
175
+ extern int ov_pcm_seek(OggVorbis_File *vf, ogg_int64_t pos);
176
+ extern int ov_pcm_seek_page(OggVorbis_File *vf, ogg_int64_t pos);
177
+ extern int ov_time_seek(OggVorbis_File *vf, double pos);
178
+ extern int ov_time_seek_page(OggVorbis_File *vf, double pos);
179
+
180
+ extern int ov_raw_seek_lap(OggVorbis_File *vf, ogg_int64_t pos);
181
+ extern int ov_pcm_seek_lap(OggVorbis_File *vf, ogg_int64_t pos);
182
+ extern int ov_pcm_seek_page_lap(OggVorbis_File *vf, ogg_int64_t pos);
183
+ extern int ov_time_seek_lap(OggVorbis_File *vf, double pos);
184
+ extern int ov_time_seek_page_lap(OggVorbis_File *vf, double pos);
185
+
186
+ extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
187
+ extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
188
+ extern double ov_time_tell(OggVorbis_File *vf);
189
+
190
+ extern vorbis_info *ov_info(OggVorbis_File *vf, int link);
191
+ extern vorbis_comment *ov_comment(OggVorbis_File *vf, int link);
192
+
193
+ extern long ov_read_float(
194
+ OggVorbis_File *vf,
195
+ float ***pcm_channels,
196
+ int samples,
197
+ int *bitstream);
198
+ extern long ov_read_filter(
199
+ OggVorbis_File *vf,
200
+ char *buffer,
201
+ int length,
202
+ int bigendianp,
203
+ int word,
204
+ int sgned,
205
+ int *bitstream,
206
+ void (
207
+ *filter)(float **pcm, long channels, long samples, void *filter_param),
208
+ void *filter_param);
209
+ extern long ov_read(
210
+ OggVorbis_File *vf,
211
+ char *buffer,
212
+ int length,
213
+ int bigendianp,
214
+ int word,
215
+ int sgned,
216
+ int *bitstream);
217
+ extern int ov_crosslap(OggVorbis_File *vf1, OggVorbis_File *vf2);
218
+
219
+ extern int ov_halfrate(OggVorbis_File *vf, int flag);
220
+ extern int ov_halfrate_p(OggVorbis_File *vf);
221
+
222
+ #ifdef __cplusplus
223
+ }
224
+ #endif /* __cplusplus */
225
+
226
+ #endif