Lines Matching full:frames
183 static snd_pcm_sframes_t rate_src_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in rate_src_frames() argument
190 if (frames == 0) in rate_src_frames()
194 res = (((frames * data->pitch) + (BITS/2)) >> SHIFT); in rate_src_frames()
196 res = DIV_ROUND_CLOSEST(frames << SHIFT, data->pitch); in rate_src_frames()
199 snd_pcm_sframes_t frames1 = frames, res1 = data->old_dst_frames; in rate_src_frames()
211 data->old_src_frames = frames; in rate_src_frames()
216 static snd_pcm_sframes_t rate_dst_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in rate_dst_frames() argument
223 if (frames == 0) in rate_dst_frames()
227 res = DIV_ROUND_CLOSEST(frames << SHIFT, data->pitch); in rate_dst_frames()
229 res = (((frames * data->pitch) + (BITS/2)) >> SHIFT); in rate_dst_frames()
232 snd_pcm_sframes_t frames1 = frames, res1 = data->old_src_frames; in rate_dst_frames()
244 data->old_dst_frames = frames; in rate_dst_frames()
252 snd_pcm_uframes_t frames) in rate_transfer() argument
259 if (frames == 0) in rate_transfer()
275 dst_frames = rate_dst_frames(plugin, frames); in rate_transfer()
276 if (dst_frames > dst_channels[0].frames) in rate_transfer()
277 dst_frames = dst_channels[0].frames; in rate_transfer()
279 data->func(plugin, src_channels, dst_channels, frames, dst_frames); in rate_transfer()