diff options
author | Chris Robinson <[email protected]> | 2023-12-23 03:07:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-23 03:07:57 -0800 |
commit | 4720b2c64d91facea24e8411c104770bd3763afa (patch) | |
tree | 7ab1cc05e307be0b18ef6cc3cc8a84ece8dae624 /examples/alstream.c | |
parent | d7304c49a1d2cea2dae0ae38fdd9706dbcdb561f (diff) |
Fix implicit widening after multiplication
Diffstat (limited to 'examples/alstream.c')
-rw-r--r-- | examples/alstream.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/alstream.c b/examples/alstream.c index 5cbbc2a7..c781f3d7 100644 --- a/examples/alstream.c +++ b/examples/alstream.c @@ -338,21 +338,21 @@ static int StartPlayer(StreamPlayer *player) if(player->sample_type == Int16) { slen = sf_readf_short(player->sndfile, player->membuf, - player->block_count * player->sampleblockalign); + (sf_count_t)player->block_count * player->sampleblockalign); if(slen < 1) break; slen *= player->byteblockalign; } else if(player->sample_type == Float) { slen = sf_readf_float(player->sndfile, player->membuf, - player->block_count * player->sampleblockalign); + (sf_count_t)player->block_count * player->sampleblockalign); if(slen < 1) break; slen *= player->byteblockalign; } else { slen = sf_read_raw(player->sndfile, player->membuf, - player->block_count * player->byteblockalign); + (sf_count_t)player->block_count * player->byteblockalign); if(slen > 0) slen -= slen%player->byteblockalign; if(slen < 1) break; } @@ -409,19 +409,19 @@ static int UpdatePlayer(StreamPlayer *player) if(player->sample_type == Int16) { slen = sf_readf_short(player->sndfile, player->membuf, - player->block_count * player->sampleblockalign); + (sf_count_t)player->block_count * player->sampleblockalign); if(slen > 0) slen *= player->byteblockalign; } else if(player->sample_type == Float) { slen = sf_readf_float(player->sndfile, player->membuf, - player->block_count * player->sampleblockalign); + (sf_count_t)player->block_count * player->sampleblockalign); if(slen > 0) slen *= player->byteblockalign; } else { slen = sf_read_raw(player->sndfile, player->membuf, - player->block_count * player->byteblockalign); + (sf_count_t)player->block_count * player->byteblockalign); if(slen > 0) slen -= slen%player->byteblockalign; } |