Re: [PATCH spice-server v3] sound: Remove sound channel global list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 09, 2017 at 03:34:44PM +0100, Frediano Ziglio wrote:
> Use channel list to iterate all channels.

Use the channel list from RedState to iterate over all channels

> This remove another global variable still left.

This removes one more global variable

> -void snd_set_playback_latency(RedClient *client, uint32_t latency)
> +void snd_set_playback_channel_latency(RedChannel *red_channel, RedClient *client,
> +                                      uint32_t latency)
>  {
> -    GList *l;
> +    if (!IS_PLAYBACK_CHANNEL(red_channel)) {
> +        return;
> +    }

Having a method which will silently ignore invalid objects is fairly
unusual (in this case, even
snd_set_playback_channel_latency(gtk_window_new(), ...) would "work").
Can the IS_PLAYBACK_CHANNEL() check be moved to the reds.c callers, with
the assumption that red_channel has to be of the appropriate type here?
(and same comment for set_playback_compression).

Apart from this, this looks good.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]