Skip to content

Commit

Permalink
[MacOS: CoreAudio] Add missing mutex locking in two API functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mywave82 committed Nov 11, 2024
1 parent c783d03 commit 862d214
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion devp/devpcoreaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ static void devpCoreAudioOnBufferCallback (int samplesuntil, void (*callback)(vo
debug_printf ("devpCoreAudioOnBufferCallback: EXIT\n");
}


static void devpCoreAudioCommitBuffer (unsigned int samples)
{
debug_printf ("devpCoreAudioCommitBuffer: ENTER\n");
Expand Down Expand Up @@ -479,7 +478,11 @@ static int devpCoreAudioPlay (uint32_t *rate, enum plrRequestFormat *format, str

static void devpCoreAudioGetStats (uint64_t *committed, uint64_t *processed)
{
pthread_mutex_lock(&mutex);

plrDriverAPI->ringbufferAPI->get_stats (devpCoreAudioRingBuffer, committed, processed);

pthread_mutex_unlock(&mutex);
}

static const struct plrDevAPI_t devpCoreAudio = {
Expand Down

0 comments on commit 862d214

Please sign in to comment.