Lines Matching refs:sfinfo
651 SF_INFO sfinfo ;
668 sfinfo.samplerate = SAMPLE_RATE ;
669 sfinfo.frames = 123456789 ; /* Ridiculous value. */
670 sfinfo.channels = channels ;
671 sfinfo.format = filetype ;
673 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
681 memset (&sfinfo, 0, sizeof (sfinfo)) ;
683 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
685 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
686 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
690 if (sfinfo.frames < datalen / channels)
691 { printf ("Too few frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
695 if (sfinfo.frames > (datalen + datalen / 20))
696 { printf ("Too many frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
700 if (sfinfo.channels != channels)
726 if ((k = (int) sf_readf_short (file, data, datalen)) != sfinfo.frames - datalen)
728 channels * sfinfo.frames - datalen, k) ;
735 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
741 if (! sfinfo.seekable)
807 sf_seek (file, sfinfo.frames, SEEK_SET) ;
815 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
838 SF_INFO sfinfo ;
866 sfinfo.samplerate = SAMPLE_RATE ;
867 sfinfo.frames = 123456789 ; /* Ridiculous value. */
868 sfinfo.channels = channels ;
869 sfinfo.format = filetype ;
871 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
879 memset (&sfinfo, 0, sizeof (sfinfo)) ;
881 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
883 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
884 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
888 if (sfinfo.frames < datalen / channels)
889 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
893 if (sfinfo.frames > (datalen + datalen / 20))
894 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
898 if (sfinfo.channels != channels)
924 if ((k = (int) sf_readf_int (file, data, datalen)) != sfinfo.frames - datalen)
926 channels * sfinfo.frames - datalen, k) ;
933 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM)
934 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
940 if (! sfinfo.seekable)
1005 sf_seek (file, sfinfo.frames, SEEK_SET) ;
1013 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
1036 SF_INFO sfinfo ;
1054 sfinfo.samplerate = SAMPLE_RATE ;
1055 sfinfo.frames = 123456789 ; /* Ridiculous value. */
1056 sfinfo.channels = channels ;
1057 sfinfo.format = filetype ;
1059 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
1068 memset (&sfinfo, 0, sizeof (sfinfo)) ;
1070 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
1072 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
1073 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
1077 if (sfinfo.frames < datalen / channels)
1078 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1082 if (sfinfo.frames > (datalen + datalen / 20))
1083 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1087 if (sfinfo.channels != channels)
1119 if ((k = (int) sf_readf_float (file, data, datalen)) != sfinfo.frames - datalen)
1121 channels * sfinfo.frames - datalen, k) ;
1128 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM)
1129 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
1135 if (! sfinfo.seekable)
1200 sf_seek (file, sfinfo.frames, SEEK_SET) ;
1208 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
1231 SF_INFO sfinfo ;
1249 sfinfo.samplerate = SAMPLE_RATE ;
1250 sfinfo.frames = 123456789 ; /* Ridiculous value. */
1251 sfinfo.channels = channels ;
1252 sfinfo.format = filetype ;
1254 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
1263 memset (&sfinfo, 0, sizeof (sfinfo)) ;
1265 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
1267 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
1268 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
1272 if (sfinfo.frames < datalen / channels)
1273 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1277 if (sfinfo.frames > (datalen + datalen / 20))
1278 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1282 if (sfinfo.channels != channels)
1314 if ((k = (int) sf_readf_double (file, data, datalen)) != sfinfo.frames - datalen)
1316 channels * sfinfo.frames - datalen, k) ;
1323 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM)
1324 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
1330 if (! sfinfo.seekable)
1395 sf_seek (file, sfinfo.frames, SEEK_SET) ;
1403 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
1427 SF_INFO sfinfo ;
1447 sfinfo.samplerate = SAMPLE_RATE ;
1448 sfinfo.frames = 123456789 ; /* Ridiculous value. */
1449 sfinfo.channels = channels ;
1450 sfinfo.format = filetype ;
1458 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
1464 sfinfo.samplerate = 32000 ;
1468 sfinfo.samplerate = 12000 ;
1476 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
1492 memset (&sfinfo, 0, sizeof (sfinfo)) ;
1494 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
1496 if (sfinfo.format != filetype)
1497 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
1501 if (sfinfo.frames < datalen / channels)
1502 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1506 if (sfinfo.frames > (datalen + 400))
1507 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
1511 if (sfinfo.channels != channels)
1543 if ((k = (int) sf_read_short (file, data, datalen)) != sfinfo.frames - datalen)
1544 { printf ("\n\nLine %d: Incorrect read length (%d should be %" PRId64 ").\n", __LINE__, k, sfinfo.frames - datalen) ;
1548 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM &&
1549 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_GSM610)
1550 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
1557 if (sfinfo.seekable)
1617 sf_seek (file, sfinfo.frames, SEEK_SET) ;
1626 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
1636 } /* if (sfinfo.seekable) */
1647 SF_INFO sfinfo ;
1669 sfinfo.samplerate = SAMPLE_RATE ;
1670 sfinfo.frames = 123456789 ; /* Ridiculous value. */
1671 sfinfo.channels = channels ;
1672 sfinfo.format = filetype ;
1680 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
1686 sfinfo.samplerate = 32000 ;
1690 sfinfo.samplerate = 12000 ;
1698 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
1714 memset (&sfinfo, 0, sizeof (sfinfo)) ;
1716 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
1718 if (sfinfo.format != filetype)
1719 { printf ("Returned format incorrect (0x%08X => 0x%08X).\n", filetype, sfinfo.format) ;
1723 if (sfinfo.frames < datalen / channels)
1724 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1728 if (sfinfo.frames > (datalen + 400))
1729 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
1733 if (sfinfo.channels != channels)
1761 if ((k = (int) sf_readf_int (file, data, datalen)) != sfinfo.frames - datalen)
1762 { printf ("\n\nLine %d: Incorrect read length (%d should be %" PRId64 ").\n", __LINE__, k, sfinfo.frames - datalen) ;
1766 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_IMA_ADPCM &&
1767 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM &&
1768 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_GSM610 &&
1769 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_G721_32 &&
1770 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_G723_24 &&
1771 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_NMS_ADPCM_16 &&
1772 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_NMS_ADPCM_24 &&
1773 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_NMS_ADPCM_32)
1774 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
1781 if (sfinfo.seekable)
1841 sf_seek (file, sfinfo.frames, SEEK_SET) ;
1850 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
1860 } /* if (sfinfo.seekable) */
1871 SF_INFO sfinfo ;
1915 sfinfo.samplerate = SAMPLE_RATE ;
1916 sfinfo.frames = 123456789 ; /* Ridiculous value. */
1917 sfinfo.channels = channels ;
1918 sfinfo.format = filetype ;
1927 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
1933 sfinfo.samplerate = 32000 ;
1937 sfinfo.samplerate = 12000 ;
1945 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
1962 memset (&sfinfo, 0, sizeof (sfinfo)) ;
1964 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
1966 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
1967 { printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
1971 if (sfinfo.frames < datalen / channels)
1972 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
1976 if (sfinfo.frames > (datalen + 400))
1977 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
1981 if (sfinfo.channels != channels)
2014 if ((k = (int) sf_read_float (file, data, datalen)) != sfinfo.frames - datalen)
2015 { printf ("\n\nLine %d: Incorrect read length (%d should be %" PRId64 ").\n", __LINE__, k, sfinfo.frames - datalen) ;
2019 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM &&
2020 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_GSM610)
2021 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
2028 if (sfinfo.seekable)
2088 sf_seek (file, sfinfo.frames, SEEK_SET) ;
2097 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
2107 } /* if (sfinfo.seekable) */
2118 SF_INFO sfinfo ;
2159 sfinfo.samplerate = SAMPLE_RATE ;
2160 sfinfo.frames = 123456789 ; /* Ridiculous value. */
2161 sfinfo.channels = channels ;
2162 sfinfo.format = filetype ;
2170 if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
2176 sfinfo.samplerate = 32000 ;
2180 sfinfo.samplerate = 12000 ;
2188 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
2205 memset (&sfinfo, 0, sizeof (sfinfo)) ;
2207 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
2209 if (sfinfo.format != filetype)
2210 { printf ("Returned format incorrect (0x%08X => 0x%08X).\n", filetype, sfinfo.format) ;
2214 if (sfinfo.frames < datalen / channels)
2215 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
2219 if (sfinfo.frames > (datalen + 400))
2220 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
2224 if (sfinfo.channels != channels)
2258 if ((k = (int) sf_read_double (file, data, datalen)) != sfinfo.frames - datalen)
2259 { printf ("\n\nLine %d: Incorrect read length (%d should be %" PRId64 ").\n", __LINE__, k, sfinfo.frames - datalen) ;
2263 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM &&
2264 (sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_GSM610)
2265 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
2272 if (sfinfo.seekable)
2332 sf_seek (file, sfinfo.frames, SEEK_SET) ;
2341 if ((k = (int) sf_seek (file, 5 - sfinfo.frames, SEEK_END)) != 5)
2351 } /* if (sfinfo.seekable) */
2362 SF_INFO sfinfo ;
2379 sfinfo.samplerate = SAMPLE_RATE ;
2380 sfinfo.frames = 123456789 ; /* Ridiculous value. */
2381 sfinfo.channels = channels ;
2382 sfinfo.format = filetype ;
2384 file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
2392 memset (&sfinfo, 0, sizeof (sfinfo)) ;
2394 file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
2396 if (sfinfo.format != filetype)
2397 { printf ("Returned format incorrect (0x%08X => 0x%08X).\n", filetype, sfinfo.format) ;
2401 if (sfinfo.frames < datalen / channels)
2402 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
2406 if (sfinfo.frames > (datalen + 400))
2407 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", sfinfo.frames, datalen) ;
2411 if (sfinfo.channels != channels)
2419 if (count != sfinfo.channels * sfinfo.frames)
2420 { printf ("\nLine %d : sf_read_raw returned %" PRId64 " should be %" PRId64 "\n", __LINE__, count, sfinfo.channels * sfinfo.frames) ;