Lines Matching refs:sfinfo_in
126 SF_INFO sfinfo_in; in permute() local
127 sfinfo_in.format = 0; in permute()
128 sf_in = sf_open(path_in, SFM_READ, &sfinfo_in); in permute()
135 unsigned type = sfinfo_in.format & SF_FORMAT_TYPEMASK; in permute()
146 unsigned subtype = sfinfo_in.format & SF_FORMAT_SUBMASK; in permute()
164 unsigned endianness = sfinfo_in.format & SF_FORMAT_ENDMASK; in permute()
175 switch (sfinfo_in.samplerate) { in permute()
185 fprintf(stderr, "%s: unsupported sample rate %d\n", path_in, sfinfo_in.samplerate); in permute()
191 switch (sfinfo_in.channels) { in permute()
194 frameSizeRead = sampleSizeRead * sfinfo_in.channels; in permute()
197 fprintf(stderr, "%s: unsupported channels %d\n", path_in, sfinfo_in.channels); in permute()
202 switch (sfinfo_in.frames) { in permute()
205 fprintf(stderr, "%s: unsupported frames %d\n", path_in, (int) sfinfo_in.frames); in permute()
212 double durationSeconds = (double) sfinfo_in.frames / (double) sfinfo_in.samplerate; in permute()
214 s.mMinSegmentLengthFrames = minSegmentLengthSeconds * sfinfo_in.samplerate; in permute()
224 used = split(&s, 0, sfinfo_in.frames, s.mSegmentMax); in permute()
241 void *ptr = malloc(sfinfo_in.frames * frameSizeRead); in permute()
244 count = sf_readf_short(sf_in, ptr, sfinfo_in.frames); in permute()
245 if (count != sfinfo_in.frames) { in permute()
247 (int) sfinfo_in.frames, (int) count); in permute()
259 sfinfo_out.samplerate = sfinfo_in.samplerate; in permute()
260 sfinfo_out.channels = sfinfo_in.channels; in permute()
261 sfinfo_out.format = sfinfo_in.format; in permute()
270 count = sf_writef_short(sf_out, &((short *) ptr)[sfinfo_in.channels * s.mSegmentArray[i] in permute()
279 assert(permutedStart == sfinfo_in.frames); in permute()
294 sfinfo_in.samplerate), (unsigned) ((s.mSegmentArray[i].mFrameLength * 1000.0) / in permute()
295 sfinfo_in.samplerate)); in permute()