qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] Use C99 initializers for audio_option


From: malc
Subject: Re: [Qemu-devel] [PATCH 3/4] Use C99 initializers for audio_option
Date: Tue, 28 Jul 2009 01:10:19 +0400 (MSD)

On Mon, 27 Jul 2009, Juan Quintela wrote:

> 
> Signed-off-by: Juan Quintela <address@hidden>
> ---
>  audio/alsaaudio.c   |   88 ++++++++++++++++++++++++++--------------
>  audio/audio.c       |  109 
> ++++++++++++++++++++++++++++++++-------------------
>  audio/coreaudio.c   |   18 ++++++--
>  audio/dsoundaudio.c |   74 +++++++++++++++++++++++++----------
>  audio/esdaudio.c    |   36 +++++++++++------
>  audio/fmodaudio.c   |   47 +++++++++++++++-------
>  audio/ossaudio.c    |   46 +++++++++++++++------
>  audio/paaudio.c     |   44 +++++++++++++-------
>  audio/sdlaudio.c    |   11 ++++-
>  audio/wavaudio.c    |   35 +++++++++++------
>  10 files changed, 339 insertions(+), 169 deletions(-)
> 
> diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
> index 4954683..fcaf84f 100644
> --- a/audio/alsaaudio.c
> +++ b/audio/alsaaudio.c
> @@ -890,37 +890,63 @@ static void alsa_audio_fini (void *opaque)
>  }
> 
>  static struct audio_option alsa_options[] = {
> -    {"DAC_SIZE_IN_USEC", AUD_OPT_BOOL, &conf.size_in_usec_out,
> -     "DAC period/buffer size in microseconds (otherwise in frames)", NULL, 
> 0},
> -    {"DAC_PERIOD_SIZE", AUD_OPT_INT, &conf.period_size_out,
> -     "DAC period size (0 to go with system default)",
> -     &conf.period_size_out_overridden, 0},
> -    {"DAC_BUFFER_SIZE", AUD_OPT_INT, &conf.buffer_size_out,
> -     "DAC buffer size (0 to go with system default)",
> -     &conf.buffer_size_out_overridden, 0},
> -
> -    {"ADC_SIZE_IN_USEC", AUD_OPT_BOOL, &conf.size_in_usec_in,
> -     "ADC period/buffer size in microseconds (otherwise in frames)", NULL, 
> 0},
> -    {"ADC_PERIOD_SIZE", AUD_OPT_INT, &conf.period_size_in,
> -     "ADC period size (0 to go with system default)",
> -     &conf.period_size_in_overridden, 0},
> -    {"ADC_BUFFER_SIZE", AUD_OPT_INT, &conf.buffer_size_in,
> -     "ADC buffer size (0 to go with system default)",
> -     &conf.buffer_size_in_overridden, 0},
> -
> -    {"THRESHOLD", AUD_OPT_INT, &conf.threshold,
> -     "(undocumented)", NULL, 0},
> -
> -    {"DAC_DEV", AUD_OPT_STR, &conf.pcm_name_out,
> -     "DAC device name (for instance dmix)", NULL, 0},
> -
> -    {"ADC_DEV", AUD_OPT_STR, &conf.pcm_name_in,
> -     "ADC device name", NULL, 0},
> -
> -    {"VERBOSE", AUD_OPT_BOOL, &conf.verbose,
> -     "Behave in a more verbose way", NULL, 0},
> -
> -    {NULL, 0, NULL, NULL, NULL, 0}
> +    {
> +        .name = "DAC_SIZE_IN_USEC",
> +        .tag = AUD_OPT_BOOL,
> +        .valp = &conf.size_in_usec_out,
> +        .descr = "DAC period/buffer size in microseconds (otherwise in 
> frames)"
> +    },{

I'd prefer:

       { .name  = "DAC_SIZE_IN_USEC",
         .tag   = AUD_OPT_BOOL,
         .valp  = &conf.size_in_usec_out,
         .descr = "DAC period/buffer size in microseconds (otherwise in 
frames)" },
       { ...

And likewise elsewhere.

[..snip..]

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]