Fix generic channel_info callbacks

Fixed generic channel_info callbacks for many plugins.
The allocation of unnecessary internal buffers is avoided.
This commit is contained in:
Takashi Iwai 2005-05-19 16:50:24 +00:00
parent d81d6940ca
commit 18053076e2
6 changed files with 9 additions and 10 deletions

View file

@ -620,6 +620,11 @@ static int snd_pcm_rate_hw_free(snd_pcm_t *pcm)
return snd_pcm_hw_free(rate->gen.slave);
}
int snd_pcm_rate_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
{
return snd_pcm_channel_info_shm(pcm, info, -1);
}
static void recalc(snd_pcm_t *pcm, snd_pcm_uframes_t *val)
{
snd_pcm_rate_t *rate = pcm->private_data;
@ -1374,7 +1379,7 @@ static snd_pcm_ops_t snd_pcm_rate_ops = {
.hw_params = snd_pcm_rate_hw_params,
.hw_free = snd_pcm_rate_hw_free,
.sw_params = snd_pcm_rate_sw_params,
.channel_info = snd_pcm_generic_channel_info,
.channel_info = snd_pcm_rate_channel_info,
.dump = snd_pcm_rate_dump,
.nonblock = snd_pcm_generic_nonblock,
.async = snd_pcm_generic_async,