Commit 14658cd151da8e85e04946ac41f02676d53bc12d
Committed by
Anthony Liguori
1 parent
777aec7a
use struct initializer for audio.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
26 additions
and
26 deletions
audio/audio.c
... | ... | @@ -60,45 +60,45 @@ static struct { |
60 | 60 | int plive; |
61 | 61 | int log_to_monitor; |
62 | 62 | } conf = { |
63 | - { /* DAC fixed settings */ | |
64 | - 1, /* enabled */ | |
65 | - 1, /* nb_voices */ | |
66 | - 1, /* greedy */ | |
67 | - { | |
68 | - 44100, /* freq */ | |
69 | - 2, /* nchannels */ | |
70 | - AUD_FMT_S16, /* fmt */ | |
71 | - AUDIO_HOST_ENDIANNESS | |
63 | + .fixed_out = { /* DAC fixed settings */ | |
64 | + .enabled = 1, | |
65 | + .nb_voices = 1, | |
66 | + .greedy = 1, | |
67 | + .settings = { | |
68 | + .freq = 44100, | |
69 | + .nchannels = 2, | |
70 | + .fmt = AUD_FMT_S16, | |
71 | + .endianness = AUDIO_HOST_ENDIANNESS, | |
72 | 72 | } |
73 | 73 | }, |
74 | 74 | |
75 | - { /* ADC fixed settings */ | |
76 | - 1, /* enabled */ | |
77 | - 1, /* nb_voices */ | |
78 | - 1, /* greedy */ | |
79 | - { | |
80 | - 44100, /* freq */ | |
81 | - 2, /* nchannels */ | |
82 | - AUD_FMT_S16, /* fmt */ | |
83 | - AUDIO_HOST_ENDIANNESS | |
75 | + .fixed_in = { /* ADC fixed settings */ | |
76 | + .enabled = 1, | |
77 | + .nb_voices = 1, | |
78 | + .greedy = 1, | |
79 | + .settings = { | |
80 | + .freq = 44100, | |
81 | + .nchannels = 2, | |
82 | + .fmt = AUD_FMT_S16, | |
83 | + .endianness = AUDIO_HOST_ENDIANNESS, | |
84 | 84 | } |
85 | 85 | }, |
86 | 86 | |
87 | - { 250 }, /* period */ | |
88 | - 0, /* plive */ | |
89 | - 0 /* log_to_monitor */ | |
87 | + .period = { .ticks = 250 }, | |
88 | + .plive = 0, | |
89 | + .log_to_monitor = 0, | |
90 | 90 | }; |
91 | 91 | |
92 | 92 | static AudioState glob_audio_state; |
93 | 93 | |
94 | 94 | struct mixeng_volume nominal_volume = { |
95 | - 0, | |
95 | + .mute = 0, | |
96 | 96 | #ifdef FLOAT_MIXENG |
97 | - 1.0, | |
98 | - 1.0 | |
97 | + .r = 1.0, | |
98 | + .l = 1.0, | |
99 | 99 | #else |
100 | - 1ULL << 32, | |
101 | - 1ULL << 32 | |
100 | + .r = 1ULL << 32, | |
101 | + .l = 1ULL << 32, | |
102 | 102 | #endif |
103 | 103 | }; |
104 | 104 | ... | ... |