From 83618cfd74be46e14f794ee11ba462c015498b4a Mon Sep 17 00:00:00 2001 From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Tue, 29 Dec 2020 13:54:03 +0300 Subject: [PATCH 1/3] Update bitrate.c --- lib/bitrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bitrate.c b/lib/bitrate.c index 132553cbe..52332eeac 100644 --- a/lib/bitrate.c +++ b/lib/bitrate.c @@ -42,7 +42,7 @@ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){ bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples); bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples); - bm->avgfloat=PACKETBLOBS/2; + bm->avgfloat=(double)(PACKETBLOBS)/2; /* not a necessary fix, but one that leads to a more balanced typical initialization */ From 170372541b3882de3a45b45a963968b92b8419ab Mon Sep 17 00:00:00 2001 From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Tue, 29 Dec 2020 13:55:15 +0300 Subject: [PATCH 2/3] Update envelope.c --- lib/envelope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/envelope.c b/lib/envelope.c index 22d39aa6e..462093369 100644 --- a/lib/envelope.c +++ b/lib/envelope.c @@ -106,7 +106,7 @@ static int _ve_amp(envelope_lookup *ve, /* stretch is used to gradually lengthen the number of windows considered prevoius-to-potential-trigger */ int stretch=max(VE_MINSTRETCH,ve->stretch/2); - float penalty=gi->stretch_penalty-(ve->stretch/2-VE_MINSTRETCH); + float penalty=gi->stretch_penalty-((float)(ve->stretch)/2-VE_MINSTRETCH); if(penalty<0.f)penalty=0.f; if(penalty>gi->stretch_penalty)penalty=gi->stretch_penalty; From 0794745767a283db71187bdbe8c5c4ae4249b0fb Mon Sep 17 00:00:00 2001 From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Tue, 29 Dec 2020 13:56:46 +0300 Subject: [PATCH 3/3] Update floor1.c --- lib/floor1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/floor1.c b/lib/floor1.c index c4fe3ea7e..98c4f18cb 100644 --- a/lib/floor1.c +++ b/lib/floor1.c @@ -560,7 +560,7 @@ static int inspect_error(int x0,int x1,int y0,int y1,const float *mask, if(info->maxover*info->maxover/n>info->maxerr)return(0); if(info->maxunder*info->maxunder/n>info->maxerr)return(0); - if(mse/n>info->maxerr)return(1); + if((float)(mse)/n>info->maxerr)return(1); return(0); }