Add "f" suffix to float constants v1.2
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Mon, 19 Jun 2017 21:55:56 +0000 (17:55 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Mon, 19 Jun 2017 21:55:56 +0000 (17:55 -0400)
src/analysis.c

index 4ad44d3..6078dbe 100644 (file)
@@ -269,7 +269,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
       tonality_avg += tonal->info[pos].tonality;
       tonality_count++;
    }
-   info_out->tonality = MAX32(tonality_avg/tonality_count, tonality_max-.2);
+   info_out->tonality = MAX32(tonality_avg/tonality_count, tonality_max-.2f);
    tonal->read_subframe += len/(tonal->Fs/400);
    while (tonal->read_subframe>=8)
    {
@@ -370,9 +370,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
 
     if (tonal->count<4) {
        if (tonal->application == OPUS_APPLICATION_VOIP)
-          tonal->music_prob = .1;
+          tonal->music_prob = .1f;
        else
-          tonal->music_prob = .625;
+          tonal->music_prob = .625f;
     }
     kfft = celt_mode->mdct.kfft[0];
     if (tonal->count==0)
@@ -703,7 +703,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
     frame_stationarity /= NB_TBANDS;
     relativeE /= NB_TBANDS;
     if (tonal->count<10)
-       relativeE = .5;
+       relativeE = .5f;
     frame_noisiness /= NB_TBANDS;
 #if 1
     info->activity = frame_noisiness + (1-frame_noisiness)*relativeE;
@@ -833,9 +833,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
        if (tonal->count==1)
        {
           if (tonal->application == OPUS_APPLICATION_VOIP)
-             tonal->pmusic[0] = .1;
+             tonal->pmusic[0] = .1f;
           else
-             tonal->pmusic[0] = .625;
+             tonal->pmusic[0] = .625f;
           tonal->pspeech[0] = 1-tonal->pmusic[0];
        }
        /* Updated probability of having only speech (s0) or only music (m0),