aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/alstream.c')
-rw-r--r--examples/alstream.c12
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;
}