Skip to content

Commit 08c533d

Browse files
committed
add libvorbis diff, since it can't be compiled in emscripten (only some header includes are missing)
1 parent 39cd4ba commit 08c533d

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
diff --git a/lib/misc.h b/lib/misc.h
2+
index eac5160..0fe9400 100644
3+
--- a/lib/misc.h
4+
+++ b/lib/misc.h
5+
@@ -18,6 +18,11 @@
6+
#define _V_RANDOM_H_
7+
#include "vorbis/codec.h"
8+
9+
+#ifdef __EMSCRIPTEN__
10+
+#include <alloca.h>
11+
+#endif
12+
+
13+
+
14+
extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
15+
extern void _vorbis_block_ripcord(vorbis_block *vb);
16+
extern int ov_ilog(ogg_uint32_t v);
17+
diff --git a/vq/bookutil.h b/vq/bookutil.h
18+
index d8fbcbe..7f22a1c 100644
19+
--- a/vq/bookutil.h
20+
+++ b/vq/bookutil.h
21+
@@ -17,6 +17,14 @@
22+
#ifndef _V_BOOKUTIL_H_
23+
#define _V_BOOKUTIL_H_
24+
25+
+
26+
+#ifdef __EMSCRIPTEN__
27+
+#include <alloca.h>
28+
+#include <string.h>
29+
+char* strdup(const char*);
30+
+#endif
31+
+
32+
+
33+
#include <stdio.h>
34+
#include <sys/time.h>
35+

subprojects/vorbis.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ patch_url = https://wrapdb.mesonbuild.com/v2/vorbis_1.3.7-4/get_patch
88
patch_hash = 979e22b24b16c927040700dfd8319cd6ba29bf52a14dbc66b1cb4ea60504f14a
99
wrapdb_version = 1.3.7-4
1010

11+
diff_files = libvorbis-1.3.7_web.diff
12+
1113
[provide]
1214
vorbis = vorbis_dep
1315
vorbisfile = vorbisfile_dep

0 commit comments

Comments
 (0)