source: trunk/third/audiofile/libaudiofile/modules.h @ 17099

Revision 17099, 3.0 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17098, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2        Audio File Library
3        Copyright (C) 2000, Silicon Graphics, Inc.
4
5        This library is free software; you can redistribute it and/or
6        modify it under the terms of the GNU Library General Public
7        License as published by the Free Software Foundation; either
8        version 2 of the License, or (at your option) any later version.
9
10        This library is distributed in the hope that it will be useful,
11        but WITHOUT ANY WARRANTY; without even the implied warranty of
12        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13        Library General Public License for more details.
14
15        You should have received a copy of the GNU Library General Public
16        License along with this library; if not, write to the
17        Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18        Boston, MA  02111-1307  USA.
19*/
20
21/*
22        modules.h
23*/
24
25#ifndef MODULES_H
26#define MODULES_H
27
28#include <sys/types.h>
29#include <audiofile.h>
30#include "afinternal.h"
31
32typedef u_int8_t uchar1;
33typedef u_int16_t uchar2;
34typedef u_int32_t uchar3;
35typedef u_int32_t uchar4;
36
37typedef int8_t schar1;
38typedef int16_t schar2;
39typedef int32_t schar3;
40typedef int32_t schar4;
41
42typedef struct real_char3 { uchar1 c0; uchar1 c1; uchar1 c2; } real_char3;
43typedef union char3u
44{
45        struct { schar4 i; } schar4;
46        struct { uchar4 i; } uchar4;
47        struct { schar3 i; } schar3;
48        struct { uchar3 i; } uchar3;
49        struct { real_char3 c3; schar1 pad; } real_char3_high;
50        struct { schar1 pad; real_char3 c3; } real_char3_low;
51        struct { uchar2 s0; uchar2 s1; } uchar2;
52        struct { schar2 s0; schar2 s1; } schar2;
53        struct { uchar1 c0; uchar1 c1; uchar1 c2; uchar1 c3; } uchar1;
54        struct { schar1 c0; schar1 c1; schar1 c2; schar1 c3; } schar1;
55} char3u;
56
57typedef struct real_char8
58{
59        uchar1 c0, c1, c2, c3, c4, c5, c6, c7;
60} real_char8;
61
62typedef union char8u
63{
64        struct { schar4 i0, i1; } schar4;
65        struct { uchar4 i0, i1; } uchar4;
66        struct { schar2 s0, s1, s2, s3; } schar2;
67        struct { uchar2 s0, s1, s2, s3; } uchar2;
68        struct { schar1 c0, c1, c2, c3, c4, c5, c6, c7; } schar1;
69        struct { uchar1 c0, c1, c2, c3, c4, c5, c6, c7; } uchar1;
70} char8u;
71
72#define AF_NULL ((void *) 0)
73
74/*
75        _AF_ATOMIC_NVFRAMES is NOT the maximum number of frames a module
76        can be requested to produce.
77
78        This IS the maximum number of virtual (user) frames that will
79        be produced or processed per run of the modules.
80
81        Modules can be requested more frames than this because of rate
82        conversion and rebuffering.
83*/
84
85#define _AF_ATOMIC_NVFRAMES 1024
86
87AFframecount _AFpull (_AFmoduleinst *i, AFframecount nframes2pull);
88void _AFpush (_AFmoduleinst *i, AFframecount nframes2push);
89void _AFpushat (_AFmoduleinst *i, AFframecount startframe, bool stretchint,
90        AFframecount nframes2push);
91void _AFsimplemodrun_pull (_AFmoduleinst *i);
92void _AFsimplemodrun_push (_AFmoduleinst *i);
93void _AFfreemodspec (_AFmoduleinst *i);
94
95/* _AFnewmodinst returns a structure, not a pointer. */
96_AFmoduleinst _AFnewmodinst (_AFmodule *mod);
97
98status _AFinitmodules (AFfilehandle h, _Track *trk);
99status _AFsetupmodules (AFfilehandle h, _Track *trk);
100status _AFsyncmodules (AFfilehandle h, _Track *trk);
101void _AFfreemodules (_Track *trk);
102
103#endif /* MODULES_H */
Note: See TracBrowser for help on using the repository browser.