diff options
author | Marcus Comstedt | 2011-01-08 21:11:31 +0000 |
---|---|---|
committer | Marcus Comstedt | 2011-01-08 21:11:31 +0000 |
commit | 2001719241a21a57e6ec03420863f189e9183d9e (patch) | |
tree | 920904b9616f88c4d6d6f8df66b9191beed01efb /sound/softsynth/mt32/partial.cpp | |
parent | 910e2f076073dcc98c0345ba4ec25288373c7929 (diff) | |
download | scummvm-rg350-2001719241a21a57e6ec03420863f189e9183d9e.tar.gz scummvm-rg350-2001719241a21a57e6ec03420863f189e9183d9e.tar.bz2 scummvm-rg350-2001719241a21a57e6ec03420863f189e9183d9e.zip |
MT32: Fixed compilation warnings
The conversion specification "%f" converts a double, not a float,
so floats need to be converted to doubles before passing them to
vprintf().
svn-id: r55175
Diffstat (limited to 'sound/softsynth/mt32/partial.cpp')
-rw-r--r-- | sound/softsynth/mt32/partial.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/softsynth/mt32/partial.cpp b/sound/softsynth/mt32/partial.cpp index f016084d8c..5ba9ef6145 100644 --- a/sound/softsynth/mt32/partial.cpp +++ b/sound/softsynth/mt32/partial.cpp @@ -118,7 +118,7 @@ void Partial::initKeyFollow(int key) { #endif #if MT32EMU_ACCURATENOTES == 1 noteVal = newPitch; - synth->printDebug("key=%d, pitch=%f, pitchKeyfollow=%f, pitchShift=%f, newPitch=%f", key, patchCache->pitch, patchCache->pitchKeyfollow, patchCache->pitchShift, newPitch); + synth->printDebug("key=%d, pitch=%f, pitchKeyfollow=%f, pitchShift=%f, newPitch=%f", key, (double)patchCache->pitch, (double)patchCache->pitchKeyfollow, (double)patchCache->pitchShift, (double)newPitch); #else float newPitchInt; float newPitchFract = modff(newPitch, &newPitchInt); @@ -128,7 +128,7 @@ void Partial::initKeyFollow(int key) { } noteVal = (int)newPitchInt; fineShift = (int)(powf(2.0f, newPitchFract / 12.0f) * 4096.0f); - synth->printDebug("key=%d, pitch=%f, pitchKeyfollow=%f, pitchShift=%f, newPitch=%f, noteVal=%d, fineShift=%d", key, patchCache->pitch, patchCache->pitchKeyfollow, patchCache->pitchShift, newPitch, noteVal, fineShift); + synth->printDebug("key=%d, pitch=%f, pitchKeyfollow=%f, pitchShift=%f, newPitch=%f, noteVal=%d, fineShift=%d", key, (double)patchCache->pitch, (double)patchCache->pitchKeyfollow, (double)patchCache->pitchShift, (double)newPitch, noteVal, fineShift); #endif // FIXME:KG: Raise/lower by octaves until in the supported range. while (noteVal > HIGHEST_NOTE) // FIXME:KG: see tables.cpp: >108? @@ -451,7 +451,7 @@ void Partial::setBend(float factor) { // FIXME:KG: Bend should be influenced by pitch key-follow too, according to docs. float bendSemitones = factor * patchCache->benderRange; // -24 .. 24 float mult = powf(2.0f, bendSemitones / 12.0f); - synth->printDebug("setBend(): factor=%f, benderRange=%f, semitones=%f, mult=%f\n", factor, patchCache->benderRange, bendSemitones, mult); + synth->printDebug("setBend(): factor=%f, benderRange=%f, semitones=%f, mult=%f\n", (double)factor, (double)patchCache->benderRange, (double)bendSemitones, (double)mult); bendShift = (int)(mult * 4096.0f); } |