osx: don't use void pointer in arithmetic
Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos". This fixes a gcc warning.
This commit is contained in:
parent
87f6f57bf6
commit
b0f46c2076
|
@ -183,13 +183,13 @@ osx_render(void *vdata,
|
|||
|
||||
if (od->pos + bytesToCopy > od->bufferSize) {
|
||||
size_t bytes = od->bufferSize - od->pos;
|
||||
memcpy(buffer->mData + curpos, od->buffer + od->pos, bytes);
|
||||
memcpy((unsigned char*)buffer->mData + curpos, od->buffer + od->pos, bytes);
|
||||
od->pos = 0;
|
||||
curpos += bytes;
|
||||
bytesToCopy -= bytes;
|
||||
}
|
||||
|
||||
memcpy(buffer->mData + curpos, od->buffer + od->pos, bytesToCopy);
|
||||
memcpy((unsigned char*)buffer->mData + curpos, od->buffer + od->pos, bytesToCopy);
|
||||
od->pos += bytesToCopy;
|
||||
curpos += bytesToCopy;
|
||||
|
||||
|
|
Loading…
Reference in New Issue