summaryrefslogtreecommitdiff
path: root/modules/winwave
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-17 09:38:16 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-17 09:38:16 +0200
commitd0297e5b60907b3a8011bb9c7f011bb09c68060c (patch)
tree45c7349221cb5d0164db091a5d20106df41a72b5 /modules/winwave
parent7a3f16da1c3847f068b873c1ad8c0bee3c9ac3aa (diff)
update winwave module for ausrc/auplay api
Diffstat (limited to 'modules/winwave')
-rw-r--r--modules/winwave/play.c8
-rw-r--r--modules/winwave/src.c8
-rw-r--r--modules/winwave/winwave.h4
3 files changed, 8 insertions, 12 deletions
diff --git a/modules/winwave/play.c b/modules/winwave/play.c
index 1ca0d44..b9129fa 100644
--- a/modules/winwave/play.c
+++ b/modules/winwave/play.c
@@ -16,7 +16,7 @@
struct auplay_st {
- struct auplay *ap; /* inheritance */
+ const struct auplay *ap; /* inheritance */
struct dspbuf bufs[WRITE_BUFFERS];
int pos;
HWAVEOUT waveout;
@@ -50,8 +50,6 @@ static void auplay_destructor(void *arg)
}
waveOutClose(st->waveout);
-
- mem_deref(st->ap);
}
@@ -194,7 +192,7 @@ static int write_stream_open(struct auplay_st *st,
}
-int winwave_play_alloc(struct auplay_st **stp, struct auplay *ap,
+int winwave_play_alloc(struct auplay_st **stp, const struct auplay *ap,
struct auplay_prm *prm, const char *device,
auplay_write_h *wh, void *arg)
{
@@ -208,7 +206,7 @@ int winwave_play_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/winwave/src.c b/modules/winwave/src.c
index 9d8793f..e96915e 100644
--- a/modules/winwave/src.c
+++ b/modules/winwave/src.c
@@ -16,7 +16,7 @@
struct ausrc_st {
- struct ausrc *as; /* inheritance */
+ const struct ausrc *as; /* inheritance */
struct dspbuf bufs[READ_BUFFERS];
int pos;
HWAVEIN wavein;
@@ -44,8 +44,6 @@ static void ausrc_destructor(void *arg)
}
waveInClose(st->wavein);
-
- mem_deref(st->as);
}
@@ -189,7 +187,7 @@ static int read_stream_open(struct ausrc_st *st, const struct ausrc_prm *prm,
}
-int winwave_src_alloc(struct ausrc_st **stp, struct ausrc *as,
+int winwave_src_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)
@@ -207,7 +205,7 @@ int winwave_src_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;
diff --git a/modules/winwave/winwave.h b/modules/winwave/winwave.h
index ccccddf..2a49378 100644
--- a/modules/winwave/winwave.h
+++ b/modules/winwave/winwave.h
@@ -11,10 +11,10 @@ struct dspbuf {
};
-int winwave_src_alloc(struct ausrc_st **stp, struct ausrc *as,
+int winwave_src_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);
-int winwave_play_alloc(struct auplay_st **stp, struct auplay *ap,
+int winwave_play_alloc(struct auplay_st **stp, const struct auplay *ap,
struct auplay_prm *prm, const char *device,
auplay_write_h *wh, void *arg);