Add "f" suffix to float constants

parent 352786c9
...@@ -269,7 +269,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int ...@@ -269,7 +269,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
tonality_avg += tonal->info[pos].tonality; tonality_avg += tonal->info[pos].tonality;
tonality_count++; 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); tonal->read_subframe += len/(tonal->Fs/400);
while (tonal->read_subframe>=8) while (tonal->read_subframe>=8)
{ {
...@@ -370,9 +370,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt ...@@ -370,9 +370,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
if (tonal->count<4) { if (tonal->count<4) {
if (tonal->application == OPUS_APPLICATION_VOIP) if (tonal->application == OPUS_APPLICATION_VOIP)
tonal->music_prob = .1; tonal->music_prob = .1f;
else else
tonal->music_prob = .625; tonal->music_prob = .625f;
} }
kfft = celt_mode->mdct.kfft[0]; kfft = celt_mode->mdct.kfft[0];
if (tonal->count==0) if (tonal->count==0)
...@@ -703,7 +703,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt ...@@ -703,7 +703,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
frame_stationarity /= NB_TBANDS; frame_stationarity /= NB_TBANDS;
relativeE /= NB_TBANDS; relativeE /= NB_TBANDS;
if (tonal->count<10) if (tonal->count<10)
relativeE = .5; relativeE = .5f;
frame_noisiness /= NB_TBANDS; frame_noisiness /= NB_TBANDS;
#if 1 #if 1
info->activity = frame_noisiness + (1-frame_noisiness)*relativeE; info->activity = frame_noisiness + (1-frame_noisiness)*relativeE;
...@@ -833,9 +833,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt ...@@ -833,9 +833,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
if (tonal->count==1) if (tonal->count==1)
{ {
if (tonal->application == OPUS_APPLICATION_VOIP) if (tonal->application == OPUS_APPLICATION_VOIP)
tonal->pmusic[0] = .1; tonal->pmusic[0] = .1f;
else else
tonal->pmusic[0] = .625; tonal->pmusic[0] = .625f;
tonal->pspeech[0] = 1-tonal->pmusic[0]; tonal->pspeech[0] = 1-tonal->pmusic[0];
} }
/* Updated probability of having only speech (s0) or only music (m0), /* Updated probability of having only speech (s0) or only music (m0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment