Fixed file plugin - mmap access was broken and revents were not handled correctly

This commit is contained in:
Jaroslav Kysela 2004-02-08 10:19:52 +00:00
parent 37728639ae
commit 131d6610fc
5 changed files with 50 additions and 19 deletions

View file

@ -295,7 +295,7 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
err = pcm->ops->mmap(pcm);
if (err < 0)
return err;
if (pcm->shadow_mmap)
if (pcm->mmap_shadow)
return 0;
pcm->mmap_channels = calloc(pcm->channels, sizeof(pcm->mmap_channels[0]));
if (!pcm->mmap_channels)
@ -434,7 +434,7 @@ int snd_pcm_munmap(snd_pcm_t *pcm)
unsigned int c;
assert(pcm);
assert(pcm->mmap_channels);
if (pcm->shadow_mmap)
if (pcm->mmap_shadow)
return pcm->ops->munmap(pcm);
for (c = 0; c < pcm->channels; ++c) {
snd_pcm_channel_info_t *i = &pcm->mmap_channels[c];