aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/softsynth/mt32/partial.cpp6
-rw-r--r--sound/softsynth/mt32/synth.cpp4
-rw-r--r--sound/softsynth/mt32/tables.cpp14
3 files changed, 12 insertions, 12 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);
}
diff --git a/sound/softsynth/mt32/synth.cpp b/sound/softsynth/mt32/synth.cpp
index 55ca11ced7..16460795a5 100644
--- a/sound/softsynth/mt32/synth.cpp
+++ b/sound/softsynth/mt32/synth.cpp
@@ -316,7 +316,7 @@ bool Synth::initPCMList(Bit16u mapAddress, Bit16u count) {
// The number below is confirmed to a reasonable degree of accuracy on CM-32L
double STANDARDFREQ = 442.0;
float rTune = (float)(STANDARDFREQ * pow(2.0, (0x5000 - rTuneOffset) / 4056.0 - 9.0 / 12.0));
- //printDebug("%f,%d,%d", pTune, tps[i].pitchCoarse, tps[i].pitchFine);
+ //printDebug("%f,%d,%d", (double)pTune, tps[i].pitchCoarse, tps[i].pitchFine);
if (rAddr + rLen > pcmROMSize) {
printDebug("Control ROM error: Wave map entry %d points to invalid PCM address 0x%04X, length 0x%04X", i, rAddr, rLen);
return false;
@@ -1021,7 +1021,7 @@ bool Synth::refreshSystem() {
// The LAPC-I documentation claims a range of 427.5Hz-452.6Hz (similar to what we have here)
// The MT-32 documentation claims a range of 432.1Hz-457.6Hz
masterTune = 440.0f * powf(2.0f, (mt32ram.system.masterTune - 64.0f) / (128.0f * 12.0f));
- printDebug(" Master Tune: %f", masterTune);
+ printDebug(" Master Tune: %f", (double)masterTune);
printDebug(" Reverb: mode=%d, time=%d, level=%d", mt32ram.system.reverbMode, mt32ram.system.reverbTime, mt32ram.system.reverbLevel);
report(ReportType_newReverbMode, &mt32ram.system.reverbMode);
report(ReportType_newReverbTime, &mt32ram.system.reverbTime);
diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp
index 722a5e3c41..eba4d2a520 100644
--- a/sound/softsynth/mt32/tables.cpp
+++ b/sound/softsynth/mt32/tables.cpp
@@ -329,7 +329,7 @@ void Tables::initMT32ConstantTables(Synth *synth) {
tdist = (lf - 25.0f) / 25.0f;
padjtable[lf] = 1.0f - tdist;
}
- //synth->printDebug("lf %d = padj %f", lf, padjtable[lf]);
+ //synth->printDebug("lf %d = padj %f", lf, (double)padjtable[lf]);
}
float lfp, depf, finalval, tlf;
@@ -352,7 +352,7 @@ void Tables::initMT32ConstantTables(Synth *synth) {
pval = (int)finalval;
pitchEnvVal[lf][depat] = pval;
- //synth->printDebug("lf %d depat %d pval %d tlf %f lfp %f", lf,depat,pval, tlf, lfp);
+ //synth->printDebug("lf %d depat %d pval %d tlf %f lfp %f", lf,depat,pval, (double)tlf, (double)lfp);
} else {
pitchEnvVal[lf][depat] = 4096;
//synth->printDebug("lf %d depat %d pval 4096", lf, depat);
@@ -402,7 +402,7 @@ void Tables::initMT32ConstantTables(Synth *synth) {
tvaBiasMult[lf][distval] = (int)(dval * 256.0f);
}
}
- //synth->printDebug("Ampbias lf %d distval %d = %f (%x) %f", lf, distval, dval, tvaBiasMult[lf][distval],amplog);
+ //synth->printDebug("Ampbias lf %d distval %d = %f (%x) %f", lf, distval, (double)dval, tvaBiasMult[lf][distval],(double)amplog);
}
}
@@ -430,7 +430,7 @@ void Tables::initMT32ConstantTables(Synth *synth) {
tvfBiasMult[lf][distval] = (int)(dval * 256.0f);
}
}
- //synth->printDebug("Fbias lf %d distval %d = %f (%x) %f", lf, distval, dval, tvfBiasMult[lf][distval],amplog);
+ //synth->printDebug("Fbias lf %d distval %d = %f (%x) %f", lf, distval, (double)dval, tvfBiasMult[lf][distval],(double)amplog);
}
}
}
@@ -471,7 +471,7 @@ static void initDep(KeyLookup *keyLookup, float f) {
keyLookup->envTimeMult[dep] = (int)(ff * 256.0f);
}
}
- //synth->printDebug("F %f d1 %x d2 %x d3 %x d4 %x d5 %x", f, noteLookup->fildepTable[0], noteLookup->fildepTable[1], noteLookup->fildepTable[2], noteLookup->fildepTable[3], noteLookup->fildepTable[4]);
+ //synth->printDebug("F %f d1 %x d2 %x d3 %x d4 %x d5 %x", (double)f, noteLookup->fildepTable[0], noteLookup->fildepTable[1], noteLookup->fildepTable[2], noteLookup->fildepTable[3], noteLookup->fildepTable[4]);
}
Bit16s Tables::clampWF(Synth *synth, const char *n, float ampVal, double input) {
@@ -586,7 +586,7 @@ File *Tables::initNote(Synth *synth, NoteLookup *noteLookup, float note, float r
initSaw(noteLookup, noteLookup->div2);
- //synth->printDebug("Note %f; freq=%f, div=%f", note, freq, rate / freq);
+ //synth->printDebug("Note %f; freq=%f, div=%f", (double)note, (double)freq, (double) rate / freq);
file = initWave(synth, noteLookup, WGAMP, div2, file);
// Create the pitch tables
@@ -730,7 +730,7 @@ Tables::Tables() {
bool Tables::init(Synth *synth, PCMWaveEntry *pcmWaves, float sampleRate, float masterTune) {
if (sampleRate <= 0.0f) {
- synth->printDebug("Bad sampleRate (%f <= 0.0f)", sampleRate);
+ synth->printDebug("Bad sampleRate (%f <= 0.0f)", (double)sampleRate);
return false;
}
if (initialisedSampleRate == 0.0f) {