Commit b0f46c20 authored by Max Kellermann's avatar Max Kellermann

osx: don't use void pointer in arithmetic

Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos". This fixes a gcc warning.
parent 87f6f57b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment