From ef146b6de5258408ced5418e4e9967a431b0c33b Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 7 Sep 2015 18:44:07 +0000 Subject: fixed audio clicks while playing some mp3 files (#806) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5550 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mad/decoder_mad.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/plugins/Input/mad/decoder_mad.h') diff --git a/src/plugins/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h index d15508848..2e91ed334 100644 --- a/src/plugins/Input/mad/decoder_mad.h +++ b/src/plugins/Input/mad/decoder_mad.h @@ -99,9 +99,14 @@ private: struct mad_synth m_synth; struct audio_dither m_left_dither, m_right_dither; + enum + { + CLIP_MIN = -MAD_F_ONE, + CLIP_MAX = MAD_F_ONE - 1 + }; + //converter functions unsigned long prng(unsigned long state); - void clip(mad_fixed_t *sample); long audio_linear_dither(unsigned int bits, mad_fixed_t sample, struct audio_dither *dither); long audio_linear_round(unsigned int bits, mad_fixed_t sample); }; -- cgit v1.2.3-13-gbd6f