]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fix interleave check in pcm_direct.c
authorTakashi Iwai <tiwai@suse.de>
Tue, 29 Jul 2008 12:41:51 +0000 (14:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 Jul 2008 12:41:51 +0000 (14:41 +0200)
Fix the check of interleaved format.  It checked a totally bogus value
as PCM format.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_direct.c

index a884b120423e431ca990e39d4d4d236b362c6734..29649e980669dcb7e69b479250e7c093dcd77591 100644 (file)
@@ -1293,7 +1293,7 @@ int snd_pcm_direct_check_interleave(snd_pcm_direct_t *dmix, snd_pcm_t *pcm)
        const snd_pcm_channel_area_t *dst_areas;
        const snd_pcm_channel_area_t *src_areas;
 
-       bits = snd_pcm_format_physical_width(dmix->type);
+       bits = snd_pcm_format_physical_width(pcm->format);
        if ((bits % 8) != 0)
                interleaved = 0;
        channels = dmix->channels;