}
sb->nbframes = 0;
- real_start = (float)ogg_start / per_sfx->format.speed * snd_renderbuffer->format.speed;
+ real_start = (unsigned int) ((float)ogg_start / per_sfx->format.speed * snd_renderbuffer->format.speed);
if (*start - real_start + nbsampleframes > sb->maxframes)
{
Con_Printf ("OGG_FetchSound: stream buffer too small after seek (%u sample frames required)\n",
if(startcomment)
{
- *start = bound(0, atof(startcomment) * samplesfactor, numsamples);
+ *start = (unsigned int) bound(0, atof(startcomment) * samplesfactor, numsamples);
if(endcomment)
- *length = bound(0, atof(endcomment) * samplesfactor, numsamples);
+ *length = (unsigned int) bound(0, atof(endcomment) * samplesfactor, numsamples);
else if(lengthcomment)
- *length = bound(0, *start + atof(lengthcomment) * samplesfactor, numsamples);
+ *length = (unsigned int) bound(0, *start + atof(lengthcomment) * samplesfactor, numsamples);
}
}
if(peak)
{
- sfx->volume_mult = min(1 / peak, exp(gaindb * 0.05 * log(10)));
+ sfx->volume_mult = min(1.0f / peak, exp(gaindb * 0.05f * log(10.0f)));
sfx->volume_peak = peak;
if (developer_loading.integer >= 2)
Con_Printf ("Ogg sound file \"%s\" uses ReplayGain (gain %f, peak %f)\n", filename, sfx->volume_mult, sfx->volume_peak);