source: trunk/third/audiofile/libaudiofile/util.h @ 18227

Revision 18227, 2.7 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18226, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2        Audio File Library
3        Copyright (C) 1998-2000, Michael Pruett <michael@68k.org>
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        util.h
23
24        This file contains some general utility functions for the Audio
25        File Library.
26*/
27
28#ifndef UTIL_H
29#define UTIL_H
30
31#include <sys/types.h>
32#include "audiofile.h"
33#include "afinternal.h"
34
35bool _af_filesetup_ok (AFfilesetup setup);
36bool _af_filehandle_ok (AFfilehandle file);
37
38bool _af_filehandle_can_read (AFfilehandle file);
39
40void _af_printid (u_int32_t id);
41void _af_print_filehandle (AFfilehandle filehandle);
42void _af_print_tracks (AFfilehandle filehandle);
43void _af_print_channel_matrix (double *matrix, int fchans, int vchans);
44void _af_print_pvlist (AUpvlist list);
45
46void *_af_malloc (size_t size);
47void *_af_realloc (void *ptr, size_t size);
48void *_af_calloc (size_t nmemb, size_t size);
49char *_af_strdup (char *s);
50
51AUpvlist _af_pv_long (long val);
52AUpvlist _af_pv_double (double val);
53AUpvlist _af_pv_pointer (void *val);
54
55bool _af_pv_getlong (AUpvlist pvlist, int param, long *l);
56bool _af_pv_getdouble (AUpvlist pvlist, int param, double *d);
57bool _af_pv_getptr (AUpvlist pvlist, int param, void **v);
58
59_TrackSetup *_af_filesetup_get_tracksetup (AFfilesetup setup, int trackid);
60_Track *_af_filehandle_get_track (AFfilehandle file, int trackid);
61
62bool _af_unique_ids (int *ids, int nids, char *idname, int iderr);
63
64float _af_format_frame_size (_AudioFormat *format, bool stretch3to4);
65int _af_format_frame_size_uncompressed (_AudioFormat *format, bool stretch3to4);
66float _af_format_sample_size (_AudioFormat *format, bool stretch3to4);
67int _af_format_sample_size_uncompressed (_AudioFormat *format, bool stretch3to4);
68
69status _af_set_sample_format (_AudioFormat *f, int sampleFormat, int sampleWidth);
70
71bool _af_filehandle_can_read (AFfilehandle file);
72bool _af_filehandle_can_write (AFfilehandle file);
73
74void _af_print_audioformat (_AudioFormat *format);
75void _af_print_chunk (_AFchunk *chunk);
76void _af_print_frame (AFframecount frameno, double *frame, int nchannels,
77        char *formatstring, int numberwidth,
78        double slope, double intercept, double minclip, double maxclip);
79
80#endif
Note: See TracBrowser for help on using the repository browser.