]> code.delx.au - pulseaudio/commitdiff
make a few casts explicit to remove compiler warnings
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Oct 2008 15:14:58 +0000 (17:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Oct 2008 15:14:58 +0000 (17:14 +0200)
src/pulsecore/sample-util.c

index 5119ebd3466436a0930c4b84c719b0d3420e2070..7b9ac7bc99eba0fe24a07d52297c4cbf41b73033 100644 (file)
@@ -105,7 +105,7 @@ static void calc_linear_integer_volume(int32_t linear[], const pa_cvolume *volum
     pa_assert(volume);
 
     for (channel = 0; channel < volume->channels; channel++)
-        linear[channel] = lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
+        linear[channel] = (int32_t) lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
 }
 
 static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
@@ -132,7 +132,7 @@ static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned n
 
         for (channel = 0; channel < spec->channels; channel++) {
             pa_mix_info *m = streams + k;
-            m->linear[channel].i = lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
+            m->linear[channel].i = (int32_t) lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
         }
     }
 }