1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-29 06:59:27 +02:00

Fix Clang complaints in LAME (needed for macOS compilation)

This commit is contained in:
James Crook 2019-04-05 17:02:41 +01:00
parent 3bc95e610a
commit e1d693abed
4 changed files with 9 additions and 9 deletions

View File

@ -251,7 +251,7 @@ IsVbrTag(const unsigned char *buf)
return (isTag0 || isTag1);
}
#define SHIFT_IN_BITS_VALUE(x,n,v) ( x = (x << (n)) | ( (v) & ~(-1 << (n)) ) )
#define SHIFT_IN_BITS_VALUE(x,n,v) ( x = (x << (n)) | ( (v) & ~(-1u << (n)) ) )
static void
setLameTagFrameHeader(lame_internal_flags const *gfc, unsigned char *buffer)
@ -427,7 +427,7 @@ GetVbrTag(VBRTAGDATA * pTagData, const unsigned char *buf)
}
if (head_flags & TOC_FLAG) {
if (pTagData->toc != NULL) {
if ((void *)pTagData->toc != NULL) {
for (i = 0; i < NUMTOCENTRIES; i++)
pTagData->toc[i] = buf[i];
}

View File

@ -638,7 +638,7 @@ lame_init_params(lame_global_flags * gfp)
if (cfg->vbr == vbr_off && gfp->brate == 0) {
/* no bitrate or compression ratio specified, use 11.025 */
if (EQ(gfp->compression_ratio, 0))
if (EQ(gfp->compression_ratio, 0.0))
gfp->compression_ratio = 11.025; /* rate to compress a CD down to exactly 128000 bps */
}
@ -1603,7 +1603,7 @@ save_gain_values(lame_internal_flags * gfc)
/* save the ReplayGain value */
if (cfg->findReplayGain) {
FLOAT const RadioGain = (FLOAT) GetTitleGain(rsv->rgdata);
if (NEQ(RadioGain, GAIN_NOT_ENOUGH_SAMPLES)) {
if (NEQ(RadioGain, (float)GAIN_NOT_ENOUGH_SAMPLES)) {
rov->RadioGain = (int) floor(RadioGain * 10.0 + 0.5); /* round to nearest */
}
else {

View File

@ -167,8 +167,8 @@ apply_vbr_preset(lame_global_flags * gfp, int a, int enforce)
LERP(ath_fixpoint);
(void) lame_set_VBR_q(gfp, set->vbr_q);
SET_OPTION(quant_comp, set->quant_comp, -1);
SET_OPTION(quant_comp_short, set->quant_comp_s, -1);
SET_OPTION(quant_comp, set->quant_comp, -1.0);
SET_OPTION(quant_comp_short, set->quant_comp_s, -1.0);
if (set->expY) {
(void) lame_set_experimentalY(gfp, set->expY);
}
@ -281,8 +281,8 @@ apply_abr_preset(lame_global_flags * gfp, int preset, int enforce)
(void) lame_set_sfscale(gfp, 1);
SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1);
SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1);
SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1.0);
SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1.0);
SET__OPTION(msfix, abr_switch_map[r].nsmsfix, -1);

View File

@ -1723,7 +1723,7 @@ float
lame_get_interChRatio(const lame_global_flags * gfp)
{
if (is_lame_global_flags_valid(gfp)) {
assert((0 <= gfp->interChRatio && gfp->interChRatio <= 1.0) || EQ(gfp->interChRatio, -1));
assert((0 <= gfp->interChRatio && gfp->interChRatio <= 1.0) || EQ(gfp->interChRatio, -1.0));
return gfp->interChRatio;
}
return 0;