[Scummvm-cvs-logs] scummvm master -> 62e4945ec4638ad66c90a5363d71166f07914b8e

Strangerke Strangerke at scummvm.org
Sun Aug 11 15:09:39 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
62e4945ec4 MORTEVIELLE: Fix warnings about converting from double to int


Commit: 62e4945ec4638ad66c90a5363d71166f07914b8e
    https://github.com/scummvm/scummvm/commit/62e4945ec4638ad66c90a5363d71166f07914b8e
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-08-11T06:08:13-07:00

Commit Message:
MORTEVIELLE: Fix warnings about converting from double to int

Changed paths:
    engines/mortevielle/sound.cpp



diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp
index d1f8f78..f96aae4 100644
--- a/engines/mortevielle/sound.cpp
+++ b/engines/mortevielle/sound.cpp
@@ -139,7 +139,7 @@ void SoundManager::litph(tablint &t, int typ, int tempo) {
 			_mixer->stopHandle(_soundHandle);
 		_vm->_speechManager._buildingSentence = true;
 	}
-	int freq = tempo * 10 * 25.2;
+	int freq = tempo * 252; // 25.2 * 10
 	int i = 0;
 	while (i < _vm->_speechManager._ptr_oct) {
 		int idx = _vm->_mem[(kAdrTroct * 16) + i];
@@ -222,7 +222,7 @@ void SoundManager::litph(tablint &t, int typ, int tempo) {
 }
 
 void SoundManager::playSong(const byte* buf, uint size, uint loops) {
-	int freq = kTempoMusic * 10 * 25.2;
+	int freq = kTempoMusic * 252; // 25.2 * 10
 	Audio::SeekableAudioStream *raw = Audio::makeRawStream(buf, size, freq, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO);
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(raw, loops);
 	Audio::SoundHandle songHandle;






More information about the Scummvm-git-logs mailing list