[alsa-devel] Getting pcm_usb_stream plugin to know its limits.

Michaël Cadilhac michael at cadilhac.name
Wed Dec 30 18:58:15 CET 2009


michael at cadilhac.name (Michaël Cadilhac) writes:

> --- pcm_usb_stream.c	2008-11-21 18:08:16.000000000 -0500
> +++ pcm_usb_stream.c	2009-12-30 12:36:00.654452577 -0500
> @@ -258,7 +258,7 @@
>  	snd_pcm_us_t *us = io->private_data;
>  	VDBG("%u", us->uus->s->periods_done);
>  
> -	if (io->stream == SND_PCM_STREAM_PLAYBACK)
> +	if (io->stream == SND_PCM_STREAM_PLAYBACK && us->uus->s)
>  		memset(us->uus->write_area, 0, us->uus->s->write_size);
>  
>  	return 0;

Just noticed that it would be better phrased as:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memset.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20091230/7fb789fd/attachment.patch 
-------------- next part --------------

-- 
Michaël `Micha' Cadilhac (LITQ, U. de Montréal) -- http://michael.cadilhac.name
	|| Un certain Blaise Pascal
	||   etc... etc...
	|| -- Prévert (Les paris stupides)


More information about the Alsa-devel mailing list