[BACK]Return to auconv.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/Attic/auconv.c between version 1.15.4.1 and 1.16

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.'
Line 1068  static int
Line 1114  static int
 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;

Legend:
Removed from v.1.15.4.1  
changed lines
  Added in v.1.16

CVSweb <webmaster@jp.NetBSD.org>