/third_party/libsnd/tests/ |
H A D | raw_test.c | 33 #include <sndfile.h> 63 { SNDFILE *sndfile ; in raw_offset_test() local 75 sndfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ; in raw_offset_test() 78 sf_command (sndfile, SFC_FILE_TRUNCATE, &start, sizeof (start)) ; in raw_offset_test() 82 test_write_short_or_die (sndfile, 0, data, BUFFER_LEN, __LINE__) ; in raw_offset_test() 84 sf_close (sndfile) ; in raw_offset_test() 86 sndfile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ; in raw_offset_test() 87 check_log_buffer_or_die (sndfile, __LINE__) ; in raw_offset_test() 91 dump_log_buffer (sndfile) ; in raw_offset_test() 96 test_read_short_or_die (sndfile, in raw_offset_test() [all...] |
H A D | error_test.c | 32 #include <sndfile.h> 105 { SNDFILE *sndfile ; in no_file_test() local 113 sndfile = sf_open (filename, SFM_READ, &sfinfo) ; in no_file_test() 115 exit_if_true (sndfile != NULL, "\n\nLine %d : should not have received a valid SNDFILE* pointer.\n", __LINE__) ; in no_file_test() 123 { SNDFILE *sndfile ; in zero_length_test() local 135 sndfile = sf_open (filename, SFM_READ, &sfinfo) ; in zero_length_test() 137 exit_if_true (sndfile != NULL, "\n\nLine %d : should not have received a valid SNDFILE* pointer.\n", __LINE__) ; in zero_length_test() 149 { SNDFILE *sndfile ; in bad_wav_test() local 166 sndfile = sf_open (filename, SFM_READ, &sfinfo) ; in bad_wav_test() 168 if (sndfile) in bad_wav_test() 179 { SNDFILE *sndfile ; wav_list_recover_test() local 220 SNDFILE *sndfile ; error_close_test() local 266 SNDFILE *sndfile ; unrecognised_test() local [all...] |
H A D | multi_file_test.c | 39 #include <sndfile.h> 131 { SNDFILE *sndfile ; in multi_file_test() local 170 if ((sndfile = sf_open_fd (fd, SFM_READ, &sfinfo, SF_FALSE)) == NULL) in multi_file_test() 173 puts (sf_strerror (sndfile)) ; in multi_file_test() 174 dump_log_buffer (sndfile) ; in multi_file_test() 178 sf_command (sndfile, SFC_GET_EMBED_FILE_INFO, &embed_info, sizeof (embed_info)) ; in multi_file_test() 180 sf_close (sndfile) ; in multi_file_test() 206 { SNDFILE *sndfile ; in write_file_at_end() local 222 if ((sndfile = sf_open_fd (fd, SFM_WRITE, &sfinfo, SF_FALSE)) == NULL) in write_file_at_end() 225 puts (sf_strerror (sndfile)) ; in write_file_at_end() [all...] |
H A D | format_check_test.c | 31 #include "sndfile.h" 100 SNDFILE * sndfile ; in format_combo_test() local 136 sndfile = sf_open (filename, SFM_WRITE, &info) ; in format_combo_test() 138 sf_close (sndfile) ; in format_combo_test() 147 sndfile && NOT (check_is_valid), in format_combo_test() 155 NOT (sndfile) && check_is_valid, in format_combo_test()
|
H A D | command_test.c | 36 #include <sndfile.h> 706 { SNDFILE *sndfile ; in instrumet_rw_test() local 711 sndfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_FALSE, __LINE__) ; in instrumet_rw_test() 713 if (sf_command (sndfile, SFC_GET_INSTRUMENT, &inst, sizeof (inst)) == SF_TRUE) in instrumet_rw_test() 716 if (sf_command (sndfile, SFC_SET_INSTRUMENT, &inst, sizeof (inst)) == SF_TRUE) in instrumet_rw_test() 719 printf ("Error: SFC_SET_INSTRUMENT on [%s] [%s]\n", filename, sf_strerror (sndfile)) ; in instrumet_rw_test() 722 printf ("Error: SFC_GET_INSTRUMENT on [%s] [%s]\n", filename, sf_strerror (sndfile)) ; in instrumet_rw_test() 725 if (sf_command (sndfile, SFC_UPDATE_HEADER_NOW, NULL, 0) != 0) in instrumet_rw_test() 726 printf ("Error: SFC_UPDATE_HEADER_NOW on [%s] [%s]\n", filename, sf_strerror (sndfile)) ; in instrumet_rw_test() 728 sf_write_sync (sndfile) ; in instrumet_rw_test() 895 { SNDFILE *sndfile ; cue_rw_test() local [all...] |
H A D | sfversion.c | 26 #include <sndfile.h>
|
H A D | sftest.c | 29 #include <sndfile.h>
|
H A D | largefile_test.c | 31 #include <sndfile.h>
|
/third_party/libsnd/include/ |
H A D | sndfile.h | 20 ** sndfile.h -- system-wide definitions 619 int sf_error (SNDFILE *sndfile) ; 626 const char* sf_strerror (SNDFILE *sndfile) ; 642 int sf_perror (SNDFILE *sndfile) ; 643 int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ; 650 int sf_command (SNDFILE *sndfile, int command, void *data, int datasize) ; 676 sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ; 687 int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ; 689 const char* sf_get_string (SNDFILE *sndfile, int str_type) ; 707 int sf_current_byterate (SNDFILE *sndfile) ; [all...] |
/third_party/libsnd/ossfuzz/ |
H A D | sndfile_alt_fuzzer.cc | 4 #include <sndfile.h> 21 SNDFILE *sndfile = NULL ; in LLVMFuzzerTestOneInput() local 22 int err = sf_init_file(data, size, &sndfile, &vio_data, &vio, &sndfile_info) ; in LLVMFuzzerTestOneInput() 35 while (sf_read_short(sndfile, read_buffer, size)) in LLVMFuzzerTestOneInput() 49 while (sf_read_int(sndfile, read_buffer, size)) in LLVMFuzzerTestOneInput() 63 while (sf_read_double(sndfile, read_buffer, size)) in LLVMFuzzerTestOneInput() 75 if (sndfile != NULL) in LLVMFuzzerTestOneInput() 76 sf_close(sndfile); in LLVMFuzzerTestOneInput()
|
H A D | sndfile_fuzzer.cc | 5 #include <sndfile.h> 14 SNDFILE *sndfile = NULL ; in LLVMFuzzerTestOneInput() local 17 int err = sf_init_file(data, size, &sndfile, &vio_data, &vio, &sndfile_info) ; in LLVMFuzzerTestOneInput() 26 while (sf_readf_float(sndfile, read_buffer, 1)) in LLVMFuzzerTestOneInput() 33 if (sndfile != NULL) in LLVMFuzzerTestOneInput() 34 sf_close(sndfile) ; in LLVMFuzzerTestOneInput()
|
H A D | sndfile_fuzz_header.h | 88 SNDFILE **sndfile, in sf_init_file() 108 *sndfile = sf_open_virtual(vio, SFM_READ, sndfile_info, vio_data) ; in sf_init_file() 86 sf_init_file(const uint8_t *data, size_t size, SNDFILE **sndfile, VIO_DATA *vio_data, SF_VIRTUAL_IO *vio, SF_INFO *sndfile_info) sf_init_file() argument
|
/third_party/libsnd/programs/ |
H A D | sndfile-salvage.c | 51 #include <sndfile.h> 86 static void copy_data (int fd, SNDFILE * sndfile, int readsize) ; 99 { SNDFILE * sndfile ; in salvage_file() local 120 if ((sndfile = sf_open (broken_wav, SFM_READ, &sfinfo)) == NULL) in salvage_file() 124 sf_close (sndfile) ; in salvage_file() 171 if ((sndfile = sf_open (fixed_w64, SFM_WRITE, &sfinfo)) == NULL) in salvage_file() 178 copy_data (fd, sndfile, read_size) ; in salvage_file() 180 sf_close (sndfile) ; in salvage_file() 278 copy_data (int fd, SNDFILE * sndfile, int readsize) in copy_data() argument 292 if ((count = sf_write_raw (sndfile, buffe in copy_data() [all...] |
H A D | sndfile-play.c | 46 #include <sndfile.h> 93 SNDFILE *sndfile ; in alsa_play() local 102 if (! (sndfile = sf_open (argv [k], SFM_READ, &sfinfo))) in alsa_play() 121 sf_command (sndfile, SFC_CALC_SIGNAL_MAX, &scale, sizeof (scale)) ; in alsa_play() 127 while ((readcount = sf_read_float (sndfile, buffer, BUFFER_LEN))) in alsa_play() 134 { while ((readcount = sf_read_float (sndfile, buffer, BUFFER_LEN))) in alsa_play() 141 sf_close (sndfile) ; in alsa_play() 365 SNDFILE *sndfile ; in opensoundsys_play() local 373 if (! (sndfile = sf_open (argv [k], SFM_READ, &sfinfo))) in opensoundsys_play() 392 sf_command (sndfile, SFC_CALC_SIGNAL_MA in opensoundsys_play() 500 SNDFILE *sndfile ; global() member 679 SNDFILE *sndfile ; sndio_play() local 738 SNDFILE *sndfile ; solaris_play() local [all...] |
/third_party/pulseaudio/src/pulsecore/ |
H A D | sound-file-stream.c | 30 #include <sndfile.h> 41 #include <pulsecore/sndfile-util.h> 52 SNDFILE *sndfile; member 53 sf_count_t (*readf_function)(SNDFILE *sndfile, void *ptr, sf_count_t frames); 90 if (u->sndfile) in file_stream_free() 91 sf_close(u->sndfile); in file_stream_free() 160 if (!u->sndfile) in sink_input_pop_cb() 170 n = u->readf_function(u->sndfile, p, (sf_count_t) (length/fs)); in sink_input_pop_cb() 173 n = sf_read_raw(u->sndfile, p, (sf_count_t) length); in sink_input_pop_cb() 181 sf_close(u->sndfile); in sink_input_pop_cb() [all...] |
H A D | sndfile-util.h | 23 #include <sndfile.h> 37 typedef sf_count_t (*pa_sndfile_readf_t)(SNDFILE *sndfile, void *ptr, sf_count_t frames); 38 typedef sf_count_t (*pa_sndfile_writef_t)(SNDFILE *sndfile, const void *ptr, sf_count_t frames);
|
H A D | sound-file.c | 28 #include <sndfile.h> 36 #include <pulsecore/sndfile-util.h> 52 sf_count_t (*readf_function)(SNDFILE *sndfile, void *ptr, sf_count_t frames) = NULL; in pa_sound_file_load()
|
/third_party/libsnd/regtest/ |
H A D | database.c | 35 #include <sndfile.h> 115 cmd = "create table sndfile (ekey INTEGER PRIMARY KEY," in db_create() 161 snprintf (db->cmdbuf, sizeof (db->cmdbuf), "select fname from sndfile where fname='%s'", filename) ; in db_file_exists() 174 SNDFILE * sndfile ; in db_add_file() local 189 sndfile = sf_open (db->pathname, SFM_READ, &info) ; in db_add_file() 190 sf_command (sndfile, SFC_GET_LOG_INFO, db->logbuf, sizeof (db->logbuf)) ; in db_add_file() 191 checksum = (sndfile == NULL) ? 0 : calc_checksum (sndfile, &info) ; in db_add_file() 192 sf_close (sndfile) ; in db_add_file() 194 if (sndfile in db_add_file() 340 { SNDFILE * sndfile ; check_file_by_ekey() local [all...] |
/third_party/libsnd/src/ |
H A D | sndfile.c | 26 #include "sndfile.h" 521 sf_close (SNDFILE *sndfile) in sf_close() argument 524 VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ; in sf_close() 530 sf_write_sync (SNDFILE *sndfile) in sf_write_sync() argument 533 if ((psf = (SF_PRIVATE *) sndfile) == NULL) in sf_write_sync() 567 sf_strerror (SNDFILE *sndfile) in sf_strerror() argument 571 if (sndfile == NULL) in sf_strerror() 577 { psf = (SF_PRIVATE *) sndfile ; in sf_strerror() 595 sf_error (SNDFILE *sndfile) in sf_error() argument 598 if (sndfile in sf_error() 613 sf_perror(SNDFILE *sndfile) sf_perror() argument 634 sf_error_str(SNDFILE *sndfile, char *str, size_t maxlen) sf_error_str() argument 999 sf_command(SNDFILE *sndfile, int command, void *data, int datasize) sf_command() argument 1505 sf_seek(SNDFILE *sndfile, sf_count_t offset, int whence) sf_seek() argument 1623 sf_get_string(SNDFILE *sndfile, int str_type) sf_get_string() argument 1635 sf_set_string(SNDFILE *sndfile, int str_type, const char* str) sf_set_string() argument 1647 sf_current_byterate(SNDFILE *sndfile) sf_current_byterate() argument 1700 sf_read_raw(SNDFILE *sndfile, void *ptr, sf_count_t bytes) sf_read_raw() argument 1752 sf_read_short(SNDFILE *sndfile, short *ptr, sf_count_t len) sf_read_short() argument 1807 sf_readf_short(SNDFILE *sndfile, short *ptr, sf_count_t frames) sf_readf_short() argument 1860 sf_read_int(SNDFILE *sndfile, int *ptr, sf_count_t len) sf_read_int() argument 1915 sf_readf_int(SNDFILE *sndfile, int *ptr, sf_count_t frames) sf_readf_int() argument 1968 sf_read_float(SNDFILE *sndfile, float *ptr, sf_count_t len) sf_read_float() argument 2023 sf_readf_float(SNDFILE *sndfile, float *ptr, sf_count_t frames) sf_readf_float() argument 2076 sf_read_double(SNDFILE *sndfile, double *ptr, sf_count_t len) sf_read_double() argument 2131 sf_readf_double(SNDFILE *sndfile, double *ptr, sf_count_t frames) sf_readf_double() argument 2184 sf_write_raw(SNDFILE *sndfile, const void *ptr, sf_count_t len) sf_write_raw() argument 2243 sf_write_short(SNDFILE *sndfile, const short *ptr, sf_count_t len) sf_write_short() argument 2300 sf_writef_short(SNDFILE *sndfile, const short *ptr, sf_count_t frames) sf_writef_short() argument 2355 sf_write_int(SNDFILE *sndfile, const int *ptr, sf_count_t len) sf_write_int() argument 2412 sf_writef_int(SNDFILE *sndfile, const int *ptr, sf_count_t frames) sf_writef_int() argument 2467 sf_write_float(SNDFILE *sndfile, const float *ptr, sf_count_t len) sf_write_float() argument 2524 sf_writef_float(SNDFILE *sndfile, const float *ptr, sf_count_t frames) sf_writef_float() argument 2579 sf_write_double(SNDFILE *sndfile, const double *ptr, sf_count_t len) sf_write_double() argument 2636 sf_writef_double(SNDFILE *sndfile, const double *ptr, sf_count_t frames) sf_writef_double() argument 3385 sf_set_chunk(SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) sf_set_chunk() argument 3400 sf_get_chunk_iterator(SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) sf_get_chunk_iterator() argument 3414 SNDFILE *sndfile = iterator ? iterator->sndfile : NULL ; sf_next_chunk_iterator() local 3427 SNDFILE *sndfile = iterator ? iterator->sndfile : NULL ; sf_get_chunk_size() local 3443 SNDFILE *sndfile = iterator ? iterator->sndfile : NULL ; sf_get_chunk_data() local [all...] |
/third_party/libsnd/examples/ |
H A D | generate.cs | 154 static extern int sf_error (IntPtr sndfile); in sf_error() argument 157 static extern IntPtr sf_strerror (IntPtr sndfile); in sf_strerror() argument 163 static extern sf_count_t sf_read_float (IntPtr sndfile, float[] ptr, sf_count_t items); in sf_read_float() argument 166 static extern sf_count_t sf_write_float (IntPtr sndfile, float[] ptr, sf_count_t items); in sf_write_float() argument 169 static extern int sf_close (IntPtr sndfile); in sf_close() argument
|
H A D | sndfilehandle.cc | 22 #include <sndfile.hh>
|
H A D | list_formats.c | 38 #include <sndfile.h>
|
H A D | sfprocess.c | 37 #include <sndfile.h>
|
/third_party/pulseaudio/src/utils/ |
H A D | pacat.c | 36 #include <sndfile.h> 45 #include <pulsecore/sndfile-util.h> 87 static SNDFILE* sndfile = NULL; variable 179 pa_assert(!sndfile); in stream_write_callback() 188 pa_assert(sndfile); in stream_write_callback() 202 if ((bytes = readf_function(sndfile, data, (sf_count_t) (data_length/k))) > 0) in stream_write_callback() 206 bytes = sf_read_raw(sndfile, data, (sf_count_t) data_length); in stream_write_callback() 235 pa_assert(!sndfile); in stream_read_callback() 267 pa_assert(sndfile); in stream_read_callback() 295 if ((bytes = writef_function(sndfile, dat in stream_read_callback() [all...] |
/third_party/libsnd/Octave/ |
H A D | sndfile_play.m | 19 ## Play @var{data} at sample rate @var{fs} using the sndfile-play 51 cmd = sprintf ("sndfile-play %s", filename) ;
|