Skip to content

Commit

Permalink
out_coreaudio: fix build using C++ compilers.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Apr 4, 2024
1 parent 30ef9da commit 3e5ae30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/player/out_coreaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int open_coreaudio_output(const char *output, unsigned int *rate)
chunk_size = max_frames;
num_chunks = (*rate * ad.mBytesPerFrame * latency / 1000 + chunk_size - 1) / chunk_size;
buffer_len = (num_chunks + 1) * chunk_size;
if ((buffer = calloc(num_chunks + 1, chunk_size)) == NULL) {
if ((buffer = (unsigned char *)calloc(num_chunks + 1, chunk_size)) == NULL) {
goto err;
}

Expand Down Expand Up @@ -265,7 +265,7 @@ static int write_coreaudio_output(void *buf, int len)
}

while (len) {
j = write_buffer(buf, len);
j = write_buffer((unsigned char *)buf, len);
if (j > 0) {
len -= j;
buf = (char *)buf + j;
Expand Down

0 comments on commit 3e5ae30

Please sign in to comment.