[Scummvm-git-logs] scummvm master -> 8b4460e310886499f5018cdd264c0e3e835fe6fa
digitall
dgturner at iee.org
Sun Jan 15 08:06:28 CET 2017
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:
8b4460e310 ADL: Fix Signed vs. Unsigned Compiler Warnings.
Commit: 8b4460e310886499f5018cdd264c0e3e835fe6fa
https://github.com/scummvm/scummvm/commit/8b4460e310886499f5018cdd264c0e3e835fe6fa
Author: D G Turner (digitall at scummvm.org)
Date: 2017-01-15T07:10:38Z
Commit Message:
ADL: Fix Signed vs. Unsigned Compiler Warnings.
This is a subtle issue associated with the Common::Frac usage. The
frac_t type is signed (int32), but the symbols such as FRAC_ONE are
defined by an enumeration which will default to unsigned int for
members. Unsure if the common code needs changing, but other usages fix
the warning by casting the enumeration values to frac_t so doing this
for now.
Changed paths:
engines/adl/sound.cpp
diff --git a/engines/adl/sound.cpp b/engines/adl/sound.cpp
index 17f4955..63eea45 100644
--- a/engines/adl/sound.cpp
+++ b/engines/adl/sound.cpp
@@ -55,7 +55,7 @@ Speaker::Speaker(int sampleRate) :
void Speaker::startTone(double freq) {
_halfWaveLen = _halfWaveRem = doubleToFrac(_rate / freq / 2);
- if (_halfWaveLen < FRAC_ONE) {
+ if (_halfWaveLen < (frac_t)FRAC_ONE) {
// Tone out of range at this sample rate
stopTone();
}
@@ -70,7 +70,7 @@ void Speaker::generateSamples(int16 *buffer, int numSamples) {
int offset = 0;
while (offset < numSamples) {
- if (_halfWaveRem >= 0 && _halfWaveRem < FRAC_ONE) {
+ if (_halfWaveRem >= 0 && _halfWaveRem < (frac_t)FRAC_ONE) {
// Rising/falling edge
// Switch level
_curSample = ~_curSample;
More information about the Scummvm-git-logs
mailing list