(Metux) autogen.sh: not running ./configure anymore (breaks certain distro builders)
[mirror-ossqm-audiofile.git] / libaudiofile / track.c
blob14f273ad0e655857421810b4dbcf6310e9b098fa
1 /*
2 Audio File Library
3 Copyright (C) 1998, 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 track.c
24 This file contains functions for dealing with tracks within an
25 audio file.
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
32 #include <stddef.h>
33 #include <string.h>
34 #include <assert.h>
36 #include "audiofile.h"
37 #include "afinternal.h"
38 #include "util.h"
40 void afInitTrackIDs (AFfilesetup file, int *trackids, int trackCount)
42 assert(file);
43 assert(trackids);
44 assert(trackCount == 1);
45 assert(trackids[0] == AF_DEFAULT_TRACK);
48 int afGetTrackIDs (AFfilehandle file, int *trackids)
50 assert(file);
52 if (trackids != NULL)
53 trackids[0] = AF_DEFAULT_TRACK;
55 return 1;
58 _Track *_af_track_new (void)
60 _Track *t = _af_malloc(sizeof (_Track));
62 t->id = AF_DEFAULT_TRACK;
64 t->f.compressionParams = NULL;
65 t->v.compressionParams = NULL;
67 t->channelMatrix = NULL;
69 t->markerCount = 0;
70 t->markers = NULL;
72 t->hasAESData = false;
73 memset(t->aesData, 0, 24);
75 t->totalfframes = 0;
76 t->nextfframe = 0;
77 t->frames2ignore = 0;
78 t->fpos_first_frame = 0;
79 t->fpos_next_frame = 0;
80 t->fpos_after_data = 0;
81 t->totalvframes = 0;
82 t->nextvframe = 0;
83 t->data_size = 0;
85 t->ms.modulesdirty = true;
86 t->ms.nmodules = 0;
87 t->ms.chunk = NULL;
88 t->ms.module = NULL;
89 t->ms.buffer = NULL;
91 t->ms.filemodinst.valid = false;
92 t->ms.filemod_rebufferinst.valid = false;
93 t->ms.rateconvertinst.valid = false;
94 t->ms.rateconvert_rebufferinst.valid = false;
96 return t;