OSDN Git Service

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 525fd2f..1b1daa4 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 14de711..5060b70 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;