aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-02-13 23:47:41 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-02-13 23:47:41 +0000
commit81fd135651d4235927af32bfa2a420017dca23ce (patch)
treea8d73b3012013ddba7a995d32848ef84841b2921 /src
parent9fdaee5571de49003aa2a7a8bb123d769f1cd790 (diff)
downloadmpd-81fd135651d4235927af32bfa2a420017dca23ce.tar.gz
mpd-81fd135651d4235927af32bfa2a420017dca23ce.tar.xz
mpd-81fd135651d4235927af32bfa2a420017dca23ce.zip
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
Diffstat (limited to '')
-rw-r--r--src/pcm_utils.c5
1 files changed, 3 insertions, 2 deletions
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;