diff options
author | Kari Salminen | 2007-08-04 12:16:10 +0000 |
---|---|---|
committer | Kari Salminen | 2007-08-04 12:16:10 +0000 |
commit | 44ddb2419b9d09c894bd3b2c8e1be39c87b30e67 (patch) | |
tree | c833d37e048e92c218d0c30b197877e30ee9434b | |
parent | 532a662f5a5a00389fc6523aaf018c6a3112226f (diff) | |
download | scummvm-rg350-44ddb2419b9d09c894bd3b2c8e1be39c87b30e67.tar.gz scummvm-rg350-44ddb2419b9d09c894bd3b2c8e1be39c87b30e67.tar.bz2 scummvm-rg350-44ddb2419b9d09c894bd3b2c8e1be39c87b30e67.zip |
Fixes compilation error C2666: 'pow' : 7 overloads have similar conversions on Windows (VS2003), Xbox (VS2003) and Xbox 360 (VS2005). Thanks to Carch for reporting the compilation problems.
svn-id: r28446
-rw-r--r-- | engines/agi/sound.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 0182a27db7..b083b77440 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -50,6 +50,9 @@ struct IIgsEnvelope { IIgsEnvelopeSegment seg[ENVELOPE_SEGMENT_COUNT]; }; +// 2**(1/12) i.e. the 12th root of 2 +#define SEMITONE 1.059463094359295 + struct IIgsWaveInfo { uint8 top; uint8 addr; @@ -199,7 +202,7 @@ Audio::AudioStream *makeIIgsSampleStream(Common::SeekableReadStream &stream, int if (readBytes == header.sampleSize) { // Check that we got all the data we requested // Make an audio stream from the mono, 8 bit, unsigned input data byte flags = Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED; - int rate = (int) (1076 * pow(pow(2, 1/12.0), header.pitch)); + int rate = (int) (1076 * pow(SEMITONE, header.pitch)); result = Audio::makeLinearInputStream(sampleData, header.sampleSize, rate, flags, 0, 0); } } |