]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_ogg.c
changed some things to size_t to reduce warnings on MSVC x64
[xonotic/darkplaces.git] / snd_ogg.c
index 73aa52f7132f96f2d492918361fb8cb4e23ef475..61085b6e8f55d2a0623e503da0dd02cd1a66ebd9 100644 (file)
--- a/snd_ogg.c
+++ b/snd_ogg.c
@@ -452,7 +452,7 @@ static const sfxbuffer_t* OGG_FetchSound (channel_t* ch, unsigned int start, uns
        if (sb->offset <= start && sb->offset + sb->length >= start + nbsamples)
                return sb;
 
-       newlength = sb->offset + sb->length - start;
+       newlength = (int)(sb->offset + sb->length) - start;
 
        // If we need to skip some data before decompressing the rest, or if the stream has looped
        if (newlength < 0 || sb->offset > start)
@@ -492,8 +492,8 @@ static const sfxbuffer_t* OGG_FetchSound (channel_t* ch, unsigned int start, uns
                done += ret;
 
        // Resample in the sfxbuffer
-       newlength = ResampleSfx (resampling_buffer, (size_t)done / factor, &per_sfx->format, sb->data + sb->length * factor, sfx->name);
-       sb->length += newlength;
+       newlength = ResampleSfx (resampling_buffer, (size_t)done / (size_t)factor, &per_sfx->format, sb->data + sb->length * factor, sfx->name);
+       sb->length += newlength;
 
        return sb;
 }