Lines Matching refs:file
65 printf (" wav - test WAV file peak chunk\n") ;
66 printf (" aiff - test AIFF file PEAK chunk\n") ;
228 { SNDFILE *file ;
247 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
249 sf_close (file) ;
253 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
255 sf_close (file) ;
269 SNDFILE *file ;
286 { puts ("/dev/full is not a device file") ;
295 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) != NULL)
296 { printf ("\n\nLine %d : Error, file should not have openned.\n", __LINE__ - 1) ;
300 errorstr = sf_strerror (file) ;
324 SNDFILE *file ;
333 ** Root is allowed to open a readonly file for write.
346 { printf ("\n\nLine %d : not able to open text file for write.\n", __LINE__) ;
350 fprintf (textfile, "This is a read only file.\n") ;
365 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) != NULL)
366 { printf ("\n\nLine %d : Error, file should not have opened.\n", __LINE__ - 1) ;
370 errorstr = sf_strerror (file) ;
394 SNDFILE *file ;
406 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
407 sf_command (file, SFC_WAVEX_SET_AMBISONIC, NULL, SF_AMBISONIC_B_FORMAT) ;
408 test_writef_short_or_die (file, 0, buffer, frames, __LINE__) ;
409 sf_close (file) ;
413 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
416 sf_command (file, SFC_WAVEX_GET_AMBISONIC, NULL, 0) != SF_AMBISONIC_B_FORMAT,
417 "\n\nLine %d : Error, this file should be in Ambisonic B format.\n", __LINE__
420 sf_close (file) ;
431 SNDFILE *file ;
444 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
446 exit_if_true (sf_command (file, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_FALSE) != SF_FALSE, "\n\nLine %d: sf_command failed.\n", __LINE__) ;
447 exit_if_true (sf_command (file, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) != SF_TRUE, "\n\nLine %d: sf_command failed.\n", __LINE__) ;
449 test_write_short_or_die (file, 0, output, ARRAY_LEN (output), __LINE__) ;
451 exit_if_true (sf_command (file, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_FALSE) != SF_TRUE, "\n\nLine %d: sf_command failed.\n", __LINE__) ;
452 exit_if_true (sf_command (file, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) != SF_TRUE, "\n\nLine %d: sf_command failed.\n", __LINE__) ;
454 sf_close (file) ;
459 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
462 exit_if_true (sfinfo.frames != ARRAY_LEN (output), "\n\nLine %d: Incorrect number of frames in file (too short). (%d should be %d)\n", __LINE__, (int) sfinfo.frames, (int) ARRAY_LEN (output)) ;
463 exit_if_true (sfinfo.channels != 1, "\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
465 check_log_buffer_or_die (file, __LINE__) ;
467 test_read_short_or_die (file, 0, input, ARRAY_LEN (input), __LINE__) ;
469 sf_close (file) ;
486 SNDFILE *file ;
502 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
504 exit_if_true (sf_command (file, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) != SF_TRUE, "\n\nLine %d: sf_command failed.\n", __LINE__) ;
507 { test_write_int_or_die (file, 0, output, ARRAY_LEN (output), __LINE__) ;
511 sf_close (file) ;
515 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
518 exit_if_true (sfinfo.channels != 1, "\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
519 exit_if_true (sfinfo.frames != output_frames, "\n\nLine %d: Incorrect number of frames in file (%d should be %d).\n", __LINE__, (int) sfinfo.frames, (int) output_frames) ;
522 test_read_int_or_die (file, 0, input, ARRAY_LEN (input), __LINE__) ;
525 check_log_buffer_or_die (file, __LINE__) ;
527 sf_close (file) ;