audiofile.h | audiofile.h | |||
---|---|---|---|---|
/* | /* | |||
Audio File Library | Audio File Library | |||
Copyright (C) 1998-1999, Michael Pruett <michael@68k.org> | ||||
Copyright 1998, Michael Pruett <michael@68k.org> | ||||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License as | modify it under the terms of the GNU Library General Public | |||
published by the Free Software Foundation; either version 2 of | License as published by the Free Software Foundation; either | |||
the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be | This library is distributed in the hope that it will be useful, | |||
useful, but WITHOUT ANY WARRANTY; without even the implied | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
PURPOSE. See the GNU General Public License for more details. | Library General Public License for more details. | |||
You should have received a copy of the GNU General Public | You should have received a copy of the GNU Library General Public | |||
License along with this program; if not, write to the Free | License along with this library; if not, write to the | |||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |||
MA 02111-1307, USA. | Boston, MA 02111-1307 USA. | |||
*/ | */ | |||
/* | /* | |||
audiofile.h | audiofile.h | |||
This file contains the public interfaces to the Audio File Library. | This file contains the public interfaces to the Audio File Library. | |||
*/ | */ | |||
#ifndef AUDIOFILE_H | #ifndef AUDIOFILE_H | |||
#define AUDIOFILE_H | #define AUDIOFILE_H | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include "aupvlist.h" | #include "aupvlist.h" | |||
#ifdef __cplusplus | ||||
extern "C" | ||||
{ | ||||
#endif /* __cplusplus */ | ||||
typedef struct _AFfilesetup *AFfilesetup; | typedef struct _AFfilesetup *AFfilesetup; | |||
typedef struct _AFfilehandle *AFfilehandle; | typedef struct _AFfilehandle *AFfilehandle; | |||
typedef void (*AFerrfunc)(long, const char *); | typedef void (*AFerrfunc)(long, const char *); | |||
typedef off_t AFframecount; | typedef off_t AFframecount; | |||
typedef off_t AFfileoffset; | typedef off_t AFfileoffset; | |||
#define AF_NULL_FILESETUP ((struct _AFfilesetup *) 0) | #define AF_NULL_FILESETUP ((struct _AFfilesetup *) 0) | |||
#define AF_NULL_FILEHANDLE ((struct _AFfilehandle *) 0) | #define AF_NULL_FILEHANDLE ((struct _AFfilehandle *) 0) | |||
skipping to change at line 84 | skipping to change at line 88 | |||
AF_FILE_WAVE = 4, | AF_FILE_WAVE = 4, | |||
AF_FILE_BICSF = 5, | AF_FILE_BICSF = 5, | |||
AF_FILE_MPEG1BITSTREAM = 6, | AF_FILE_MPEG1BITSTREAM = 6, | |||
AF_FILE_SOUNDDESIGNER1 = 7, | AF_FILE_SOUNDDESIGNER1 = 7, | |||
AF_FILE_SOUNDDESIGNER2 = 8, | AF_FILE_SOUNDDESIGNER2 = 8, | |||
AF_FILE_AVR = 9, | AF_FILE_AVR = 9, | |||
AF_FILE_IFF_8SVX = 10, | AF_FILE_IFF_8SVX = 10, | |||
AF_FILE_SAMPLEVISION = 11, | AF_FILE_SAMPLEVISION = 11, | |||
AF_FILE_VOC = 12, | AF_FILE_VOC = 12, | |||
AF_FILE_NIST_SPHERE = 13, | AF_FILE_NIST_SPHERE = 13, | |||
AF_FILE_SOUNDFONT2 = 14, | AF_FILE_SOUNDFONT2 = 14 | |||
}; | }; | |||
#define AF_FILE_IRCAM AF_FILE_BICSF | #define AF_FILE_IRCAM AF_FILE_BICSF | |||
enum | enum | |||
{ | { | |||
AF_LOOP_MODE_NOLOOP = 0, | AF_LOOP_MODE_NOLOOP = 0, | |||
AF_LOOP_MODE_FORW = 1, | AF_LOOP_MODE_FORW = 1, | |||
AF_LOOP_MODE_FORWBACKW = 2 | AF_LOOP_MODE_FORWBACKW = 2 | |||
}; | }; | |||
skipping to change at line 108 | skipping to change at line 112 | |||
AF_SAMPFMT_TWOSCOMP = 401, | AF_SAMPFMT_TWOSCOMP = 401, | |||
AF_SAMPFMT_UNSIGNED = 402, | AF_SAMPFMT_UNSIGNED = 402, | |||
AF_SAMPFMT_FLOAT = 403, | AF_SAMPFMT_FLOAT = 403, | |||
AF_SAMPFMT_DOUBLE = 404 | AF_SAMPFMT_DOUBLE = 404 | |||
}; | }; | |||
enum | enum | |||
{ | { | |||
AF_INST_LOOP_OFF = 0, /* no looping */ | AF_INST_LOOP_OFF = 0, /* no looping */ | |||
AF_INST_LOOP_CONTINUOUS = 1, /* loop continuously through decay * / | AF_INST_LOOP_CONTINUOUS = 1, /* loop continuously through decay * / | |||
AF_INST_LOOP_SUSTAIN = 3, /* loop during sustain, then continue */ | AF_INST_LOOP_SUSTAIN = 3 /* loop during sustain, then continue */ | |||
}; | }; | |||
enum | enum | |||
{ | { | |||
AF_INST_MIDI_BASENOTE = 301, | AF_INST_MIDI_BASENOTE = 301, | |||
AF_INST_NUMCENTS_DETUNE = 302, | AF_INST_NUMCENTS_DETUNE = 302, | |||
AF_INST_MIDI_LONOTE = 303, | AF_INST_MIDI_LONOTE = 303, | |||
AF_INST_MIDI_HINOTE = 304, | AF_INST_MIDI_HINOTE = 304, | |||
AF_INST_MIDI_LOVELOCITY = 305, | AF_INST_MIDI_LOVELOCITY = 305, | |||
AF_INST_MIDI_HIVELOCITY = 306, | AF_INST_MIDI_HIVELOCITY = 306, | |||
skipping to change at line 154 | skipping to change at line 158 | |||
AF_MISC_IRCAM_COMMENT = 210, /* BICSF text comment */ | AF_MISC_IRCAM_COMMENT = 210, /* BICSF text comment */ | |||
AF_MISC_COMMENT = 210, /* general text comment */ | AF_MISC_COMMENT = 210, /* general text comment */ | |||
AF_MISC_ICMT = AF_MISC_COMMENT, /* comments chunk (WAV format) */ | AF_MISC_ICMT = AF_MISC_COMMENT, /* comments chunk (WAV format) */ | |||
AF_MISC_ICRD = 211, /* creation date (WAV format) */ | AF_MISC_ICRD = 211, /* creation date (WAV format) */ | |||
AF_MISC_ISFT = 212 /* software name (WAV format) */ | AF_MISC_ISFT = 212 /* software name (WAV format) */ | |||
}; | }; | |||
enum | enum | |||
{ | { | |||
/* supported compression schemes */ | ||||
AF_COMPRESSION_UNKNOWN = -1, | AF_COMPRESSION_UNKNOWN = -1, | |||
AF_COMPRESSION_NONE = 0, | AF_COMPRESSION_NONE = 0, | |||
AF_COMPRESSION_G722 = 501, | AF_COMPRESSION_G722 = 501, | |||
AF_COMPRESSION_G711_ULAW = 502, | AF_COMPRESSION_G711_ULAW = 502, | |||
AF_COMPRESSION_G711_ALAW = 503, | AF_COMPRESSION_G711_ALAW = 503, | |||
/* Apple proprietary AIFF-C compression schemes (not supported) */ | ||||
AF_COMPRESSION_APPLE_ACE2 = 504, | AF_COMPRESSION_APPLE_ACE2 = 504, | |||
AF_COMPRESSION_APPLE_ACE8 = 505, | AF_COMPRESSION_APPLE_ACE8 = 505, | |||
AF_COMPRESSION_APPLE_MAC3 = 506, | AF_COMPRESSION_APPLE_MAC3 = 506, | |||
AF_COMPRESSION_APPLE_MAC6 = 507, | AF_COMPRESSION_APPLE_MAC6 = 507, | |||
AF_COMPRESSION_MPEG1 = 515, | AF_COMPRESSION_MPEG1 = 515, | |||
AF_COMPRESSION_AWARE_MULTIRATE = 516, | AF_COMPRESSION_AWARE_MULTIRATE = 516, | |||
AF_COMPRESSION_G726 = 517, | AF_COMPRESSION_G726 = 517, | |||
AF_COMPRESSION_G728 = 518, | AF_COMPRESSION_G728 = 518, | |||
skipping to change at line 471 | skipping to change at line 477 | |||
int afGetVirtualByteOrder (AFfilehandle, int track); | int afGetVirtualByteOrder (AFfilehandle, int track); | |||
/* track data: number of channels */ | /* track data: number of channels */ | |||
void afInitChannels (AFfilesetup, int track, int nchannels); | void afInitChannels (AFfilesetup, int track, int nchannels); | |||
int afGetChannels (AFfilehandle, int track); | int afGetChannels (AFfilehandle, int track); | |||
int afSetVirtualChannels (AFfilehandle, int track, int channelCount); | int afSetVirtualChannels (AFfilehandle, int track, int channelCount); | |||
int afGetVirtualChannels (AFfilehandle, int track); | int afGetVirtualChannels (AFfilehandle, int track); | |||
void afSetChannelMatrix (AFfilehandle, int track, double *matrix); | void afSetChannelMatrix (AFfilehandle, int track, double *matrix); | |||
/* track data: sample format and sample width */ | /* track data: sample format and sample width */ | |||
void afInitSampleFormat (AFfilesetup, int track, int sampleFormat, | ||||
int sampleWidth); | ||||
void afGetSampleFormat (AFfilehandle file, int track, int *sampfmt, | void afGetSampleFormat (AFfilehandle file, int track, int *sampfmt, | |||
int *sampwidth); | int *sampwidth); | |||
void afGetVirtualSampleFormat (AFfilehandle file, int track, int *sampfmt, | void afGetVirtualSampleFormat (AFfilehandle file, int track, int *sampfmt, | |||
int *sampwidth); | int *sampwidth); | |||
#if 0 | #if 0 | |||
int afSetVirtualSampleFormat (AFfilehandle, int track, | int afSetVirtualSampleFormat (AFfilehandle, int track, | |||
int sampleFormat, int sampleWidth); | int sampleFormat, int sampleWidth); | |||
void afGetVirtualSampleFormat (AFfilehandle, int track, | void afGetVirtualSampleFormat (AFfilehandle, int track, | |||
int *sampleFormat, int *sampleWidth); | int *sampleFormat, int *sampleWidth); | |||
#endif | #endif | |||
/* track data: sampling rate */ | /* track data: sampling rate */ | |||
void afInitRate (AFfilesetup, int track, double rate); | void afInitRate (AFfilesetup, int track, double rate); | |||
double afGetRate (AFfilehandle, int track); | double afGetRate (AFfilehandle, int track); | |||
#if 0 | #if 0 | |||
int afSetVirtualRate (AFfilehandle, int track, double rate); | int afSetVirtualRate (AFfilehandle, int track, double rate); | |||
double afGetVirtualRate (AFfilehandle, int track); | double afGetVirtualRate (AFfilehandle, int track); | |||
#endif | #endif | |||
#if 0 | ||||
/* track data: compression */ | /* track data: compression */ | |||
void afInitCompression (AFfilesetup, int track, int compression); | void afInitCompression (AFfilesetup, int track, int compression); | |||
#if 0 | ||||
void afInitCompressionParams (AFfilesetup, int track, int compression | void afInitCompressionParams (AFfilesetup, int track, int compression | |||
AUpvlist params, int parameterCount); | AUpvlist params, int parameterCount); | |||
#endif | ||||
int afGetCompression (AFfilehandle, int track); | int afGetCompression (AFfilehandle, int track); | |||
#if 0 | ||||
void afGetCompressionParams (AFfilehandle, int track, int *compression, | void afGetCompressionParams (AFfilehandle, int track, int *compression, | |||
AUpvlist params, int parameterCount); | AUpvlist params, int parameterCount); | |||
int afSetVirtualCompression (AFfilesetup, int track, int compression); | int afSetVirtualCompression (AFfilesetup, int track, int compression); | |||
void afSetVirtualCompressionParams (AFfilehandle, int track, int compressio n, | void afSetVirtualCompressionParams (AFfilehandle, int track, int compressio n, | |||
AUpvlist params, int parameterCount); | AUpvlist params, int parameterCount); | |||
int afGetVirtualCompression (AFfilesetup, int track, int compression); | int afGetVirtualCompression (AFfilesetup, int track, int compression); | |||
void afGetVirtualCompressionParams (AFfilehandle, int track, int *compressi on, | void afGetVirtualCompressionParams (AFfilehandle, int track, int *compressi on, | |||
AUpvlist params, int parameterCount); | AUpvlist params, int parameterCount); | |||
skipping to change at line 593 | skipping to change at line 603 | |||
void afInitMiscIDs (AFfilesetup, int *ids, int nids); | void afInitMiscIDs (AFfilesetup, int *ids, int nids); | |||
int afGetMiscIDs (AFfilehandle, int *ids); | int afGetMiscIDs (AFfilehandle, int *ids); | |||
void afInitMiscType (AFfilesetup, int miscellaneousid, int type); | void afInitMiscType (AFfilesetup, int miscellaneousid, int type); | |||
int afGetMiscType (AFfilehandle, int miscellaneousid); | int afGetMiscType (AFfilehandle, int miscellaneousid); | |||
void afInitMiscSize (AFfilesetup, int miscellaneousid, int size); | void afInitMiscSize (AFfilesetup, int miscellaneousid, int size); | |||
int afGetMiscSize (AFfilehandle, int miscellaneousid); | int afGetMiscSize (AFfilehandle, int miscellaneousid); | |||
int afWriteMisc (AFfilehandle, int miscellaneousid, void *buf, int bytes); | int afWriteMisc (AFfilehandle, int miscellaneousid, void *buf, int bytes); | |||
int afReadMisc (AFfilehandle, int miscellaneousid, void *buf, int bytes); | int afReadMisc (AFfilehandle, int miscellaneousid, void *buf, int bytes); | |||
int afSeekMisc (AFfilehandle, int miscellaneousid, int offset); | int afSeekMisc (AFfilehandle, int miscellaneousid, int offset); | |||
#endif | #ifdef __cplusplus | |||
} | ||||
#endif /* __cplusplus */ | ||||
#endif /* AUDIOFILE_H */ | ||||
End of changes. 15 change blocks. | ||||
16 lines changed or deleted | 26 lines changed or added | |||
aupvlist.h | aupvlist.h | |||
---|---|---|---|---|
/* | /* | |||
Audio File Library | Audio File Library | |||
Copyright (C) 1998, Michael Pruett <michael@68k.org> | ||||
Copyright 1998, Michael Pruett <michael@68k.org> | ||||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License as | modify it under the terms of the GNU Library General Public | |||
published by the Free Software Foundation; either version 2 of | License as published by the Free Software Foundation; either | |||
the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be | This library is distributed in the hope that it will be useful, | |||
useful, but WITHOUT ANY WARRANTY; without even the implied | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
PURPOSE. See the GNU General Public License for more details. | Library General Public License for more details. | |||
You should have received a copy of the GNU General Public | You should have received a copy of the GNU Library General Public | |||
License along with this program; if not, write to the Free | License along with this library; if not, write to the | |||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |||
MA 02111-1307, USA. | Boston, MA 02111-1307 USA. | |||
*/ | ||||
/* | ||||
aupv.h | ||||
This file contains the interface to the parameter value list data | ||||
structures and routines. | ||||
*/ | */ | |||
#ifndef AUPVLIST_H | #ifndef AUPVLIST_H | |||
#define AUPVLIST_H | #define AUPVLIST_H | |||
#ifdef __cplusplus | ||||
extern "C" | ||||
{ | ||||
#endif /* __cplusplus */ | ||||
enum | enum | |||
{ | { | |||
AU_PVTYPE_LONG = 1, | AU_PVTYPE_LONG = 1, | |||
AU_PVTYPE_DOUBLE = 2, | AU_PVTYPE_DOUBLE = 2, | |||
AU_PVTYPE_PTR = 3 | AU_PVTYPE_PTR = 3 | |||
}; | }; | |||
typedef struct _AUpvlist *AUpvlist; | typedef struct _AUpvlist *AUpvlist; | |||
#define AU_NULL_PVLIST ((struct _AUpvlist *) 0) | #define AU_NULL_PVLIST ((struct _AUpvlist *) 0) | |||
skipping to change at line 46 | skipping to change at line 57 | |||
AUpvlist AUpvnew (int maxItems); | AUpvlist AUpvnew (int maxItems); | |||
int AUpvgetmaxitems (AUpvlist); | int AUpvgetmaxitems (AUpvlist); | |||
int AUpvfree (AUpvlist); | int AUpvfree (AUpvlist); | |||
int AUpvsetparam (AUpvlist, int item, int param); | int AUpvsetparam (AUpvlist, int item, int param); | |||
int AUpvsetvaltype (AUpvlist, int item, int type); | int AUpvsetvaltype (AUpvlist, int item, int type); | |||
int AUpvsetval (AUpvlist, int item, void *val); | int AUpvsetval (AUpvlist, int item, void *val); | |||
int AUpvgetparam (AUpvlist, int item, int *param); | int AUpvgetparam (AUpvlist, int item, int *param); | |||
int AUpvgetvaltype (AUpvlist, int item, int *type); | int AUpvgetvaltype (AUpvlist, int item, int *type); | |||
int AUpvgetval (AUpvlist, int item, void *val); | int AUpvgetval (AUpvlist, int item, void *val); | |||
#endif | #ifdef __cplusplus | |||
} | ||||
#endif /* __cplusplus */ | ||||
#endif /* AUPVLIST_H */ | ||||
End of changes. 6 change blocks. | ||||
13 lines changed or deleted | 24 lines changed or added | |||