Lines Matching defs:ti
68 static struct track_info ti;
99 ti.format = AUDIO_FORMAT_DEFAULT;
100 ti.total_size = -1;
120 ti.format = audio_format_from_str(optarg);
121 if (ti.format < 0)
126 decode_int(optarg, &ti.channels);
127 if (ti.channels < 0 || ti.channels > 16)
140 ti.header_info = optarg;
148 decode_int(optarg, &ti.precision);
149 if (ti.precision != 4 && ti.precision != 8 &&
150 ti.precision != 16 && ti.precision != 24 &&
151 ti.precision != 32)
169 ti.qflag++;
172 decode_int(optarg, &ti.sample_rate);
173 if (ti.sample_rate < 0 || ti.sample_rate > 48000 * 2) /* XXX */
204 ti.encoding = audio_enc_to_val(encoding_str);
205 if (ti.encoding == -1)
214 if (ti.format == AUDIO_FORMAT_DEFAULT)
220 ti.format = AUDIO_FORMAT_SUN;
222 ti.format = AUDIO_FORMAT_WAV;
224 ti.outfd = open(*argv, O_CREAT|(aflag ? O_APPEND : O_TRUNC)|O_WRONLY, 0666);
225 if (ti.outfd < 0)
228 ti.outfd = STDOUT_FILENO;
274 #define SETINFO(x) SETINFO2(ti.x, x)
297 ti.total_size = 0;
299 write_header(&ti);
300 if (ti.format == AUDIO_FORMAT_NONE)
302 conv_func = write_get_conv_func(&ti);
363 if (write(ti.outfd, buffer, nread) != nread)
365 ti.total_size += nread;
387 close(ti.outfd);
406 if (ti.outfd == STDOUT_FILENO)
408 if (lseek(ti.outfd, (off_t)0, SEEK_SET) == (off_t)-1)
410 write_header(&ti);