summaryrefslogtreecommitdiff
path: root/modules/audiounit
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-17 09:16:05 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-17 09:16:05 +0200
commit0fd069ccb68666a419732e249dd0fcea163729bf (patch)
treeeab3e8fbbab8592cd7b05fcaef2ff764b89d12b5 /modules/audiounit
parent7b30a0e203a06274164ca3a75bf6ff56a12b356f (diff)
audiounit: upgrade for new AUSRC/AUPLAY api
Diffstat (limited to 'modules/audiounit')
-rw-r--r--modules/audiounit/audiounit.c7
-rw-r--r--modules/audiounit/audiounit.h4
-rw-r--r--modules/audiounit/player.c7
-rw-r--r--modules/audiounit/recorder.c7
4 files changed, 15 insertions, 10 deletions
diff --git a/modules/audiounit/audiounit.c b/modules/audiounit/audiounit.c
index d5bbcc7..74583fc 100644
--- a/modules/audiounit/audiounit.c
+++ b/modules/audiounit/audiounit.c
@@ -10,6 +10,13 @@
#include "audiounit.h"
+/**
+ * @defgroup audiounit audiounit
+ *
+ * Audio driver module for OSX/iOS AudioUnit
+ */
+
+
AudioComponent output_comp = NULL;
static struct auplay *auplay;
diff --git a/modules/audiounit/audiounit.h b/modules/audiounit/audiounit.h
index dd85131..28e4a3a 100644
--- a/modules/audiounit/audiounit.h
+++ b/modules/audiounit/audiounit.h
@@ -18,10 +18,10 @@ int audiosess_alloc(struct audiosess_st **stp,
void audiosess_interrupt(bool interrupted);
-int audiounit_player_alloc(struct auplay_st **stp, struct auplay *ap,
+int audiounit_player_alloc(struct auplay_st **stp, const struct auplay *ap,
struct auplay_prm *prm, const char *device,
auplay_write_h *wh, void *arg);
-int audiounit_recorder_alloc(struct ausrc_st **stp, struct ausrc *as,
+int audiounit_recorder_alloc(struct ausrc_st **stp, const struct ausrc *as,
struct media_ctx **ctx,
struct ausrc_prm *prm, const char *device,
ausrc_read_h *rh, ausrc_error_h *errh, void *arg);
diff --git a/modules/audiounit/player.c b/modules/audiounit/player.c
index b875568..99b83c9 100644
--- a/modules/audiounit/player.c
+++ b/modules/audiounit/player.c
@@ -12,7 +12,7 @@
struct auplay_st {
- struct auplay *ap; /* inheritance */
+ const struct auplay *ap; /* inheritance */
struct audiosess_st *sess;
AudioUnit au;
pthread_mutex_t mutex;
@@ -34,7 +34,6 @@ static void auplay_destructor(void *arg)
AudioComponentInstanceDispose(st->au);
mem_deref(st->sess);
- mem_deref(st->ap);
pthread_mutex_destroy(&st->mutex);
}
@@ -87,7 +86,7 @@ static void interrupt_handler(bool interrupted, void *arg)
}
-int audiounit_player_alloc(struct auplay_st **stp, struct auplay *ap,
+int audiounit_player_alloc(struct auplay_st **stp, const struct auplay *ap,
struct auplay_prm *prm, const char *device,
auplay_write_h *wh, void *arg)
{
@@ -105,7 +104,7 @@ int audiounit_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;
diff --git a/modules/audiounit/recorder.c b/modules/audiounit/recorder.c
index 83943e3..d46f331 100644
--- a/modules/audiounit/recorder.c
+++ b/modules/audiounit/recorder.c
@@ -12,7 +12,7 @@
struct ausrc_st {
- struct ausrc *as; /* inheritance */
+ const struct ausrc *as; /* inheritance */
struct audiosess_st *sess;
AudioUnit au;
pthread_mutex_t mutex;
@@ -35,7 +35,6 @@ static void ausrc_destructor(void *arg)
AudioComponentInstanceDispose(st->au);
mem_deref(st->sess);
- mem_deref(st->as);
pthread_mutex_destroy(&st->mutex);
}
@@ -95,7 +94,7 @@ static void interrupt_handler(bool interrupted, void *arg)
}
-int audiounit_recorder_alloc(struct ausrc_st **stp, struct ausrc *as,
+int audiounit_recorder_alloc(struct ausrc_st **stp, const struct ausrc *as,
struct media_ctx **ctx,
struct ausrc_prm *prm, const char *device,
ausrc_read_h *rh, ausrc_error_h *errh, void *arg)
@@ -116,7 +115,7 @@ int audiounit_recorder_alloc(struct ausrc_st **stp, struct ausrc *as,
if (!st)
return ENOMEM;
- st->as = mem_ref(as);
+ st->as = as;
st->rh = rh;
st->arg = arg;
st->ch = prm->ch;