Commit b05cc1cb authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/08/06 18:45:09
A:Takashi Iwai <tiwai@suse.de>
F:core/oss/pcm_plugin.c:1.15->1.16 
F:core/oss/pcm_plugin.h:1.4->1.5 
L:removed unused functions.
parent 32edfe36
...@@ -923,47 +923,6 @@ int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, size_t dst_offs ...@@ -923,47 +923,6 @@ int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, size_t dst_offs
return 0; return 0;
} }
int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset,
unsigned int channels, snd_pcm_uframes_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;
const snd_pcm_channel_area_t *begin = dst_areas;
int vc = channels;
unsigned int v = 0;
int err;
while (1) {
vc--;
v++;
dst_areas++;
if (vc == 0 ||
dst_areas->addr != addr ||
dst_areas->step != step ||
dst_areas->first != dst_areas[-1].first + width)
break;
}
if (v > 1 && v * width == step) {
/* Collapse the areas */
snd_pcm_channel_area_t d;
d.addr = begin->addr;
d.first = begin->first;
d.step = width;
err = snd_pcm_area_silence(&d, dst_offset * v, frames * v, format);
channels -= v;
} else {
err = snd_pcm_area_silence(begin, dst_offset, frames, format);
dst_areas = begin + 1;
channels--;
}
if (err < 0)
return err;
}
return 0;
}
int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_area, size_t src_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, const snd_pcm_channel_area_t *dst_area, size_t dst_offset,
size_t samples, int format) size_t samples, int format)
...@@ -1058,50 +1017,3 @@ int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_area, size_t src_offset, ...@@ -1058,50 +1017,3 @@ int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_area, size_t src_offset,
} }
return 0; return 0;
} }
int snd_pcm_areas_copy(const snd_pcm_channel_area_t *src_areas, snd_pcm_uframes_t src_offset,
const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset,
unsigned int channels, snd_pcm_uframes_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;
const snd_pcm_channel_area_t *src_start = src_areas;
void *dst_addr = dst_areas->addr;
const snd_pcm_channel_area_t *dst_start = dst_areas;
int vc = channels;
unsigned int v = 0;
while (dst_areas->step == step) {
vc--;
v++;
src_areas++;
dst_areas++;
if (vc == 0 ||
src_areas->step != step ||
src_areas->addr != src_addr ||
dst_areas->addr != dst_addr ||
src_areas->first != src_areas[-1].first + width ||
dst_areas->first != dst_areas[-1].first + width)
break;
}
if (v > 1 && v * width == step) {
/* Collapse the areas */
snd_pcm_channel_area_t s, d;
s.addr = src_start->addr;
s.first = src_start->first;
s.step = width;
d.addr = dst_start->addr;
d.first = dst_start->first;
d.step = width;
snd_pcm_area_copy(&s, src_offset * v, &d, dst_offset * v, frames * v, format);
channels -= v;
} else {
snd_pcm_area_copy(src_start, src_offset, dst_start, dst_offset, frames, format);
src_areas = src_start + 1;
dst_areas = dst_start + 1;
channels--;
}
}
return 0;
}
...@@ -219,14 +219,9 @@ snd_pcm_sframes_t snd_pcm_plugin_client_channels(snd_pcm_plugin_t *plugin, ...@@ -219,14 +219,9 @@ snd_pcm_sframes_t snd_pcm_plugin_client_channels(snd_pcm_plugin_t *plugin,
int snd_pcm_area_silence(const 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); size_t samples, int format);
int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
unsigned int channels, snd_pcm_uframes_t frames, int format);
int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_channel, size_t src_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, const snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
size_t samples, int format); size_t samples, int format);
int snd_pcm_areas_copy(const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
unsigned int channels, snd_pcm_uframes_t frames, int format);
void *snd_pcm_plug_buf_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t size); void *snd_pcm_plug_buf_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t size);
void snd_pcm_plug_buf_unlock(snd_pcm_plug_t *plug, void *ptr); void snd_pcm_plug_buf_unlock(snd_pcm_plug_t *plug, void *ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment