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
This commit is contained in:
Kari Salminen 2007-08-04 12:16:10 +00:00
parent 532a662f5a
commit 44ddb2419b

View File

@ -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);
}
}