Lines Matching refs:file
54 SNDFILE * file ;
70 /* Set up output file type. */
75 /* Write the output file. */
76 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
77 test_write_short_or_die (file, 0, data_out.s, ARRAY_LEN (data_out.s), __LINE__) ;
78 sf_close (file) ;
80 /* Read the file in again. */
83 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
84 test_read_short_or_die (file, 0, data_in.s, ARRAY_LEN (data_in.s), __LINE__) ;
85 sf_close (file) ;
92 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
94 test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
95 test_read_short_or_die (file, 0, seek_data, ARRAY_LEN (seek_data), __LINE__) ;
98 /* Test seek to end of file. */
99 test_seek_or_die (file, 0, SEEK_END, sfinfo.frames, sfinfo.channels, __LINE__) ;
101 sf_close (file) ;
112 SNDFILE * file ;
128 /* Set up output file type. */
133 /* Write the output file. */
134 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
135 test_write_int_or_die (file, 0, data_out.i, ARRAY_LEN (data_out.i), __LINE__) ;
136 sf_close (file) ;
138 /* Read the file in again. */
141 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
142 test_read_int_or_die (file, 0, data_in.i, ARRAY_LEN (data_in.i), __LINE__) ;
143 sf_close (file) ;
150 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
152 test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
153 test_read_int_or_die (file, 0, seek_data, ARRAY_LEN (seek_data), __LINE__) ;
156 sf_close (file) ;
167 SNDFILE * file ;
177 /* Set up output file type. */
182 /* Write the output file. */
183 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
184 test_write_float_or_die (file, 0, data_out.f, ARRAY_LEN (data_out.f), __LINE__) ;
185 sf_close (file) ;
187 /* Read the file in again. */
190 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
191 test_read_float_or_die (file, 0, data_in.f, ARRAY_LEN (data_in.f), __LINE__) ;
192 sf_close (file) ;
199 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
201 test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
202 test_read_float_or_die (file, 0, seek_data, ARRAY_LEN (seek_data), __LINE__) ;
205 sf_close (file) ;
216 SNDFILE * file ;
226 /* Set up output file type. */
231 /* Write the output file. */
232 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
233 test_write_double_or_die (file, 0, data_out.d, ARRAY_LEN (data_out.d), __LINE__) ;
234 sf_close (file) ;
236 /* Read the file in again. */
239 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
240 test_read_double_or_die (file, 0, data_in.d, ARRAY_LEN (data_in.d), __LINE__) ;
241 sf_close (file) ;
248 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
250 test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
251 test_read_double_or_die (file, 0, seek_data, ARRAY_LEN (seek_data), __LINE__) ;
254 sf_close (file) ;
267 SNDFILE * file ;
282 /* Set up output file type. */
287 /* Write the output file. */
288 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
289 test_write_float_or_die (file, 0, stereo_out, ARRAY_LEN (stereo_out), __LINE__) ;
290 sf_close (file) ;
292 /* Open file in again for reading. */
294 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
296 /* Read in the whole file. */
297 test_read_float_or_die (file, 0, stereo_out, ARRAY_LEN (stereo_out), __LINE__) ;
300 test_seek_or_die (file, 234, SEEK_SET, 234, sfinfo.channels, __LINE__) ;
301 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
304 test_seek_or_die (file, 442, SEEK_SET, 442, sfinfo.channels, __LINE__) ;
305 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
308 test_seek_or_die (file, 12, SEEK_CUR, 442 + 10 + 12, sfinfo.channels, __LINE__) ;
309 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
312 test_seek_or_die (file, 12, SEEK_CUR, 442 + 20 + 24, sfinfo.channels, __LINE__) ;
313 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
317 test_seek_or_die (file, pos, SEEK_END, 500, sfinfo.channels, __LINE__) ;
318 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
322 test_seek_or_die (file, pos, SEEK_END, 10, sfinfo.channels, __LINE__) ;
323 test_readf_float_or_die (file, 0, data, 10, __LINE__) ;
326 sf_close (file) ;