aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2017-01-15 07:10:38 +0000
committerD G Turner2017-01-15 07:10:38 +0000
commit8b4460e310886499f5018cdd264c0e3e835fe6fa (patch)
treed7a03038a7569d518822178e186eb6bae14d5801 /engines
parent75894a871c8f2f2e9d7bde7b2e830c4451d34f4c (diff)
downloadscummvm-rg350-8b4460e310886499f5018cdd264c0e3e835fe6fa.tar.gz
scummvm-rg350-8b4460e310886499f5018cdd264c0e3e835fe6fa.tar.bz2
scummvm-rg350-8b4460e310886499f5018cdd264c0e3e835fe6fa.zip
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.
Diffstat (limited to 'engines')
-rw-r--r--engines/adl/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/adl/sound.cpp b/engines/adl/sound.cpp
index 17f4955a12..63eea45953 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;