diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-09-07 18:44:07 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-09-07 18:44:07 +0000 |
| commit | ef146b6de5258408ced5418e4e9967a431b0c33b (patch) | |
| tree | caf60ac92c129b85a24b3fb73a60ec309099f65d /src/plugins/Input/mad/decoder_mad.h | |
| parent | b04ba619ee3d3138d8d26d0e9516dd7352f16bad (diff) | |
| download | qmmp-ef146b6de5258408ced5418e4e9967a431b0c33b.tar.gz qmmp-ef146b6de5258408ced5418e4e9967a431b0c33b.tar.bz2 qmmp-ef146b6de5258408ced5418e4e9967a431b0c33b.zip | |
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
Diffstat (limited to 'src/plugins/Input/mad/decoder_mad.h')
| -rw-r--r-- | src/plugins/Input/mad/decoder_mad.h | 7 |
1 files changed, 6 insertions, 1 deletions
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); }; |
