From: Jaroslav Kysela Date: Wed, 12 Feb 2003 11:49:47 +0000 (+0000) Subject: Fixed compilation problem for dmix (donot_close) X-Git-Tag: v1.0.3~291 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b5316c86cc390f808c751d718042b75dad6fb6df;p=alsa-lib.git Fixed compilation problem for dmix (donot_close) --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 525fd2f6..1b1daa44 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -659,7 +659,7 @@ int snd_pcm_close(snd_pcm_t *pcm) { int err; assert(pcm); - if (pcm->setup) { + if (pcm->setup && !pcm->donot_close) { snd_pcm_drop(pcm); err = snd_pcm_hw_free(pcm); if (err < 0) diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h index 14de711e..5060b702 100644 --- a/src/pcm/pcm_local.h +++ b/src/pcm/pcm_local.h @@ -200,6 +200,7 @@ struct _snd_pcm { snd_pcm_rbptr_t hw; snd_pcm_uframes_t min_align; int mmap_rw; + int donot_close; snd_pcm_channel_info_t *mmap_channels; snd_pcm_channel_area_t *running_areas; snd_pcm_channel_area_t *stopped_areas;