Lines Matching refs:sf
181 if (psf->sf.channels != (int) frame->header.channels)
184 psf->sf.channels, frame->header.channels) ;
453 if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
456 psf->sf.channels, metadata->data.stream_info.channels) ;
461 if (psf->sf.channels > 0 && psf->sf.samplerate != (int) metadata->data.stream_info.sample_rate)
464 psf->sf.samplerate, metadata->data.stream_info.sample_rate) ;
466 psf->sf.channels = metadata->data.stream_info.channels ;
467 psf->sf.samplerate = metadata->data.stream_info.sample_rate ;
468 psf->sf.frames = metadata->data.stream_info.total_samples ;
470 psf_log_printf (psf, "FLAC Stream Metadata\n Channels : %d\n Sample rate : %d\n", psf->sf.channels, psf->sf.samplerate) ;
472 if (psf->sf.frames == 0)
474 psf->sf.frames = SF_COUNT_MAX ;
477 psf_log_printf (psf, " Frames : %D\n", psf->sf.frames) ;
481 psf->sf.format |= SF_FORMAT_PCM_S8 ;
485 psf->sf.format |= SF_FORMAT_PCM_16 ;
489 psf->sf.format |= SF_FORMAT_PCM_24 ;
706 subformat = SF_CODEC (psf->sf.format) ;
709 { if ((SF_CONTAINER (psf->sf.format)) != SF_FORMAT_FLAC)
713 psf->sf.seekable = 0 ;
793 if (psf->sf.samplerate < 1 || psf->sf.samplerate > 655350)
794 { psf_log_printf (psf, "flac sample rate out of range.\n", psf->sf.samplerate) ;
800 switch (SF_CODEC (psf->sf.format))
821 if (! FLAC__stream_encoder_set_channels (pflac->fse, psf->sf.channels))
822 { psf_log_printf (psf, "FLAC__stream_encoder_set_channels (%d) return false.\n", psf->sf.channels) ;
826 if (! FLAC__stream_encoder_set_sample_rate (pflac->fse, psf->sf.samplerate))
827 { psf_log_printf (psf, "FLAC__stream_encoder_set_sample_rate (%d) returned false.\n", psf->sf.samplerate) ;
1068 switch (SF_CODEC (psf->sf.format))
1082 bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
1083 bufferlen *= psf->sf.channels ;
1088 if (FLAC__stream_encoder_process_interleaved (pflac->fse, buffer, writecount / psf->sf.channels))
1110 switch (SF_CODEC (psf->sf.format))
1124 bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
1125 bufferlen *= psf->sf.channels ;
1130 if (FLAC__stream_encoder_process_interleaved (pflac->fse, buffer, writecount / psf->sf.channels))
1152 switch (SF_CODEC (psf->sf.format))
1166 bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
1167 bufferlen *= psf->sf.channels ;
1172 if (FLAC__stream_encoder_process_interleaved (pflac->fse, buffer, writecount / psf->sf.channels))
1283 switch (SF_CODEC (psf->sf.format))
1297 bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
1298 bufferlen *= psf->sf.channels ;
1303 if (FLAC__stream_encoder_process_interleaved (pflac->fse, buffer, writecount / psf->sf.channels))
1425 if (offset == psf->sf.frames)
1448 return (psf->datalength * psf->sf.samplerate) / psf->sf.frames ;