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
This commit is contained in:
parent
9fdaee5571
commit
81fd135651
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user