Add -I /usr/local/include/opus to compile on FreeBSD
[audio-opusfile.git] / Opusfile.xs
CommitLineData
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
14MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile PREFIX = op_
15
16PROTOTYPES: ENABLE
17INCLUDE: const-xs.inc
18
19OggOpusFile*
20op_open_file(path)
21 const char *path;
22PREINIT:
23 int err;
24CODE:
25 RETVAL = op_open_file(path, &err);
26 if(err)
27 croak("op_open_file returned error %d\n", err);
28OUTPUT:
29 RETVAL
30
31void
32DESTROY(of)
33 OggOpusFile *of;
34CODE:
35 op_free(of);
36
37const OpusHead*
38op_head(of, li = -1)
39 OggOpusFile *of;
40 int li;
41
42const OpusTags*
43op_tags(of, li = -1)
44 OggOpusFile *of;
45 int li;
46
47MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::Tags PREFIX = opus_tags_
48
49int
50opus_tags_query_count(tags, tag)
51 const OpusTags* tags;
52 const char* tag;
53
54const char*
55opus_tags_query(tags, tag, count = 0)
56 const OpusTags* tags;
57 const char* tag;
58 int count;
This page took 0.012799 seconds and 4 git commands to generate.