1 /* 2 fout.h: 3 4 Copyright (C) 1999 Gabriel Maldonado, John ffitch 5 6 This file is part of Csound. 7 8 The Csound Library is free software; you can redistribute it 9 and/or modify it under the terms of the GNU Lesser General Public 10 License as published by the Free Software Foundation; either 11 version 2.1 of the License, or (at your option) any later version. 12 13 Csound is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU Lesser General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public 19 License along with Csound; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 21 02110-1301 USA 22 */ 23 24 #ifndef FOUT_H 25 #define FOUT_H 26 27 #include "stdopcod.h" 28 29 typedef struct FOUT_FILE_ { 30 OPDS h; 31 SNDFILE *sf; 32 FILE *f; 33 void *fd; 34 int32_t bufsize; 35 int32_t nchnls; 36 int32_t async; 37 int32_t idx; /* file index + 1 */ 38 } FOUT_FILE; 39 40 typedef struct { 41 OPDS h; 42 MYFLT *fname, *iflag, *argums[VARGMAX-2]; 43 MYFLT scaleFac; 44 int32_t nargs; 45 int32_t buf_pos; 46 int32_t guard_pos; 47 AUXCH buf; 48 FOUT_FILE f; 49 } OUTFILE; 50 51 typedef struct { 52 OPDS h; 53 MYFLT *fname, *iflag; 54 ARRAYDAT* tabin; 55 MYFLT scaleFac; 56 int32_t buf_pos; 57 int32_t guard_pos; 58 AUXCH buf; 59 FOUT_FILE f; 60 } OUTFILEA; 61 62 typedef struct { 63 OPDS h; 64 MYFLT *fname, *iflag, *argums[VARGMAX-2]; 65 MYFLT scaleFac; 66 uint32_t nargs; 67 int32_t buf_pos; 68 int32_t guard_pos; 69 AUXCH buf; 70 FOUT_FILE f; 71 } KOUTFILE; 72 73 typedef struct { 74 OPDS h; 75 MYFLT *fname, *iskpfrms, *iflag, *argums[VARGMAX-3]; 76 MYFLT scaleFac; 77 int32 currpos; 78 int32_t flag; 79 int32_t nargs; 80 int32_t buf_pos; 81 int32_t guard_pos; 82 int32_t frames; 83 uint32_t remain; 84 AUXCH buf; 85 FOUT_FILE f; 86 } INFILE; 87 88 typedef struct { 89 OPDS h; 90 MYFLT *fname, *iskpfrms, *iflag; 91 ARRAYDAT *tabout; 92 MYFLT scaleFac; 93 int32 currpos; 94 int32_t flag; 95 int32_t chn; 96 int32_t buf_pos; 97 int32_t guard_pos; 98 int32_t frames; 99 uint32_t remain; 100 AUXCH buf; 101 FOUT_FILE f; 102 } INFILEA; 103 104 typedef struct { 105 OPDS h; 106 MYFLT *fname, *iskpfrms, *iflag, *argums[VARGMAX-3]; 107 MYFLT scaleFac; 108 int32 currpos; 109 int32_t flag; 110 int32_t nargs; 111 int32_t buf_pos; 112 int32_t guard_pos; 113 int32_t frames; 114 int32_t remain; 115 AUXCH buf; 116 FOUT_FILE f; 117 } KINFILE; 118 119 typedef struct { 120 OPDS h; 121 MYFLT *fname, *iskpfrms, *iflag, *argums[VARGMAX-3]; 122 int32 currpos; 123 int32_t flag; 124 } I_INFILE; 125 126 typedef struct { 127 OPDS h; 128 MYFLT *avar, *aincr; 129 } INCR; 130 131 typedef struct { 132 OPDS h; 133 MYFLT *argums[VARGMAX]; 134 } CLEARS; 135 136 typedef struct { 137 OPDS h; 138 MYFLT *ihandle, *fname; 139 /* iascii=0 open ascii (default), iflag=1 open binary */ 140 MYFLT *iascii; 141 } FIOPEN; 142 143 typedef struct { 144 OPDS h; 145 MYFLT *iFile; 146 } FICLOSE; 147 148 typedef struct { 149 OPDS h; 150 MYFLT *ihandle, *iascii, *iflag, *argums[VARGMAX-3]; 151 } IOUTFILE; 152 153 typedef struct { 154 OPDS h; 155 MYFLT *ihandle, *iascii, *iflag, *argums[VARGMAX-3]; 156 int32 counter; 157 int32_t done; 158 } IOUTFILE_R; 159 160 typedef struct { 161 OPDS h; 162 MYFLT *fname; 163 STRINGDAT *fmt; 164 MYFLT *argums[VARGMAX-2]; 165 FOUT_FILE f; 166 char txtstring[8192]; /* Place to store the string printed */ 167 } FPRINTF; 168 169 #endif /* FOUT_H */ 170 171