Re #4477: All usage (except Lua) of double converted to float. printf("%f") still uses promotion to double, (floating point va_args are always promoted to double) (#4483)

This commit is contained in:
Damjan Adamic
2017-02-21 11:02:26 +01:00
committed by Bertrand Songis
parent f36d01d560
commit 2fbd1d8955
5 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -651,7 +651,7 @@ int ToneContext::mixBuffer(AudioBuffer * buffer, int volume, unsigned int fade)
int remainingDuration = fragment.tone.duration - state.duration;
if (remainingDuration > 0) {
int points;
double toneIdx = state.idx;
float toneIdx = state.idx;
if (fragment.tone.reset) {
fragment.tone.reset = 0;
@@ -661,7 +661,7 @@ int ToneContext::mixBuffer(AudioBuffer * buffer, int volume, unsigned int fade)
if (fragment.tone.freq != state.freq) {
state.freq = fragment.tone.freq;
state.step = limit<double>(1, double(DIM(sineValues)*fragment.tone.freq) / AUDIO_SAMPLE_RATE, 512);
state.step = limit<float>(1, float(DIM(sineValues)*fragment.tone.freq) / AUDIO_SAMPLE_RATE, 512);
state.volume = evalVolumeRatio(fragment.tone.freq, volume);
}
@@ -695,7 +695,7 @@ int ToneContext::mixBuffer(AudioBuffer * buffer, int volume, unsigned int fade)
end -= (end % DIM(sineValues));
else
end = DIM(sineValues);
points = (double(end) - toneIdx) / state.step;
points = (float(end) - toneIdx) / state.step;
}
for (int i=0; i<points; i++) {