/[openvortex]/alsa/alsa-kernel/core/oss/rate.c
ViewVC logotype

Diff of /alsa/alsa-kernel/core/oss/rate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by vizard, Tue Apr 15 21:53:12 2003 UTC revision 1.2 by vizard, Mon Aug 11 00:06:38 2003 UTC
# Line 85  static void resample_expand(snd_pcm_plug Line 85  static void resample_expand(snd_pcm_plug
85  #undef PUT_S16_LABELS  #undef PUT_S16_LABELS
86          void *get = get_s16_labels[data->get];          void *get = get_s16_labels[data->get];
87          void *put = put_s16_labels[data->put];          void *put = put_s16_labels[data->put];
         void *get_s16_end = 0;  
88          signed short sample = 0;          signed short sample = 0;
 #define GET_S16_END *get_s16_end  
 #include "plugin_ops.h"  
 #undef GET_S16_END  
89                    
90          for (channel = 0; channel < plugin->src_format.channels; channel++) {          for (channel = 0; channel < plugin->src_format.channels; channel++) {
91                  pos = data->pos;                  pos = data->pos;
# Line 108  static void resample_expand(snd_pcm_plug Line 104  static void resample_expand(snd_pcm_plug
104                  dst_step = dst_channels[channel].area.step / 8;                  dst_step = dst_channels[channel].area.step / 8;
105                  src_frames1 = src_frames;                  src_frames1 = src_frames;
106                  dst_frames1 = dst_frames;                  dst_frames1 = dst_frames;
                 if (pos & ~R_MASK) {  
                         get_s16_end = &&after_get1;  
                         goto *get;  
                 after_get1:  
                         pos &= R_MASK;  
                         S1 = S2;  
                         S2 = sample;  
                         src += src_step;  
                         src_frames1--;  
                 }  
107                  while (dst_frames1-- > 0) {                  while (dst_frames1-- > 0) {
108                          if (pos & ~R_MASK) {                          if (pos & ~R_MASK) {
109                                  pos &= R_MASK;                                  pos &= R_MASK;
110                                  S1 = S2;                                  S1 = S2;
111                                  if (src_frames1-- > 0) {                                  if (src_frames1-- > 0) {
                                         get_s16_end = &&after_get2;  
112                                          goto *get;                                          goto *get;
113                                  after_get2:  #define GET_S16_END after_get
114    #include "plugin_ops.h"
115    #undef GET_S16_END
116                                    after_get:
117                                          S2 = sample;                                          S2 = sample;
118                                          src += src_step;                                          src += src_step;
119                                  }                                  }
# Line 318  static snd_pcm_sframes_t rate_transfer(s Line 306  static snd_pcm_sframes_t rate_transfer(s
306  #endif  #endif
307    
308          dst_frames = rate_dst_frames(plugin, frames);          dst_frames = rate_dst_frames(plugin, frames);
309            if (dst_frames > dst_channels[0].frames)
310                    dst_frames = dst_channels[0].frames;
311          data = (rate_t *)plugin->extra_data;          data = (rate_t *)plugin->extra_data;
312          data->func(plugin, src_channels, dst_channels, frames, dst_frames);          data->func(plugin, src_channels, dst_channels, frames, dst_frames);
313          return dst_frames;          return dst_frames;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26