]>
Commit | Line | Data |
---|---|---|
a3f1cbda MG |
1 | #define PERL_NO_GET_CONTEXT |
2 | #include "EXTERN.h" | |
3 | #include "perl.h" | |
4 | #include "XSUB.h" | |
5 | ||
6 | #include "ppport.h" | |
7 | ||
8 | /* op_free is both Perl_op_free and a function in opusfile */ | |
9 | #undef op_free | |
10 | #include <opus/opusfile.h> | |
11 | ||
12 | #include "const-c.inc" | |
13 | ||
14 | MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile PREFIX = op_ | |
15 | ||
16 | PROTOTYPES: ENABLE | |
17 | INCLUDE: const-xs.inc | |
18 | ||
19 | OggOpusFile* | |
20 | op_open_file(path) | |
21 | const char *path; | |
22 | PREINIT: | |
23 | int err; | |
24 | CODE: | |
25 | RETVAL = op_open_file(path, &err); | |
26 | if(err) | |
27 | croak("op_open_file returned error %d\n", err); | |
28 | OUTPUT: | |
29 | RETVAL | |
30 | ||
31 | void | |
32 | DESTROY(of) | |
33 | OggOpusFile *of; | |
34 | CODE: | |
35 | op_free(of); | |
36 | ||
37 | const OpusHead* | |
38 | op_head(of, li = -1) | |
39 | OggOpusFile *of; | |
40 | int li; | |
41 | ||
42 | const OpusTags* | |
43 | op_tags(of, li = -1) | |
44 | OggOpusFile *of; | |
45 | int li; | |
46 | ||
47 | MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::Tags PREFIX = opus_tags_ | |
48 | ||
49 | int | |
50 | opus_tags_query_count(tags, tag) | |
51 | const OpusTags* tags; | |
52 | const char* tag; | |
53 | ||
54 | const char* | |
55 | opus_tags_query(tags, tag, count = 0) | |
56 | const OpusTags* tags; | |
57 | const char* tag; | |
58 | int count; |