Lines Matching refs:sfinfo
78 SF_INFO sfinfo ;
101 sfinfo.samplerate = SAMPLE_RATE ;
102 sfinfo.frames = 123456789 ; /* Ridiculous value. */
103 sfinfo.channels = 1 ;
104 sfinfo.format = filetype ;
106 if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
121 memset (&sfinfo, 0, sizeof (sfinfo)) ;
123 if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
129 if ((sfinfo.format & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)) != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
130 { printf ("Line %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
134 if (sfinfo.frames < datalen)
135 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
139 if (sfinfo.frames > (datalen + datalen / 2))
140 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ;
144 if (sfinfo.channels != 1)
171 if ((k = sf_readf_int (file, data, datalen)) != sfinfo.frames - datalen)
172 { printf ("Line %d: Incorrect read length (%" PRId64 " should be %d).\n", __LINE__, sfinfo.frames - datalen, k) ;
179 if ((sfinfo.format & SF_FORMAT_SUBMASK) != SF_FORMAT_MS_ADPCM)
180 for (k = 0 ; k < sfinfo.frames - datalen ; k++)
186 if (! sfinfo.seekable)
257 sf_seek (file, (int) sfinfo.frames, SEEK_SET) ;
265 if ((k = sf_seek (file, 5 - (int) sfinfo.frames, SEEK_END)) != 5)