(Metux) autogen.sh: not running ./configure anymore (breaks certain distro builders)
[mirror-ossqm-audiofile.git] / libaudiofile / units.h
blob389afb53e52352985e4545ee10f6ab2ff4e6a76d
1 /*
2 Audio File Library
3 Copyright (C) 2000, Michael Pruett <michael@68k.org>
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.
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.
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.
22 units.h
24 This file defines the internal _Unit and _CompressionUnit
25 structures for the Audio File Library.
28 #ifndef UNIT_H
29 #define UNIT_H
31 #ifdef HAVE_CONFIG_H
32 #include <config.h>
33 #endif
35 #include "audiofile.h"
36 #include "afinternal.h"
38 typedef struct _Unit
40 int fileFormat; /* AF_FILEFMT_... */
41 char *name; /* a 2-3 word name of the file format */
42 char *description; /* a more descriptive name for the format */
43 char *label; /* a 4-character label for the format */
44 bool implemented; /* if implemented */
46 int (*getversion) (AFfilehandle handle);
47 AFfilesetup (*completesetup) (AFfilesetup setup);
49 struct
51 bool (*recognize) (AFvirtualfile *fh);
52 status (*init) (AFfilesetup, AFfilehandle);
53 } read;
55 struct
57 status (*init) (AFfilesetup, AFfilehandle);
58 bool (*instparamvalid) (AFfilehandle, AUpvlist, int);
59 status (*update) (AFfilehandle);
60 } write;
62 int defaultSampleFormat;
63 int defaultSampleWidth;
65 int compressionTypeCount;
66 int *compressionTypes;
68 int markerCount;
70 int instrumentCount;
71 int loopPerInstrumentCount;
73 int instrumentParameterCount;
74 _InstParamInfo *instrumentParameters;
75 } _Unit;
77 typedef struct _CompressionUnit
79 int compressionID; /* AF_COMPRESSION_... */
80 bool implemented;
81 char *label; /* 4-character (approximately) label */
82 char *shortname; /* short name in English */
83 char *name; /* long name in English */
84 double squishFactor; /* compression ratio */
85 int nativeSampleFormat; /* AF_SAMPFMT_... */
86 int nativeSampleWidth; /* sample width in bits */
87 bool needsRebuffer; /* if there are chunk boundary requirements */
88 bool multiple_of; /* can accept any multiple of chunksize */
89 bool (*fmtok) (_AudioFormat *format);
91 _AFmoduleinst (*initcompress) (_Track *track, AFvirtualfile *fh,
92 bool seekok, bool headerless, AFframecount *chunkframes);
93 _AFmoduleinst (*initdecompress) (_Track *track, AFvirtualfile *fh,
94 bool seekok, bool headerless, AFframecount *chunkframes);
95 } _CompressionUnit;
97 #define _AF_NUM_UNITS 15
98 #define _AF_NUM_COMPRESSION 5
100 #endif /* UNIT_H */