From 81fd135651d4235927af32bfa2a420017dca23ce Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Tue, 13 Feb 2007 23:47:41 +0000 Subject: Fixing some weird floating point comparison issue. Not exactly sure why this fixes it though. git-svn-id: https://svn.musicpd.org/mpd/trunk@5338 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/pcm_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pcm_utils.c b/src/pcm_utils.c index f6b308258..c93a2359e 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -304,8 +304,9 @@ void pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, size_t newratio = (double)outFormat->sampleRate / (double)inFormat->sampleRate; if(newratio != ratio) { - src_set_ratio(state, ratio = newratio); - DEBUG("Setting samplerate conversion ratio to %.2lf\n", ratio); + DEBUG("Setting samplerate conversion ratio to %.2lf\n", newratio); + src_set_ratio(state, newratio); + ratio = newratio; } data.input_frames = dataChannelLen / 2 / outFormat->channels; -- cgit v1.2.3