From fe03a4781bef4c86fd4fb2d142526e72dc4dc5b4 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Sun, 16 Apr 2000 15:36:09 +0000 Subject: [PATCH] Renamed for congruency two fields --- include/pcm.h | 5 +++-- src/pcm/pcm_plugin.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/pcm.h b/include/pcm.h index 0dc992f0..f58c3296 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -26,6 +26,7 @@ int snd_pcm_info(snd_pcm_t *handle, snd_pcm_info_t * info); int snd_pcm_channel_info(snd_pcm_t *handle, snd_pcm_channel_info_t * info); int snd_pcm_channel_params(snd_pcm_t *handle, snd_pcm_channel_params_t * params); int snd_pcm_channel_setup(snd_pcm_t *handle, snd_pcm_channel_setup_t * setup); +int snd_pcm_voice_setup(snd_pcm_t *handle, int channel, snd_pcm_voice_setup_t * setup); int snd_pcm_channel_status(snd_pcm_t *handle, snd_pcm_channel_status_t * status); int snd_pcm_playback_prepare(snd_pcm_t *handle); int snd_pcm_capture_prepare(snd_pcm_t *handle); @@ -86,8 +87,8 @@ typedef enum { typedef struct snd_stru_pcm_plugin_voice { void *aptr; /* pointer to the allocated area */ void *addr; /* address to voice samples */ - unsigned int offset; /* offset to first voice in bits */ - unsigned int next; /* offset to next voice in bits */ + unsigned int first; /* offset to first sample in bits */ + unsigned int step; /* samples distance in bits */ } snd_pcm_plugin_voice_t; struct snd_stru_pcm_plugin { diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c index bcc7a206..d0f1afd8 100644 --- a/src/pcm/pcm_plugin.c +++ b/src/pcm/pcm_plugin.c @@ -487,8 +487,8 @@ static int snd_pcm_plugin_load_vector(snd_pcm_plugin_t *plugin, v->aptr = NULL; if ((v->addr = vector->iov_base) == NULL) return -EINVAL; - v->offset = voice * width; - v->next = cvoices * width; + v->first = voice * width; + v->step = cvoices * width; } } else { if (count != cvoices) @@ -496,8 +496,8 @@ static int snd_pcm_plugin_load_vector(snd_pcm_plugin_t *plugin, for (voice = 0; voice < cvoices; voice++, v++) { v->aptr = NULL; v->addr = vector[voice].iov_base; - v->offset = 0; - v->next = width; + v->first = 0; + v->step = width; } } *voices = plugin->voices; @@ -868,12 +868,12 @@ static int snd_pcm_plugin_xvoices(snd_pcm_plugin_t *plugin, v->aptr = ptr; if (format->interleave) { v->addr = ptr; - v->offset = voice * width; - v->next = format->voices * width; + v->first = voice * width; + v->step = format->voices * width; } else { v->addr = ptr + (voice * size); - v->offset = 0; - v->next = width; + v->first = 0; + v->step = width; } } *voices = plugin->voices; -- 2.47.1