}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- srcbit = src_voices[voice].offset % 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- srcbit_step = src_voices[voice].next % 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ srcbit = src_voices[voice].first % 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ srcbit_step = src_voices[voice].step % 8;
+ dst_step = dst_voices[voice].step / 8;
state = &data->voices[voice];
samples1 = samples;
while (samples1-- > 0) {
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- dstbit = dst_voices[voice].offset % 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
- dstbit_step = dst_voices[voice].next % 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ dstbit = dst_voices[voice].first % 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
+ dstbit_step = dst_voices[voice].step % 8;
state = &data->voices[voice];
samples1 = samples;
while (samples1-- > 0) {
dst_voices[voice].addr == NULL)
return -EFAULT;
if (plugin->src_format.format == SND_PCM_SFMT_IMA_ADPCM) {
- if (src_voices[voice].offset % 4 != 0 ||
- src_voices[voice].next % 4 != 0 ||
- dst_voices[voice].offset % 8 != 0 ||
- dst_voices[voice].next % 8 != 0)
+ if (src_voices[voice].first % 4 != 0 ||
+ src_voices[voice].step % 4 != 0 ||
+ dst_voices[voice].first % 8 != 0 ||
+ dst_voices[voice].step % 8 != 0)
return -EINVAL;
} else {
- if (src_voices[voice].offset % 8 != 0 ||
- src_voices[voice].next % 8 != 0 ||
- dst_voices[voice].offset % 4 != 0 ||
- dst_voices[voice].next % 4 != 0)
+ if (src_voices[voice].first % 8 != 0 ||
+ src_voices[voice].step % 8 != 0 ||
+ dst_voices[voice].first % 4 != 0 ||
+ dst_voices[voice].step % 4 != 0)
return -EINVAL;
}
}
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
samples1 = samples;
while (samples1-- > 0) {
signed short sample = alaw2linear(*src);
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
samples1 = samples;
while (samples1-- > 0) {
goto *get;
if (src_voices[voice].addr != NULL &&
dst_voices[voice].addr == NULL)
return -EFAULT;
- if (src_voices[voice].offset % 8 != 0 ||
- src_voices[voice].next % 8 != 0)
+ if (src_voices[voice].first % 8 != 0 ||
+ src_voices[voice].step % 8 != 0)
return -EINVAL;
- if (dst_voices[voice].offset % 8 != 0 ||
- dst_voices[voice].next % 8 != 0)
+ if (dst_voices[voice].first % 8 != 0 ||
+ dst_voices[voice].step % 8 != 0)
return -EINVAL;
}
data = (alaw_t *)plugin->extra_data;
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
samples1 = samples;
while (samples1-- > 0) {
goto *copy;
if (src_voices[voice].addr != NULL &&
dst_voices[voice].addr == NULL)
return -EFAULT;
- if (src_voices[voice].offset % 8 != 0 ||
- src_voices[voice].next % 8 != 0)
+ if (src_voices[voice].first % 8 != 0 ||
+ src_voices[voice].step % 8 != 0)
return -EINVAL;
- if (dst_voices[voice].offset % 8 != 0 ||
- dst_voices[voice].next % 8 != 0)
+ if (dst_voices[voice].first % 8 != 0 ||
+ dst_voices[voice].step % 8 != 0)
return -EINVAL;
}
convert(plugin, src_voices, dst_voices, samples);
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
samples1 = samples;
while (samples1-- > 0) {
signed short sample = ulaw2linear(*src);
}
continue;
}
- src = src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
samples1 = samples;
while (samples1-- > 0) {
goto *get;
if (src_voices[voice].addr != NULL &&
dst_voices[voice].addr == NULL)
return -EFAULT;
- if (src_voices[voice].offset % 8 != 0 ||
- src_voices[voice].next % 8 != 0)
+ if (src_voices[voice].first % 8 != 0 ||
+ src_voices[voice].step % 8 != 0)
return -EINVAL;
- if (dst_voices[voice].offset % 8 != 0 ||
- dst_voices[voice].next % 8 != 0)
+ if (dst_voices[voice].first % 8 != 0 ||
+ dst_voices[voice].step % 8 != 0)
return -EINVAL;
}
data = (mulaw_t *)plugin->extra_data;
}
continue;
}
- src = (char *)src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = (char *)dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = (char *)src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = (char *)dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
src_samples1 = src_samples;
dst_samples1 = dst_samples;
if (pos & ~MASK) {
}
continue;
}
- src = (char *)src_voices[voice].addr + src_voices[voice].offset / 8;
- dst = (char *)dst_voices[voice].addr + dst_voices[voice].offset / 8;
- src_step = src_voices[voice].next / 8;
- dst_step = dst_voices[voice].next / 8;
+ src = (char *)src_voices[voice].addr + src_voices[voice].first / 8;
+ dst = (char *)dst_voices[voice].addr + dst_voices[voice].first / 8;
+ src_step = src_voices[voice].step / 8;
+ dst_step = dst_voices[voice].step / 8;
src_samples1 = src_samples;
dst_samples1 = dst_samples;
while (dst_samples1 > 0) {
if (src_voices[voice].addr != NULL &&
dst_voices[voice].addr == NULL)
return -EFAULT;
- if (src_voices[voice].offset % 8 != 0 ||
- src_voices[voice].next % 8 != 0)
+ if (src_voices[voice].first % 8 != 0 ||
+ src_voices[voice].step % 8 != 0)
return -EINVAL;
- if (dst_voices[voice].offset % 8 != 0 ||
- dst_voices[voice].next % 8 != 0)
+ if (dst_voices[voice].first % 8 != 0 ||
+ dst_voices[voice].step % 8 != 0)
return -EINVAL;
}
const snd_pcm_plugin_voice_t *dst_voice,
size_t samples)
{
- char *dst = dst_voice->addr + dst_voice->offset / 8;
- int dst_step = dst_voice->next / 8;
+ char *dst = dst_voice->addr + dst_voice->first / 8;
+ int dst_step = dst_voice->step / 8;
switch (plugin->dst_width) {
case 4: {
- int dstbit = dst_voice->offset % 8;
- int dstbit_step = dst_voice->next % 8;
+ int dstbit = dst_voice->first % 8;
+ int dstbit_step = dst_voice->step % 8;
while (samples-- > 0) {
if (dstbit)
*dst &= 0x0f;
}
copy = copy_labels[data->copy];
- src = src_voice->addr + src_voice->offset / 8;
- src_step = src_voice->next / 8;
- dst = dst_voice->addr + dst_voice->offset / 8;
- dst_step = dst_voice->next / 8;
+ src = src_voice->addr + src_voice->first / 8;
+ src_step = src_voice->step / 8;
+ dst = dst_voice->addr + dst_voice->first / 8;
+ dst_step = dst_voice->step / 8;
while (samples-- > 0) {
goto *copy;
#define COPY_END after
const snd_pcm_plugin_voice_t *src_voice = &src_voices[ttable->srcs[srcidx].voice];
if (src_voice->addr == NULL)
continue;
- srcs[srcidx1] = src_voice->addr + src_voices->offset / 8;
- src_steps[srcidx1] = src_voice->next / 8;
+ srcs[srcidx1] = src_voice->addr + src_voices->first / 8;
+ src_steps[srcidx1] = src_voice->step / 8;
src_tt[srcidx1] = ttable->srcs[srcidx];
srcidx1++;
}
add = add_labels[data->sum_type * 2 + ttable->att];
norm = norm_labels[data->sum_type * 8 + ttable->att * 4 + 4 - data->src_sample_size];
put32 = put32_labels[data->put];
- dst = dst_voice->addr + dst_voice->offset / 8;
- dst_step = dst_voice->next / 8;
+ dst = dst_voice->addr + dst_voice->first / 8;
+ dst_step = dst_voice->step / 8;
while (samples-- > 0) {
ttable_src_t *ttp = src_tt;
src_nvoices = plugin->src_format.voices;
for (src_voice = 0; src_voice < src_nvoices; ++src_voice) {
- if (src_voices[src_voice].offset % 8 != 0 ||
- src_voices[src_voice].next % 8 != 0)
+ if (src_voices[src_voice].first % 8 != 0 ||
+ src_voices[src_voice].step % 8 != 0)
return -EINVAL;
}
dst_nvoices = plugin->dst_format.voices;
for (dst_voice = 0; dst_voice < dst_nvoices; ++dst_voice) {
- if (dst_voices[dst_voice].offset % 8 != 0 ||
- dst_voices[dst_voice].next % 8 != 0)
+ if (dst_voices[dst_voice].first % 8 != 0 ||
+ dst_voices[dst_voice].step % 8 != 0)
return -EINVAL;
}