aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
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;