diff options
Diffstat (limited to 'modules/coreaudio/player.c')
-rw-r--r-- | modules/coreaudio/player.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/coreaudio/player.c b/modules/coreaudio/player.c index fc53b8c..16cfa33 100644 --- a/modules/coreaudio/player.c +++ b/modules/coreaudio/player.c @@ -20,7 +20,7 @@ struct auplay_st { - struct auplay *ap; /* inheritance */ + const struct auplay *ap; /* inheritance */ AudioQueueRef queue; AudioQueueBufferRef buf[BUFC]; pthread_mutex_t mutex; @@ -51,8 +51,6 @@ static void auplay_destructor(void *arg) AudioQueueDispose(st->queue, true); } - mem_deref(st->ap); - pthread_mutex_destroy(&st->mutex); } @@ -78,7 +76,7 @@ static void play_handler(void *userData, AudioQueueRef outQ, } -int coreaudio_player_alloc(struct auplay_st **stp, struct auplay *ap, +int coreaudio_player_alloc(struct auplay_st **stp, const struct auplay *ap, struct auplay_prm *prm, const char *device, auplay_write_h *wh, void *arg) { @@ -94,7 +92,7 @@ int coreaudio_player_alloc(struct auplay_st **stp, struct auplay *ap, if (!st) return ENOMEM; - st->ap = mem_ref(ap); + st->ap = ap; st->wh = wh; st->arg = arg; |