version 1.15.4.1, 2006/04/19 03:24:23 |
version 1.16, 2006/03/18 13:12:15 |
Line 465 DEFINE_FILTER(linear16_to_linear8) |
|
Line 465 DEFINE_FILTER(linear16_to_linear8) |
|
return 0; |
return 0; |
} |
} |
|
|
|
DEFINE_FILTER(linear16_to_linear32) |
|
{ |
|
stream_filter_t *this; |
|
int m, err, enc_dst, enc_src; |
|
|
|
this = (stream_filter_t *)self; |
|
max_used = (max_used + 1) & ~1; |
|
if ((err = this->prev->fetch_to(this->prev, this->src, max_used / 2))) |
|
return err; |
|
m = (dst->end - dst->start) & ~1; |
|
m = min(m, max_used); |
|
enc_dst = dst->param.encoding; |
|
enc_src = this->src->param.encoding; |
|
if (enc_src == AUDIO_ENCODING_SLINEAR_LE && |
|
enc_dst == AUDIO_ENCODING_SLINEAR_LE) { |
|
FILTER_LOOP_PROLOGUE(this->src, 2, dst, 4, m) { |
|
d[0] = s[0]; |
|
d[1] = 0; |
|
d[2] = s[1]; |
|
d[3] = 0; |
|
} FILTER_LOOP_EPILOGUE(this->src, dst); |
|
} |
|
|
|
return 0; |
|
} |
|
|
|
DEFINE_FILTER(interleave32_2ch_to_8ch) |
|
{ |
|
stream_filter_t *this; |
|
int m, err; |
|
|
|
this = (stream_filter_t *)self; |
|
max_used = (max_used + 1) & ~1; |
|
if ((err = this->prev->fetch_to(this->prev, this->src, max_used / 2))) |
|
return err; |
|
m = (dst->end - dst->start) & ~1; |
|
m = min(m, max_used); |
|
|
|
FILTER_LOOP_PROLOGUE(this->src, 4, dst, 16, m) { |
|
memcpy(d, s, 4); |
|
memset(d, 0, 12); |
|
} FILTER_LOOP_EPILOGUE(this->src, dst); |
|
|
|
return 0; |
|
} |
|
|
/** |
/** |
* Set appropriate parameters in `param,' and return the index in |
* Set appropriate parameters in `param,' and return the index in |
* the hardware capability array `formats.' |
* the hardware capability array `formats.' |
|
|
auconv_add_encoding(int enc, int prec, int flags, |
auconv_add_encoding(int enc, int prec, int flags, |
struct audio_encoding_set **buf, int *capacity) |
struct audio_encoding_set **buf, int *capacity) |
{ |
{ |
|
#ifndef AUCONV_DEBUG |
static const char *encoding_names[] = { |
static const char *encoding_names[] = { |
NULL, AudioEmulaw, AudioEalaw, NULL, |
NULL, AudioEmulaw, AudioEalaw, NULL, |
NULL, AudioEadpcm, AudioEslinear_le, AudioEslinear_be, |
NULL, AudioEadpcm, AudioEslinear_le, AudioEslinear_be, |
Line 1077 auconv_add_encoding(int enc, int prec, i |
|
Line 1124 auconv_add_encoding(int enc, int prec, i |
|
AudioEmpeg_l1_system, AudioEmpeg_l2_stream, |
AudioEmpeg_l1_system, AudioEmpeg_l2_stream, |
AudioEmpeg_l2_packets, AudioEmpeg_l2_system |
AudioEmpeg_l2_packets, AudioEmpeg_l2_system |
}; |
}; |
|
#endif |
struct audio_encoding_set *set; |
struct audio_encoding_set *set; |
struct audio_encoding_set *new_buf; |
struct audio_encoding_set *new_buf; |
audio_encoding_t *e; |
audio_encoding_t *e; |