FILE *fp);
/* mmap */
-snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm);
-snd_pcm_channel_area_t *snd_pcm_mmap_running_areas(snd_pcm_t *pcm);
-snd_pcm_channel_area_t *snd_pcm_mmap_stopped_areas(snd_pcm_t *pcm);
+const snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm);
+const snd_pcm_channel_area_t *snd_pcm_mmap_running_areas(snd_pcm_t *pcm);
+const snd_pcm_channel_area_t *snd_pcm_mmap_stopped_areas(snd_pcm_t *pcm);
ssize_t snd_pcm_mmap_forward(snd_pcm_t *pcm, size_t size);
size_t snd_pcm_mmap_offset(snd_pcm_t *pcm);
size_t snd_pcm_mmap_xfer(snd_pcm_t *pcm, size_t size);
const char *snd_pcm_format_description(unsigned int format);
int snd_pcm_format_value(const char* name);
-int snd_pcm_area_silence(snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
+int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
size_t samples, int format);
-int snd_pcm_areas_silence(snd_pcm_channel_area_t *dst_channels, size_t dst_offset,
+int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, size_t dst_offset,
size_t vcount, size_t frames, int format);
-int snd_pcm_area_copy(snd_pcm_channel_area_t *src_channel, size_t src_offset,
- snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
+int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_channel, size_t src_offset,
+ const snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
size_t samples, int format);
-int snd_pcm_areas_copy(snd_pcm_channel_area_t *src_channels, size_t src_offset,
- snd_pcm_channel_area_t *dst_channels, size_t dst_offset,
+int snd_pcm_areas_copy(const snd_pcm_channel_area_t *src_channels, size_t src_offset,
+ const snd_pcm_channel_area_t *dst_channels, size_t dst_offset,
size_t channels, size_t frames, int format);
ssize_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes);
return pcm->fast_ops->mmap_forward(pcm->fast_op_arg, size);
}
-int snd_pcm_area_silence(snd_pcm_channel_area_t *dst_area, size_t dst_offset,
+int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, size_t dst_offset,
size_t samples, int format)
{
/* FIXME: sub byte resolution and odd dst_offset */
return 0;
}
-int snd_pcm_areas_silence(snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
+int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
size_t channels, size_t frames, int format)
{
int width = snd_pcm_format_physical_width(format);
while (channels > 0) {
void *addr = dst_areas->addr;
unsigned int step = dst_areas->step;
- snd_pcm_channel_area_t *begin = dst_areas;
+ const snd_pcm_channel_area_t *begin = dst_areas;
int channels1 = channels;
unsigned int chns = 0;
int err;
}
-int snd_pcm_area_copy(snd_pcm_channel_area_t *src_area, size_t src_offset,
- snd_pcm_channel_area_t *dst_area, size_t dst_offset,
+int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_area, size_t src_offset,
+ const snd_pcm_channel_area_t *dst_area, size_t dst_offset,
size_t samples, int format)
{
/* FIXME: sub byte resolution and odd dst_offset */
return 0;
}
-int snd_pcm_areas_copy(snd_pcm_channel_area_t *src_areas, size_t src_offset,
- snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
+int snd_pcm_areas_copy(const snd_pcm_channel_area_t *src_areas, size_t src_offset,
+ const snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
size_t channels, size_t frames, int format)
{
int width = snd_pcm_format_physical_width(format);
while (channels > 0) {
unsigned int step = src_areas->step;
void *src_addr = src_areas->addr;
- snd_pcm_channel_area_t *src_start = src_areas;
+ const snd_pcm_channel_area_t *src_start = src_areas;
void *dst_addr = dst_areas->addr;
- snd_pcm_channel_area_t *dst_start = dst_areas;
+ const snd_pcm_channel_area_t *dst_start = dst_areas;
int channels1 = channels;
unsigned int chns = 0;
while (dst_areas->step == step) {
return 0;
}
-ssize_t snd_pcm_read_areas(snd_pcm_t *pcm, snd_pcm_channel_area_t *areas,
+ssize_t snd_pcm_read_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_t *areas,
size_t offset, size_t size,
snd_pcm_xfer_areas_func_t func)
{
return err;
}
-ssize_t snd_pcm_write_areas(snd_pcm_t *pcm, snd_pcm_channel_area_t *areas,
+ssize_t snd_pcm_write_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_t *areas,
size_t offset, size_t size,
snd_pcm_xfer_areas_func_t func)
{
int step_idx; /* Previous StepSize lookup index */
} adpcm_state_t;
-typedef void (*adpcm_f)(snd_pcm_channel_area_t *src_areas,
+typedef void (*adpcm_f)(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getputidx,
adpcm_state_t *states);
return (state->pred_val);
}
-static void adpcm_decode(snd_pcm_channel_area_t *src_areas,
+static void adpcm_decode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int putidx,
adpcm_state_t *states)
char *dst;
int src_step, srcbit_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
}
-static void adpcm_encode(snd_pcm_channel_area_t *src_areas,
+static void adpcm_encode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getidx,
adpcm_state_t *states)
int dstbit;
int src_step, dst_step, dstbit_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
static ssize_t snd_pcm_adpcm_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_adpcm_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
#include "pcm_local.h"
#include "pcm_plugin.h"
-typedef void (*alaw_f)(snd_pcm_channel_area_t *src_areas,
+typedef void (*alaw_f)(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getputidx);
return ((a_val & 0x80) ? t : -t);
}
-static void alaw_decode(snd_pcm_channel_area_t *src_areas,
+static void alaw_decode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int putidx)
{
char *dst;
int src_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
}
-static void alaw_encode(snd_pcm_channel_area_t *src_areas,
+static void alaw_encode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getidx)
{
char *dst;
int src_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
static ssize_t snd_pcm_alaw_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_alaw_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static void snd_pcm_file_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset, size_t frames)
{
snd_pcm_file_t *file = pcm->private;
int sformat;
} snd_pcm_linear_t;
-static void linear_transfer(snd_pcm_channel_area_t *src_areas, size_t src_offset,
- snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
+static void linear_transfer(const snd_pcm_channel_area_t *src_areas, size_t src_offset,
+ const snd_pcm_channel_area_t *dst_areas, size_t dst_offset,
size_t frames, size_t channels, int convidx)
{
#define CONV_LABELS
char *dst;
int src_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
static ssize_t snd_pcm_linear_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_linear_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
size_t snd_pcm_mmap_capture_xfer(snd_pcm_t *pcm, size_t frames);
typedef ssize_t (*snd_pcm_xfer_areas_func_t)(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset, size_t size,
size_t *slave_sizep);
-ssize_t snd_pcm_read_areas(snd_pcm_t *pcm, snd_pcm_channel_area_t *areas,
+ssize_t snd_pcm_read_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_t *areas,
size_t offset, size_t size,
snd_pcm_xfer_areas_func_t func);
-ssize_t snd_pcm_write_areas(snd_pcm_t *pcm, snd_pcm_channel_area_t *areas,
+ssize_t snd_pcm_write_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_t *areas,
size_t offset, size_t size,
snd_pcm_xfer_areas_func_t func);
ssize_t snd_pcm_read_mmap(snd_pcm_t *pcm, size_t size);
return snd_pcm_mmap_capture_delay(pcm);
}
-static inline void *snd_pcm_channel_area_addr(snd_pcm_channel_area_t *area, size_t offset)
+static inline void *snd_pcm_channel_area_addr(const snd_pcm_channel_area_t *area, size_t offset)
{
size_t bitofs = area->first + area->step * offset;
assert(bitofs % 8 == 0);
return area->addr + bitofs / 8;
}
-static inline size_t snd_pcm_channel_area_step(snd_pcm_channel_area_t *area)
+static inline size_t snd_pcm_channel_area_step(const snd_pcm_channel_area_t *area)
{
assert(area->step % 8 == 0);
return area->step / 8;
#endif
-snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm)
+const snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm)
{
if (pcm->stopped_areas &&
snd_pcm_state(pcm) != SND_PCM_STATE_RUNNING)
}
ssize_t snd_pcm_mmap_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
ssize_t snd_pcm_mmap_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
if (err < 0)
return err;
free(pcm->mmap_channels);
+ free(pcm->running_areas);
pcm->mmap_channels = 0;
+ pcm->running_areas = 0;
return 0;
}
switch (pcm->access) {
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
{
- snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
+ const snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
char *buf = snd_pcm_channel_area_addr(a, offset);
err = _snd_pcm_writei(pcm, buf, size);
break;
size_t channels = pcm->channels;
unsigned int c;
void *bufs[channels];
- snd_pcm_channel_area_t *areas = snd_pcm_mmap_areas(pcm);
+ const snd_pcm_channel_area_t *areas = snd_pcm_mmap_areas(pcm);
for (c = 0; c < channels; ++c) {
- snd_pcm_channel_area_t *a = &areas[c];
+ const snd_pcm_channel_area_t *a = &areas[c];
bufs[c] = snd_pcm_channel_area_addr(a, offset);
}
err = _snd_pcm_writen(pcm, bufs, size);
switch (pcm->access) {
case SND_PCM_ACCESS_MMAP_INTERLEAVED:
{
- snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
+ const snd_pcm_channel_area_t *a = snd_pcm_mmap_areas(pcm);
char *buf = snd_pcm_channel_area_addr(a, offset);
err = _snd_pcm_readi(pcm, buf, size);
break;
size_t channels = pcm->channels;
unsigned int c;
void *bufs[channels];
- snd_pcm_channel_area_t *areas = snd_pcm_mmap_areas(pcm);
+ const snd_pcm_channel_area_t *areas = snd_pcm_mmap_areas(pcm);
for (c = 0; c < channels; ++c) {
- snd_pcm_channel_area_t *a = &areas[c];
+ const snd_pcm_channel_area_t *a = &areas[c];
bufs[c] = snd_pcm_channel_area_addr(a, offset);
}
err = _snd_pcm_readn(pcm->fast_op_arg, bufs, size);
#include "pcm_local.h"
#include "pcm_plugin.h"
-typedef void (*mulaw_f)(snd_pcm_channel_area_t *src_areas,
+typedef void (*mulaw_f)(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getputidx);
return ((u_val & 0x80) ? (0x84 - t) : (t - 0x84));
}
-static void mulaw_decode(snd_pcm_channel_area_t *src_areas,
+static void mulaw_decode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int putidx)
{
char *dst;
int src_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
}
-static void mulaw_encode(snd_pcm_channel_area_t *src_areas,
+static void mulaw_encode(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames, size_t channels, int getidx)
{
char *dst;
int src_step, dst_step;
size_t frames1;
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
#if 0
if (!src_area->enabled) {
if (dst_area->wanted)
}
static ssize_t snd_pcm_mulaw_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_mulaw_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
unsigned int pos;
} rate_state_t;
-typedef size_t (*rate_f)(snd_pcm_channel_area_t *src_areas,
+typedef size_t (*rate_f)(const snd_pcm_channel_area_t *src_areas,
size_t src_offset, size_t src_frames,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset, size_t *dst_framesp,
size_t channels,
int getidx, int putidx,
rate_state_t *states;
} snd_pcm_rate_t;
-static size_t resample_expand(snd_pcm_channel_area_t *src_areas,
+static size_t resample_expand(const snd_pcm_channel_area_t *src_areas,
size_t src_offset, size_t src_frames,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset, size_t *dst_framesp,
size_t channels,
int getidx, int putidx,
dst_frames == 0)
return 0;
for (channel = 0; channel < channels; ++channel) {
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
char *src, *dst;
int src_step, dst_step;
int16_t old_sample = states->sample;
return src_frames1;
}
-static size_t resample_shrink(snd_pcm_channel_area_t *src_areas,
+static size_t resample_shrink(const snd_pcm_channel_area_t *src_areas,
size_t src_offset, size_t src_frames,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset, size_t *dst_framesp,
size_t channels,
int getidx, int putidx,
dst_frames == 0)
return 0;
for (channel = 0; channel < channels; ++channel) {
- snd_pcm_channel_area_t *src_area = &src_areas[channel];
- snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[channel];
+ const snd_pcm_channel_area_t *dst_area = &dst_areas[channel];
unsigned int pos;
int sum;
char *src, *dst;
}
static ssize_t snd_pcm_rate_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t client_offset,
size_t client_size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_rate_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t client_offset,
size_t client_size,
size_t *slave_sizep)
} route_params_t;
-typedef void (*route_f)(snd_pcm_channel_area_t *src_areas,
+typedef void (*route_f)(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_channel_area_t *dst_area,
size_t dst_offset,
size_t frames,
- ttable_dst_t *ttable,
- route_params_t *params);
+ const ttable_dst_t *ttable,
+ const route_params_t *params);
struct ttable_dst {
int att; /* Attenuated */
} snd_pcm_route_t;
-static void route1_zero(snd_pcm_channel_area_t *src_areas ATTRIBUTE_UNUSED,
+static void route1_zero(const snd_pcm_channel_area_t *src_areas ATTRIBUTE_UNUSED,
size_t src_offset ATTRIBUTE_UNUSED,
- snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_channel_area_t *dst_area,
size_t dst_offset,
size_t frames,
- ttable_dst_t* ttable ATTRIBUTE_UNUSED,
- route_params_t *params)
+ const ttable_dst_t* ttable ATTRIBUTE_UNUSED,
+ const route_params_t *params)
{
#if 0
if (dst_area->wanted)
#endif
}
-static void route1_one(snd_pcm_channel_area_t *src_areas,
+static void route1_one(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_channel_area_t *dst_area,
size_t dst_offset,
size_t frames,
- ttable_dst_t* ttable,
- route_params_t *params)
+ const ttable_dst_t* ttable,
+ const route_params_t *params)
{
#define CONV_LABELS
#include "plugin_ops.h"
#undef CONV_LABELS
void *conv;
- snd_pcm_channel_area_t *src_area = 0;
+ const snd_pcm_channel_area_t *src_area = 0;
unsigned int srcidx;
char *src, *dst;
int src_step, dst_step;
}
}
-static void route1_many(snd_pcm_channel_area_t *src_areas,
+static void route1_many(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_channel_area_t *dst_area,
size_t dst_offset,
size_t frames,
- ttable_dst_t* ttable,
- route_params_t *params)
+ const ttable_dst_t* ttable,
+ const route_params_t *params)
{
#define GET_LABELS
#define PUT32_LABELS
u_int32_t sample = 0;
int srcidx, srcidx1 = 0;
for (srcidx = 0; srcidx < nsrcs; ++srcidx) {
- snd_pcm_channel_area_t *src_area = &src_areas[ttable->srcs[srcidx].channel];
+ const snd_pcm_channel_area_t *src_area = &src_areas[ttable->srcs[srcidx].channel];
#if 0
if (!src_area->enabled)
continue;
}
}
-static void route_transfer(snd_pcm_channel_area_t *src_areas,
+static void route_transfer(const snd_pcm_channel_area_t *src_areas,
size_t src_offset,
- snd_pcm_channel_area_t *dst_areas,
+ const snd_pcm_channel_area_t *dst_areas,
size_t dst_offset,
size_t frames,
size_t dst_channels,
{
size_t dst_channel;
ttable_dst_t *dstp;
- snd_pcm_channel_area_t *dst_area;
+ const snd_pcm_channel_area_t *dst_area;
dstp = params->dsts;
dst_area = dst_areas;
}
static ssize_t snd_pcm_route_write_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)
}
static ssize_t snd_pcm_route_read_areas(snd_pcm_t *pcm,
- snd_pcm_channel_area_t *areas,
+ const snd_pcm_channel_area_t *areas,
size_t offset,
size_t size,
size_t *slave_sizep)