Lines Matching refs:frames

1244 				psf->sf.frames = position ;
1569 seek_from_start = psf->sf.frames + offset ;
1586 else if (seek_from_start < 0 || seek_from_start > psf->sf.frames)
1718 if (bytes < 0 || psf->read_current >= psf->sf.frames)
1734 if (psf->read_current + count / blockwidth <= psf->sf.frames)
1737 { count = (psf->sf.frames - psf->read_current) * blockwidth ;
1740 psf->read_current = psf->sf.frames ;
1776 if (psf->read_current >= psf->sf.frames)
1792 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
1795 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
1798 psf->read_current = psf->sf.frames ;
1807 sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames)
1811 if (frames == 0)
1816 if (frames <= 0)
1826 if (psf->read_current >= psf->sf.frames)
1827 { psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (short)) ;
1840 count = psf->read_short (psf, ptr, frames * psf->sf.channels) ;
1842 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
1845 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
1846 extra = frames * psf->sf.channels - count ;
1848 psf->read_current = psf->sf.frames ;
1884 if (psf->read_current >= psf->sf.frames)
1900 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
1903 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
1906 psf->read_current = psf->sf.frames ;
1915 sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames)
1919 if (frames == 0)
1924 if (frames <= 0)
1934 if (psf->read_current >= psf->sf.frames)
1935 { psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (int)) ;
1948 count = psf->read_int (psf, ptr, frames * psf->sf.channels) ;
1950 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
1953 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
1954 extra = frames * psf->sf.channels - count ;
1956 psf->read_current = psf->sf.frames ;
1992 if (psf->read_current >= psf->sf.frames)
2008 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
2011 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
2014 psf->read_current = psf->sf.frames ;
2023 sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames)
2027 if (frames == 0)
2032 if (frames <= 0)
2042 if (psf->read_current >= psf->sf.frames)
2043 { psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (float)) ;
2056 count = psf->read_float (psf, ptr, frames * psf->sf.channels) ;
2058 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
2061 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
2062 extra = frames * psf->sf.channels - count ;
2064 psf->read_current = psf->sf.frames ;
2100 if (psf->read_current >= psf->sf.frames)
2116 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
2119 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
2122 psf->read_current = psf->sf.frames ;
2131 sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames)
2135 if (frames == 0)
2140 if (frames <= 0)
2150 if (psf->read_current >= psf->sf.frames)
2151 { psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (double)) ;
2164 count = psf->read_double (psf, ptr, frames * psf->sf.channels) ;
2166 if (psf->read_current + count / psf->sf.channels <= psf->sf.frames)
2169 { count = (psf->sf.frames - psf->read_current) * psf->sf.channels ;
2170 extra = frames * psf->sf.channels - count ;
2172 psf->read_current = psf->sf.frames ;
2228 if (psf->write_current > psf->sf.frames)
2229 { psf->sf.frames = psf->write_current ;
2288 if (psf->write_current > psf->sf.frames)
2289 { psf->sf.frames = psf->write_current ;
2300 sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames)
2304 if (frames == 0)
2309 if (frames <= 0)
2334 count = psf->write_short (psf, ptr, frames * psf->sf.channels) ;
2340 if (psf->write_current > psf->sf.frames)
2341 { psf->sf.frames = psf->write_current ;
2400 if (psf->write_current > psf->sf.frames)
2401 { psf->sf.frames = psf->write_current ;
2412 sf_writef_int (SNDFILE *sndfile, const int *ptr, sf_count_t frames)
2416 if (frames == 0)
2421 if (frames <= 0)
2446 count = psf->write_int (psf, ptr, frames * psf->sf.channels) ;
2452 if (psf->write_current > psf->sf.frames)
2453 { psf->sf.frames = psf->write_current ;
2512 if (psf->write_current > psf->sf.frames)
2513 { psf->sf.frames = psf->write_current ;
2524 sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames)
2528 if (frames == 0)
2533 if (frames <= 0)
2558 count = psf->write_float (psf, ptr, frames * psf->sf.channels) ;
2564 if (psf->write_current > psf->sf.frames)
2565 { psf->sf.frames = psf->write_current ;
2624 if (psf->write_current > psf->sf.frames)
2625 { psf->sf.frames = psf->write_current ;
2636 sf_writef_double (SNDFILE *sndfile, const double *ptr, sf_count_t frames)
2640 if (frames == 0)
2645 if (frames <= 0)
2670 count = psf->write_double (psf, ptr, frames * psf->sf.channels) ;
2676 if (psf->write_current > psf->sf.frames)
2677 { psf->sf.frames = psf->write_current ;
2927 if (sfinfo->frames < 0)
3336 { psf->write_current = psf->sf.frames ;
3337 psf->have_written = psf->sf.frames > 0 ? SF_TRUE : SF_FALSE ;
3344 sfinfo->frames = 0 ;