diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-11-22 20:10:32 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-11-22 20:10:32 +0100 |
commit | 918fb79b58c07c64731baf574b3bec2d57e96a1f (patch) | |
tree | 9aa793cbf1751f102752c9399761136fbd009347 /modules/winwave/src.c | |
parent | 5690e4a0637009cc166dc88e3edf13957d736c4b (diff) |
winwave: call waveOutClose/waveInClose last
Diffstat (limited to 'modules/winwave/src.c')
-rw-r--r-- | modules/winwave/src.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/winwave/src.c b/modules/winwave/src.c index f480213..9d8793f 100644 --- a/modules/winwave/src.c +++ b/modules/winwave/src.c @@ -20,7 +20,7 @@ struct ausrc_st { struct dspbuf bufs[READ_BUFFERS]; int pos; HWAVEIN wavein; - bool rdy; + volatile bool rdy; size_t inuse; ausrc_read_h *rh; void *arg; @@ -36,7 +36,6 @@ static void ausrc_destructor(void *arg) waveInStop(st->wavein); waveInReset(st->wavein); - waveInClose(st->wavein); for (i = 0; i < READ_BUFFERS; i++) { waveInUnprepareHeader(st->wavein, &st->bufs[i].wh, @@ -44,6 +43,8 @@ static void ausrc_destructor(void *arg) mem_deref(st->bufs[i].mb); } + waveInClose(st->wavein); + mem_deref(st->as); } |