aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/mt32/tables.cpp
diff options
context:
space:
mode:
authorMax Horn2009-07-01 20:51:04 +0000
committerMax Horn2009-07-01 20:51:04 +0000
commita6b57dc3a986f749ca8f915b461b184d48390757 (patch)
treed6c3e5e46743dd5073b8853613d61e501fa76fcd /sound/softsynth/mt32/tables.cpp
parent62acda5fdbe0daaeae9e1d0f08044b8be4ee98cf (diff)
downloadscummvm-rg350-a6b57dc3a986f749ca8f915b461b184d48390757.tar.gz
scummvm-rg350-a6b57dc3a986f749ca8f915b461b184d48390757.tar.bz2
scummvm-rg350-a6b57dc3a986f749ca8f915b461b184d48390757.zip
- Added GCC_PRINTF attribute to several funcs where it makes sense
- change some constants from double to float, to avoid "loss of precision due to implicit conversion" warnings - removed duplicate prototypes for some funcs - fixed some "increases required alignment of target type" warnings svn-id: r42009
Diffstat (limited to 'sound/softsynth/mt32/tables.cpp')
-rw-r--r--sound/softsynth/mt32/tables.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp
index bf35db776a..16fc4f71e5 100644
--- a/sound/softsynth/mt32/tables.cpp
+++ b/sound/softsynth/mt32/tables.cpp
@@ -35,9 +35,9 @@
// powf, resulting in a linker error because of multiple definitions.
// Hence we re-define them here. The only potential drawback is that it
// might be a little bit slower this way.
-#define powf pow
-#define floorf floor
-#define fabsf fabs
+#define powf(x,y) ((float)pow(x,y))
+#define floorf(x) ((float)floorf(x))
+#define fabsf(x) ((float)fabs(x))
#endif
#define FIXEDPOINT_MAKE(x, point) ((Bit32u)((1 << point) * x))
@@ -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 (%d <= 0.0f)", sampleRate);
+ synth->printDebug("Bad sampleRate (%f <= 0.0f)", sampleRate);
return false;
}
if (initialisedSampleRate == 0.0f) {