From 3e5ae3096f64744e3a9f75ca3b7c8678463b2c75 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 4 Apr 2024 11:21:28 +0300 Subject: [PATCH] out_coreaudio: fix build using C++ compilers. --- src/player/out_coreaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/player/out_coreaudio.c b/src/player/out_coreaudio.c index 83de30fa..664fc792 100644 --- a/src/player/out_coreaudio.c +++ b/src/player/out_coreaudio.c @@ -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; } @@ -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;