From 340eb52ea2a7e7a0de3301dd7bdd7eb54358d04e Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Sun, 16 Apr 2000 15:38:28 +0000 Subject: [PATCH] Implemented voice_setup --- src/pcm/pcm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 5d85de1c..8f7e1e97 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -275,6 +275,21 @@ int snd_pcm_channel_setup(snd_pcm_t *pcm, snd_pcm_channel_setup_t * setup) return 0; } +int snd_pcm_voice_setup(snd_pcm_t *pcm, int channel, snd_pcm_voice_setup_t * setup) +{ + int fd; + if (!pcm || !setup) + return -EINVAL; + if (channel < 0 || channel > 1) + return -EINVAL; + fd = pcm->fd[channel]; + if (fd < 0) + return -EINVAL; + if (ioctl(fd, SND_PCM_IOCTL_VOICE_SETUP, setup) < 0) + return -errno; + return 0; +} + int snd_pcm_channel_status(snd_pcm_t *pcm, snd_pcm_channel_status_t * status) { int fd; -- 2.47.1