comparison wmavoice.c @ 11652:8b6f3d3b55cb libavcodec

Move clipping of audio samples (for those codecs outputting float) from decoder to the audio conversion routines.
author rbultje
date Wed, 21 Apr 2010 17:57:48 +0000
parents 7dd2a45249a9
children 28638e0d6e63
comparison
equal deleted inserted replaced
11651:926ad89ae57a 11652:8b6f3d3b55cb
1115 if (s->do_apf) { 1115 if (s->do_apf) {
1116 // FIXME this is where APF would take place, currently not implemented 1116 // FIXME this is where APF would take place, currently not implemented
1117 av_log_missing_feature(ctx, "APF", 0); 1117 av_log_missing_feature(ctx, "APF", 0);
1118 s->do_apf = 0; 1118 s->do_apf = 0;
1119 } //else 1119 } //else
1120 for (n = 0; n < 160; n++) 1120 memcpy(samples, synth, 160 * sizeof(synth[0]));
1121 samples[n] = av_clipf(synth[n], -1.0, 1.0);
1122 1121
1123 /* Cache values for next frame */ 1122 /* Cache values for next frame */
1124 s->frame_cntr++; 1123 s->frame_cntr++;
1125 if (s->frame_cntr >= 0xFFFF) s->frame_cntr -= 0xFFFF; // i.e. modulo (%) 1124 if (s->frame_cntr >= 0xFFFF) s->frame_cntr -= 0xFFFF; // i.e. modulo (%)
1126 s->last_acb_type = frame_descs[bd_idx].acb_type; 1125 s->last_acb_type = frame_descs[bd_idx].acb_type;