]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fixed compilation problem for dmix (donot_close)
authorJaroslav Kysela <perex@perex.cz>
Wed, 12 Feb 2003 11:49:47 +0000 (11:49 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 12 Feb 2003 11:49:47 +0000 (11:49 +0000)
src/pcm/pcm.c
src/pcm/pcm_local.h

index 525fd2f60b3ffa380206b458ce38ceb229afa056..1b1daa44aa6c9caea1702b6333de03774eae55a0 100644 (file)
@@ -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)
index 14de711ec0ae3e9c7a45a4fcfef54c4adef4825e..5060b70294f48ca3da5594fc19c6d718176f7220 100644 (file)
@@ -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;