Lines Matching defs:frame

79 	const FLAC__Frame *frame ;
128 static FLAC__StreamDecoderWriteStatus sf_flac_write_callback (const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const int32_t * const buffer [], void *client_data) ;
177 const FLAC__Frame *frame = pflac->frame ;
181 if (psf->sf.channels != (int) frame->header.channels)
182 { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n"
184 psf->sf.channels, frame->header.channels) ;
190 ** frame->header.blocksize is variable and we're using a constant blocksize
194 if (frame->header.blocksize > FLAC__MAX_BLOCK_SIZE)
195 { psf_log_printf (psf, "Ooops : frame->header.blocksize (%d) > FLAC__MAX_BLOCK_SIZE (%d)\n", __func__, __LINE__, frame->header.blocksize, FLAC__MAX_BLOCK_SIZE) ;
200 if (frame->header.channels > FLAC__MAX_CHANNELS)
201 psf_log_printf (psf, "Ooops : frame->header.channels (%d) > FLAC__MAX_BLOCK_SIZE (%d)\n", __func__, __LINE__, frame->header.channels, FLAC__MAX_CHANNELS) ;
203 channels = SF_MIN (frame->header.channels, FLAC__MAX_CHANNELS) ;
207 ** This pointer is reset to NULL each time the current frame has been
215 memcpy (pflac->rbuffer [i], buffer [i], frame->header.blocksize * sizeof (int32_t)) ;
222 len = SF_MIN (pflac->len, frame->header.blocksize) ;
232 int shift = 16 - frame->header.bits_per_sample ;
238 if (pflac->bufferpos >= frame->header.blocksize)
254 if (pflac->bufferpos >= frame->header.blocksize)
272 int shift = 32 - frame->header.bits_per_sample ;
276 if (pflac->bufferpos >= frame->header.blocksize)
292 float norm = (psf->norm_float == SF_TRUE) ? 1.0 / (1 << (frame->header.bits_per_sample - 1)) : 1.0 ;
297 if (pflac->bufferpos >= frame->header.blocksize)
313 double norm = (psf->norm_double == SF_TRUE) ? 1.0 / (1 << (frame->header.bits_per_sample - 1)) : 1.0 ;
318 if (pflac->bufferpos >= frame->header.blocksize)
397 sf_flac_write_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__Frame *frame, const int32_t * const buffer [], void *client_data)
401 pflac->frame = frame ;
949 /* Current frame is busted, so NULL the pointer. */
950 pflac->frame = NULL ;
954 if (pflac->frame != NULL && pflac->bufferpos < pflac->frame->header.blocksize)
961 /* Current frame is busted, so NULL the pointer. */
962 pflac->frame = NULL ;
968 /* Current frame is busted, so NULL the pointer. */
969 pflac->frame = NULL ;
1419 pflac->frame = NULL ;