#include "quakedef.h"
#include "snd_main.h"
-typedef struct
+typedef struct portable_samplepair_s
{
int left;
int right;
// paint up to end
if (ch->end < end)
- count = ch->end - ltime;
+ count = (int)ch->end - ltime;
else
count = end - ltime;
// Stereo sound support
if (ch->sfx->format.channels == 2)
{
- sfx = sb->data + (ch->pos - sb->offset) * 2;
+ sfx = (signed char *)sb->data + (ch->pos - sb->offset) * 2;
for (i = 0;i < count;i++)
{
paintbuffer[i].left += (*sfx++ * leftvol) >> 8;
}
else
{
- sfx = sb->data + ch->pos - sb->offset;
+ sfx = (signed char *)sb->data + ch->pos - sb->offset;
for (i = 0;i < count;i++)
{
paintbuffer[i].left += (*sfx * leftvol) >> 8;
paintbuffer[i].right += (*sfx++ * rightvol) >> 8;
}
-
}
ch->pos += count;
return true;