Commit 1ea879e5580f63414693655fcf0328559cdce138
1 parent
8b0de438
Make audio violate POSIX less
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
31 changed files
with
139 additions
and
135 deletions
audio/alsaaudio.c
@@ -527,7 +527,7 @@ static int alsa_run_out (HWVoiceOut *hw) | @@ -527,7 +527,7 @@ static int alsa_run_out (HWVoiceOut *hw) | ||
527 | int rpos, live, decr; | 527 | int rpos, live, decr; |
528 | int samples; | 528 | int samples; |
529 | uint8_t *dst; | 529 | uint8_t *dst; |
530 | - st_sample_t *src; | 530 | + struct st_sample *src; |
531 | snd_pcm_sframes_t avail; | 531 | snd_pcm_sframes_t avail; |
532 | 532 | ||
533 | live = audio_pcm_hw_get_live_out (hw); | 533 | live = audio_pcm_hw_get_live_out (hw); |
@@ -612,13 +612,13 @@ static void alsa_fini_out (HWVoiceOut *hw) | @@ -612,13 +612,13 @@ static void alsa_fini_out (HWVoiceOut *hw) | ||
612 | } | 612 | } |
613 | } | 613 | } |
614 | 614 | ||
615 | -static int alsa_init_out (HWVoiceOut *hw, audsettings_t *as) | 615 | +static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as) |
616 | { | 616 | { |
617 | ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw; | 617 | ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw; |
618 | struct alsa_params_req req; | 618 | struct alsa_params_req req; |
619 | struct alsa_params_obt obt; | 619 | struct alsa_params_obt obt; |
620 | snd_pcm_t *handle; | 620 | snd_pcm_t *handle; |
621 | - audsettings_t obt_as; | 621 | + struct audsettings obt_as; |
622 | 622 | ||
623 | req.fmt = aud_to_alsafmt (as->fmt); | 623 | req.fmt = aud_to_alsafmt (as->fmt); |
624 | req.freq = as->freq; | 624 | req.freq = as->freq; |
@@ -692,13 +692,13 @@ static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...) | @@ -692,13 +692,13 @@ static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...) | ||
692 | return -1; | 692 | return -1; |
693 | } | 693 | } |
694 | 694 | ||
695 | -static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as) | 695 | +static int alsa_init_in (HWVoiceIn *hw, struct audsettings *as) |
696 | { | 696 | { |
697 | ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw; | 697 | ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw; |
698 | struct alsa_params_req req; | 698 | struct alsa_params_req req; |
699 | struct alsa_params_obt obt; | 699 | struct alsa_params_obt obt; |
700 | snd_pcm_t *handle; | 700 | snd_pcm_t *handle; |
701 | - audsettings_t obt_as; | 701 | + struct audsettings obt_as; |
702 | 702 | ||
703 | req.fmt = aud_to_alsafmt (as->fmt); | 703 | req.fmt = aud_to_alsafmt (as->fmt); |
704 | req.freq = as->freq; | 704 | req.freq = as->freq; |
@@ -792,7 +792,7 @@ static int alsa_run_in (HWVoiceIn *hw) | @@ -792,7 +792,7 @@ static int alsa_run_in (HWVoiceIn *hw) | ||
792 | 792 | ||
793 | for (i = 0; i < 2; ++i) { | 793 | for (i = 0; i < 2; ++i) { |
794 | void *src; | 794 | void *src; |
795 | - st_sample_t *dst; | 795 | + struct st_sample *dst; |
796 | snd_pcm_sframes_t nread; | 796 | snd_pcm_sframes_t nread; |
797 | snd_pcm_uframes_t len; | 797 | snd_pcm_uframes_t len; |
798 | 798 |
audio/audio.c
@@ -47,7 +47,7 @@ struct fixed_settings { | @@ -47,7 +47,7 @@ struct fixed_settings { | ||
47 | int enabled; | 47 | int enabled; |
48 | int nb_voices; | 48 | int nb_voices; |
49 | int greedy; | 49 | int greedy; |
50 | - audsettings_t settings; | 50 | + struct audsettings settings; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct { | 53 | static struct { |
@@ -91,7 +91,7 @@ static struct { | @@ -91,7 +91,7 @@ static struct { | ||
91 | 91 | ||
92 | static AudioState glob_audio_state; | 92 | static AudioState glob_audio_state; |
93 | 93 | ||
94 | -volume_t nominal_volume = { | 94 | +struct mixeng_volume nominal_volume = { |
95 | 0, | 95 | 0, |
96 | #ifdef FLOAT_MIXENG | 96 | #ifdef FLOAT_MIXENG |
97 | 1.0, | 97 | 1.0, |
@@ -513,7 +513,7 @@ static void audio_process_options (const char *prefix, | @@ -513,7 +513,7 @@ static void audio_process_options (const char *prefix, | ||
513 | } | 513 | } |
514 | } | 514 | } |
515 | 515 | ||
516 | -static void audio_print_settings (audsettings_t *as) | 516 | +static void audio_print_settings (struct audsettings *as) |
517 | { | 517 | { |
518 | dolog ("frequency=%d nchannels=%d fmt=", as->freq, as->nchannels); | 518 | dolog ("frequency=%d nchannels=%d fmt=", as->freq, as->nchannels); |
519 | 519 | ||
@@ -556,7 +556,7 @@ static void audio_print_settings (audsettings_t *as) | @@ -556,7 +556,7 @@ static void audio_print_settings (audsettings_t *as) | ||
556 | AUD_log (NULL, "\n"); | 556 | AUD_log (NULL, "\n"); |
557 | } | 557 | } |
558 | 558 | ||
559 | -static int audio_validate_settings (audsettings_t *as) | 559 | +static int audio_validate_settings (struct audsettings *as) |
560 | { | 560 | { |
561 | int invalid; | 561 | int invalid; |
562 | 562 | ||
@@ -580,7 +580,7 @@ static int audio_validate_settings (audsettings_t *as) | @@ -580,7 +580,7 @@ static int audio_validate_settings (audsettings_t *as) | ||
580 | return invalid ? -1 : 0; | 580 | return invalid ? -1 : 0; |
581 | } | 581 | } |
582 | 582 | ||
583 | -static int audio_pcm_info_eq (struct audio_pcm_info *info, audsettings_t *as) | 583 | +static int audio_pcm_info_eq (struct audio_pcm_info *info, struct audsettings *as) |
584 | { | 584 | { |
585 | int bits = 8, sign = 0; | 585 | int bits = 8, sign = 0; |
586 | 586 | ||
@@ -609,7 +609,7 @@ static int audio_pcm_info_eq (struct audio_pcm_info *info, audsettings_t *as) | @@ -609,7 +609,7 @@ static int audio_pcm_info_eq (struct audio_pcm_info *info, audsettings_t *as) | ||
609 | && info->swap_endianness == (as->endianness != AUDIO_HOST_ENDIANNESS); | 609 | && info->swap_endianness == (as->endianness != AUDIO_HOST_ENDIANNESS); |
610 | } | 610 | } |
611 | 611 | ||
612 | -void audio_pcm_init_info (struct audio_pcm_info *info, audsettings_t *as) | 612 | +void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as) |
613 | { | 613 | { |
614 | int bits = 8, sign = 0, shift = 0; | 614 | int bits = 8, sign = 0, shift = 0; |
615 | 615 | ||
@@ -704,8 +704,8 @@ void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len) | @@ -704,8 +704,8 @@ void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len) | ||
704 | /* | 704 | /* |
705 | * Capture | 705 | * Capture |
706 | */ | 706 | */ |
707 | -static void noop_conv (st_sample_t *dst, const void *src, | ||
708 | - int samples, volume_t *vol) | 707 | +static void noop_conv (struct st_sample *dst, const void *src, |
708 | + int samples, struct mixeng_volume *vol) | ||
709 | { | 709 | { |
710 | (void) src; | 710 | (void) src; |
711 | (void) dst; | 711 | (void) dst; |
@@ -715,7 +715,7 @@ static void noop_conv (st_sample_t *dst, const void *src, | @@ -715,7 +715,7 @@ static void noop_conv (st_sample_t *dst, const void *src, | ||
715 | 715 | ||
716 | static CaptureVoiceOut *audio_pcm_capture_find_specific ( | 716 | static CaptureVoiceOut *audio_pcm_capture_find_specific ( |
717 | AudioState *s, | 717 | AudioState *s, |
718 | - audsettings_t *as | 718 | + struct audsettings *as |
719 | ) | 719 | ) |
720 | { | 720 | { |
721 | CaptureVoiceOut *cap; | 721 | CaptureVoiceOut *cap; |
@@ -891,7 +891,7 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size) | @@ -891,7 +891,7 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int size) | ||
891 | { | 891 | { |
892 | HWVoiceIn *hw = sw->hw; | 892 | HWVoiceIn *hw = sw->hw; |
893 | int samples, live, ret = 0, swlim, isamp, osamp, rpos, total = 0; | 893 | int samples, live, ret = 0, swlim, isamp, osamp, rpos, total = 0; |
894 | - st_sample_t *src, *dst = sw->buf; | 894 | + struct st_sample *src, *dst = sw->buf; |
895 | 895 | ||
896 | rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples; | 896 | rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples; |
897 | 897 | ||
@@ -1442,7 +1442,7 @@ static void audio_run_capture (AudioState *s) | @@ -1442,7 +1442,7 @@ static void audio_run_capture (AudioState *s) | ||
1442 | while (live) { | 1442 | while (live) { |
1443 | int left = hw->samples - rpos; | 1443 | int left = hw->samples - rpos; |
1444 | int to_capture = audio_MIN (live, left); | 1444 | int to_capture = audio_MIN (live, left); |
1445 | - st_sample_t *src; | 1445 | + struct st_sample *src; |
1446 | struct capture_callback *cb; | 1446 | struct capture_callback *cb; |
1447 | 1447 | ||
1448 | src = hw->mix_buf + rpos; | 1448 | src = hw->mix_buf + rpos; |
@@ -1812,7 +1812,7 @@ AudioState *AUD_init (void) | @@ -1812,7 +1812,7 @@ AudioState *AUD_init (void) | ||
1812 | 1812 | ||
1813 | CaptureVoiceOut *AUD_add_capture ( | 1813 | CaptureVoiceOut *AUD_add_capture ( |
1814 | AudioState *s, | 1814 | AudioState *s, |
1815 | - audsettings_t *as, | 1815 | + struct audsettings *as, |
1816 | struct audio_capture_ops *ops, | 1816 | struct audio_capture_ops *ops, |
1817 | void *cb_opaque | 1817 | void *cb_opaque |
1818 | ) | 1818 | ) |
@@ -1863,7 +1863,7 @@ CaptureVoiceOut *AUD_add_capture ( | @@ -1863,7 +1863,7 @@ CaptureVoiceOut *AUD_add_capture ( | ||
1863 | /* XXX find a more elegant way */ | 1863 | /* XXX find a more elegant way */ |
1864 | hw->samples = 4096 * 4; | 1864 | hw->samples = 4096 * 4; |
1865 | hw->mix_buf = audio_calloc (AUDIO_FUNC, hw->samples, | 1865 | hw->mix_buf = audio_calloc (AUDIO_FUNC, hw->samples, |
1866 | - sizeof (st_sample_t)); | 1866 | + sizeof (struct st_sample)); |
1867 | if (!hw->mix_buf) { | 1867 | if (!hw->mix_buf) { |
1868 | dolog ("Could not allocate capture mix buffer (%d samples)\n", | 1868 | dolog ("Could not allocate capture mix buffer (%d samples)\n", |
1869 | hw->samples); | 1869 | hw->samples); |
audio/audio.h
@@ -44,12 +44,12 @@ typedef enum { | @@ -44,12 +44,12 @@ typedef enum { | ||
44 | #define AUDIO_HOST_ENDIANNESS 0 | 44 | #define AUDIO_HOST_ENDIANNESS 0 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | -typedef struct { | 47 | +struct audsettings { |
48 | int freq; | 48 | int freq; |
49 | int nchannels; | 49 | int nchannels; |
50 | audfmt_e fmt; | 50 | audfmt_e fmt; |
51 | int endianness; | 51 | int endianness; |
52 | -} audsettings_t; | 52 | +}; |
53 | 53 | ||
54 | typedef enum { | 54 | typedef enum { |
55 | AUD_CNOTIFY_ENABLE, | 55 | AUD_CNOTIFY_ENABLE, |
@@ -100,7 +100,7 @@ void AUD_register_card (AudioState *s, const char *name, QEMUSoundCard *card); | @@ -100,7 +100,7 @@ void AUD_register_card (AudioState *s, const char *name, QEMUSoundCard *card); | ||
100 | void AUD_remove_card (QEMUSoundCard *card); | 100 | void AUD_remove_card (QEMUSoundCard *card); |
101 | CaptureVoiceOut *AUD_add_capture ( | 101 | CaptureVoiceOut *AUD_add_capture ( |
102 | AudioState *s, | 102 | AudioState *s, |
103 | - audsettings_t *as, | 103 | + struct audsettings *as, |
104 | struct audio_capture_ops *ops, | 104 | struct audio_capture_ops *ops, |
105 | void *opaque | 105 | void *opaque |
106 | ); | 106 | ); |
@@ -112,7 +112,7 @@ SWVoiceOut *AUD_open_out ( | @@ -112,7 +112,7 @@ SWVoiceOut *AUD_open_out ( | ||
112 | const char *name, | 112 | const char *name, |
113 | void *callback_opaque, | 113 | void *callback_opaque, |
114 | audio_callback_fn_t callback_fn, | 114 | audio_callback_fn_t callback_fn, |
115 | - audsettings_t *settings | 115 | + struct audsettings *settings |
116 | ); | 116 | ); |
117 | 117 | ||
118 | void AUD_close_out (QEMUSoundCard *card, SWVoiceOut *sw); | 118 | void AUD_close_out (QEMUSoundCard *card, SWVoiceOut *sw); |
@@ -133,7 +133,7 @@ SWVoiceIn *AUD_open_in ( | @@ -133,7 +133,7 @@ SWVoiceIn *AUD_open_in ( | ||
133 | const char *name, | 133 | const char *name, |
134 | void *callback_opaque, | 134 | void *callback_opaque, |
135 | audio_callback_fn_t callback_fn, | 135 | audio_callback_fn_t callback_fn, |
136 | - audsettings_t *settings | 136 | + struct audsettings *settings |
137 | ); | 137 | ); |
138 | 138 | ||
139 | void AUD_close_in (QEMUSoundCard *card, SWVoiceIn *sw); | 139 | void AUD_close_in (QEMUSoundCard *card, SWVoiceIn *sw); |
audio/audio_int.h
@@ -76,7 +76,7 @@ typedef struct HWVoiceOut { | @@ -76,7 +76,7 @@ typedef struct HWVoiceOut { | ||
76 | int rpos; | 76 | int rpos; |
77 | uint64_t ts_helper; | 77 | uint64_t ts_helper; |
78 | 78 | ||
79 | - st_sample_t *mix_buf; | 79 | + struct st_sample *mix_buf; |
80 | 80 | ||
81 | int samples; | 81 | int samples; |
82 | LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; | 82 | LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; |
@@ -95,7 +95,7 @@ typedef struct HWVoiceIn { | @@ -95,7 +95,7 @@ typedef struct HWVoiceIn { | ||
95 | int total_samples_captured; | 95 | int total_samples_captured; |
96 | uint64_t ts_helper; | 96 | uint64_t ts_helper; |
97 | 97 | ||
98 | - st_sample_t *conv_buf; | 98 | + struct st_sample *conv_buf; |
99 | 99 | ||
100 | int samples; | 100 | int samples; |
101 | LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head; | 101 | LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head; |
@@ -107,14 +107,14 @@ struct SWVoiceOut { | @@ -107,14 +107,14 @@ struct SWVoiceOut { | ||
107 | struct audio_pcm_info info; | 107 | struct audio_pcm_info info; |
108 | t_sample *conv; | 108 | t_sample *conv; |
109 | int64_t ratio; | 109 | int64_t ratio; |
110 | - st_sample_t *buf; | 110 | + struct st_sample *buf; |
111 | void *rate; | 111 | void *rate; |
112 | int total_hw_samples_mixed; | 112 | int total_hw_samples_mixed; |
113 | int active; | 113 | int active; |
114 | int empty; | 114 | int empty; |
115 | HWVoiceOut *hw; | 115 | HWVoiceOut *hw; |
116 | char *name; | 116 | char *name; |
117 | - volume_t vol; | 117 | + struct mixeng_volume vol; |
118 | struct audio_callback callback; | 118 | struct audio_callback callback; |
119 | LIST_ENTRY (SWVoiceOut) entries; | 119 | LIST_ENTRY (SWVoiceOut) entries; |
120 | }; | 120 | }; |
@@ -125,11 +125,11 @@ struct SWVoiceIn { | @@ -125,11 +125,11 @@ struct SWVoiceIn { | ||
125 | int64_t ratio; | 125 | int64_t ratio; |
126 | void *rate; | 126 | void *rate; |
127 | int total_hw_samples_acquired; | 127 | int total_hw_samples_acquired; |
128 | - st_sample_t *buf; | 128 | + struct st_sample *buf; |
129 | f_sample *clip; | 129 | f_sample *clip; |
130 | HWVoiceIn *hw; | 130 | HWVoiceIn *hw; |
131 | char *name; | 131 | char *name; |
132 | - volume_t vol; | 132 | + struct mixeng_volume vol; |
133 | struct audio_callback callback; | 133 | struct audio_callback callback; |
134 | LIST_ENTRY (SWVoiceIn) entries; | 134 | LIST_ENTRY (SWVoiceIn) entries; |
135 | }; | 135 | }; |
@@ -149,13 +149,13 @@ struct audio_driver { | @@ -149,13 +149,13 @@ struct audio_driver { | ||
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct audio_pcm_ops { | 151 | struct audio_pcm_ops { |
152 | - int (*init_out)(HWVoiceOut *hw, audsettings_t *as); | 152 | + int (*init_out)(HWVoiceOut *hw, struct audsettings *as); |
153 | void (*fini_out)(HWVoiceOut *hw); | 153 | void (*fini_out)(HWVoiceOut *hw); |
154 | int (*run_out) (HWVoiceOut *hw); | 154 | int (*run_out) (HWVoiceOut *hw); |
155 | int (*write) (SWVoiceOut *sw, void *buf, int size); | 155 | int (*write) (SWVoiceOut *sw, void *buf, int size); |
156 | int (*ctl_out) (HWVoiceOut *hw, int cmd, ...); | 156 | int (*ctl_out) (HWVoiceOut *hw, int cmd, ...); |
157 | 157 | ||
158 | - int (*init_in) (HWVoiceIn *hw, audsettings_t *as); | 158 | + int (*init_in) (HWVoiceIn *hw, struct audsettings *as); |
159 | void (*fini_in) (HWVoiceIn *hw); | 159 | void (*fini_in) (HWVoiceIn *hw); |
160 | int (*run_in) (HWVoiceIn *hw); | 160 | int (*run_in) (HWVoiceIn *hw); |
161 | int (*read) (SWVoiceIn *sw, void *buf, int size); | 161 | int (*read) (SWVoiceIn *sw, void *buf, int size); |
@@ -204,9 +204,9 @@ extern struct audio_driver coreaudio_audio_driver; | @@ -204,9 +204,9 @@ extern struct audio_driver coreaudio_audio_driver; | ||
204 | extern struct audio_driver dsound_audio_driver; | 204 | extern struct audio_driver dsound_audio_driver; |
205 | extern struct audio_driver esd_audio_driver; | 205 | extern struct audio_driver esd_audio_driver; |
206 | extern struct audio_driver pa_audio_driver; | 206 | extern struct audio_driver pa_audio_driver; |
207 | -extern volume_t nominal_volume; | 207 | +extern struct mixeng_volume nominal_volume; |
208 | 208 | ||
209 | -void audio_pcm_init_info (struct audio_pcm_info *info, audsettings_t *as); | 209 | +void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as); |
210 | void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len); | 210 | void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len); |
211 | 211 | ||
212 | int audio_pcm_sw_write (SWVoiceOut *sw, void *buf, int len); | 212 | int audio_pcm_sw_write (SWVoiceOut *sw, void *buf, int len); |
audio/audio_template.h
@@ -82,7 +82,7 @@ static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw) | @@ -82,7 +82,7 @@ static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw) | ||
82 | 82 | ||
83 | static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw) | 83 | static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw) |
84 | { | 84 | { |
85 | - HWBUF = audio_calloc (AUDIO_FUNC, hw->samples, sizeof (st_sample_t)); | 85 | + HWBUF = audio_calloc (AUDIO_FUNC, hw->samples, sizeof (struct st_sample)); |
86 | if (!HWBUF) { | 86 | if (!HWBUF) { |
87 | dolog ("Could not allocate " NAME " buffer (%d samples)\n", | 87 | dolog ("Could not allocate " NAME " buffer (%d samples)\n", |
88 | hw->samples); | 88 | hw->samples); |
@@ -116,7 +116,7 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw) | @@ -116,7 +116,7 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw) | ||
116 | samples = ((int64_t) sw->hw->samples << 32) / sw->ratio; | 116 | samples = ((int64_t) sw->hw->samples << 32) / sw->ratio; |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | - sw->buf = audio_calloc (AUDIO_FUNC, samples, sizeof (st_sample_t)); | 119 | + sw->buf = audio_calloc (AUDIO_FUNC, samples, sizeof (struct st_sample)); |
120 | if (!sw->buf) { | 120 | if (!sw->buf) { |
121 | dolog ("Could not allocate buffer for `%s' (%d samples)\n", | 121 | dolog ("Could not allocate buffer for `%s' (%d samples)\n", |
122 | SW_NAME (sw), samples); | 122 | SW_NAME (sw), samples); |
@@ -140,7 +140,7 @@ static int glue (audio_pcm_sw_init_, TYPE) ( | @@ -140,7 +140,7 @@ static int glue (audio_pcm_sw_init_, TYPE) ( | ||
140 | SW *sw, | 140 | SW *sw, |
141 | HW *hw, | 141 | HW *hw, |
142 | const char *name, | 142 | const char *name, |
143 | - audsettings_t *as | 143 | + struct audsettings *as |
144 | ) | 144 | ) |
145 | { | 145 | { |
146 | int err; | 146 | int err; |
@@ -229,7 +229,7 @@ static HW *glue (audio_pcm_hw_find_any_enabled_, TYPE) (AudioState *s, HW *hw) | @@ -229,7 +229,7 @@ static HW *glue (audio_pcm_hw_find_any_enabled_, TYPE) (AudioState *s, HW *hw) | ||
229 | static HW *glue (audio_pcm_hw_find_specific_, TYPE) ( | 229 | static HW *glue (audio_pcm_hw_find_specific_, TYPE) ( |
230 | AudioState *s, | 230 | AudioState *s, |
231 | HW *hw, | 231 | HW *hw, |
232 | - audsettings_t *as | 232 | + struct audsettings *as |
233 | ) | 233 | ) |
234 | { | 234 | { |
235 | while ((hw = glue (audio_pcm_hw_find_any_, TYPE) (s, hw))) { | 235 | while ((hw = glue (audio_pcm_hw_find_any_, TYPE) (s, hw))) { |
@@ -240,7 +240,8 @@ static HW *glue (audio_pcm_hw_find_specific_, TYPE) ( | @@ -240,7 +240,8 @@ static HW *glue (audio_pcm_hw_find_specific_, TYPE) ( | ||
240 | return NULL; | 240 | return NULL; |
241 | } | 241 | } |
242 | 242 | ||
243 | -static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, audsettings_t *as) | 243 | +static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, |
244 | + struct audsettings *as) | ||
244 | { | 245 | { |
245 | HW *hw; | 246 | HW *hw; |
246 | struct audio_driver *drv = s->drv; | 247 | struct audio_driver *drv = s->drv; |
@@ -308,7 +309,8 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, audsettings_t *as) | @@ -308,7 +309,8 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, audsettings_t *as) | ||
308 | return NULL; | 309 | return NULL; |
309 | } | 310 | } |
310 | 311 | ||
311 | -static HW *glue (audio_pcm_hw_add_, TYPE) (AudioState *s, audsettings_t *as) | 312 | +static HW *glue (audio_pcm_hw_add_, TYPE) (AudioState *s, |
313 | + struct audsettings *as) | ||
312 | { | 314 | { |
313 | HW *hw; | 315 | HW *hw; |
314 | 316 | ||
@@ -335,12 +337,12 @@ static HW *glue (audio_pcm_hw_add_, TYPE) (AudioState *s, audsettings_t *as) | @@ -335,12 +337,12 @@ static HW *glue (audio_pcm_hw_add_, TYPE) (AudioState *s, audsettings_t *as) | ||
335 | static SW *glue (audio_pcm_create_voice_pair_, TYPE) ( | 337 | static SW *glue (audio_pcm_create_voice_pair_, TYPE) ( |
336 | AudioState *s, | 338 | AudioState *s, |
337 | const char *sw_name, | 339 | const char *sw_name, |
338 | - audsettings_t *as | 340 | + struct audsettings *as |
339 | ) | 341 | ) |
340 | { | 342 | { |
341 | SW *sw; | 343 | SW *sw; |
342 | HW *hw; | 344 | HW *hw; |
343 | - audsettings_t hw_as; | 345 | + struct audsettings hw_as; |
344 | 346 | ||
345 | if (glue (conf.fixed_, TYPE).enabled) { | 347 | if (glue (conf.fixed_, TYPE).enabled) { |
346 | hw_as = glue (conf.fixed_, TYPE).settings; | 348 | hw_as = glue (conf.fixed_, TYPE).settings; |
@@ -405,7 +407,7 @@ SW *glue (AUD_open_, TYPE) ( | @@ -405,7 +407,7 @@ SW *glue (AUD_open_, TYPE) ( | ||
405 | const char *name, | 407 | const char *name, |
406 | void *callback_opaque , | 408 | void *callback_opaque , |
407 | audio_callback_fn_t callback_fn, | 409 | audio_callback_fn_t callback_fn, |
408 | - audsettings_t *as | 410 | + struct audsettings *as |
409 | ) | 411 | ) |
410 | { | 412 | { |
411 | AudioState *s; | 413 | AudioState *s; |
audio/coreaudio.c
@@ -233,7 +233,7 @@ static OSStatus audioDeviceIOProc( | @@ -233,7 +233,7 @@ static OSStatus audioDeviceIOProc( | ||
233 | HWVoiceOut *hw = hwptr; | 233 | HWVoiceOut *hw = hwptr; |
234 | coreaudioVoiceOut *core = (coreaudioVoiceOut *) hwptr; | 234 | coreaudioVoiceOut *core = (coreaudioVoiceOut *) hwptr; |
235 | int rpos, live; | 235 | int rpos, live; |
236 | - st_sample_t *src; | 236 | + struct st_sample *src; |
237 | #ifndef FLOAT_MIXENG | 237 | #ifndef FLOAT_MIXENG |
238 | #ifdef RECIPROCAL | 238 | #ifdef RECIPROCAL |
239 | const float scale = 1.f / UINT_MAX; | 239 | const float scale = 1.f / UINT_MAX; |
@@ -289,7 +289,7 @@ static int coreaudio_write (SWVoiceOut *sw, void *buf, int len) | @@ -289,7 +289,7 @@ static int coreaudio_write (SWVoiceOut *sw, void *buf, int len) | ||
289 | return audio_pcm_sw_write (sw, buf, len); | 289 | return audio_pcm_sw_write (sw, buf, len); |
290 | } | 290 | } |
291 | 291 | ||
292 | -static int coreaudio_init_out (HWVoiceOut *hw, audsettings_t *as) | 292 | +static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as) |
293 | { | 293 | { |
294 | OSStatus status; | 294 | OSStatus status; |
295 | coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw; | 295 | coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw; |
audio/dsound_template.h
@@ -174,16 +174,16 @@ static void dsound_fini_out (HWVoiceOut *hw) | @@ -174,16 +174,16 @@ static void dsound_fini_out (HWVoiceOut *hw) | ||
174 | } | 174 | } |
175 | 175 | ||
176 | #ifdef DSBTYPE_IN | 176 | #ifdef DSBTYPE_IN |
177 | -static int dsound_init_in (HWVoiceIn *hw, audsettings_t *as) | 177 | +static int dsound_init_in (HWVoiceIn *hw, struct audsettings *as) |
178 | #else | 178 | #else |
179 | -static int dsound_init_out (HWVoiceOut *hw, audsettings_t *as) | 179 | +static int dsound_init_out (HWVoiceOut *hw, struct audsettings *as) |
180 | #endif | 180 | #endif |
181 | { | 181 | { |
182 | int err; | 182 | int err; |
183 | HRESULT hr; | 183 | HRESULT hr; |
184 | dsound *s = &glob_dsound; | 184 | dsound *s = &glob_dsound; |
185 | WAVEFORMATEX wfx; | 185 | WAVEFORMATEX wfx; |
186 | - audsettings_t obt_as; | 186 | + struct audsettings obt_as; |
187 | #ifdef DSBTYPE_IN | 187 | #ifdef DSBTYPE_IN |
188 | const char *typ = "ADC"; | 188 | const char *typ = "ADC"; |
189 | DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; | 189 | DSoundVoiceIn *ds = (DSoundVoiceIn *) hw; |
audio/dsoundaudio.c
@@ -47,7 +47,7 @@ static struct { | @@ -47,7 +47,7 @@ static struct { | ||
47 | int set_primary; | 47 | int set_primary; |
48 | int bufsize_in; | 48 | int bufsize_in; |
49 | int bufsize_out; | 49 | int bufsize_out; |
50 | - audsettings_t settings; | 50 | + struct audsettings settings; |
51 | int latency_millis; | 51 | int latency_millis; |
52 | } conf = { | 52 | } conf = { |
53 | 1, | 53 | 1, |
@@ -68,7 +68,7 @@ typedef struct { | @@ -68,7 +68,7 @@ typedef struct { | ||
68 | LPDIRECTSOUND dsound; | 68 | LPDIRECTSOUND dsound; |
69 | LPDIRECTSOUNDCAPTURE dsound_capture; | 69 | LPDIRECTSOUNDCAPTURE dsound_capture; |
70 | LPDIRECTSOUNDBUFFER dsound_primary_buffer; | 70 | LPDIRECTSOUNDBUFFER dsound_primary_buffer; |
71 | - audsettings_t settings; | 71 | + struct audsettings settings; |
72 | } dsound; | 72 | } dsound; |
73 | 73 | ||
74 | static dsound glob_dsound; | 74 | static dsound glob_dsound; |
@@ -307,7 +307,8 @@ static int dsound_restore_out (LPDIRECTSOUNDBUFFER dsb) | @@ -307,7 +307,8 @@ static int dsound_restore_out (LPDIRECTSOUNDBUFFER dsb) | ||
307 | return -1; | 307 | return -1; |
308 | } | 308 | } |
309 | 309 | ||
310 | -static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) | 310 | +static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, |
311 | + struct audsettings *as) | ||
311 | { | 312 | { |
312 | memset (wfx, 0, sizeof (*wfx)); | 313 | memset (wfx, 0, sizeof (*wfx)); |
313 | 314 | ||
@@ -346,7 +347,8 @@ static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) | @@ -346,7 +347,8 @@ static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) | ||
346 | return 0; | 347 | return 0; |
347 | } | 348 | } |
348 | 349 | ||
349 | -static int waveformat_to_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) | 350 | +static int waveformat_to_audio_settings (WAVEFORMATEX *wfx, |
351 | + struct audsettings *as) | ||
350 | { | 352 | { |
351 | if (wfx->wFormatTag != WAVE_FORMAT_PCM) { | 353 | if (wfx->wFormatTag != WAVE_FORMAT_PCM) { |
352 | dolog ("Invalid wave format, tag is not PCM, but %d\n", | 354 | dolog ("Invalid wave format, tag is not PCM, but %d\n", |
@@ -448,8 +450,8 @@ static void dsound_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) | @@ -448,8 +450,8 @@ static void dsound_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) | ||
448 | int src_len1 = dst_len; | 450 | int src_len1 = dst_len; |
449 | int src_len2 = 0; | 451 | int src_len2 = 0; |
450 | int pos = hw->rpos + dst_len; | 452 | int pos = hw->rpos + dst_len; |
451 | - st_sample_t *src1 = hw->mix_buf + hw->rpos; | ||
452 | - st_sample_t *src2 = NULL; | 453 | + struct st_sample *src1 = hw->mix_buf + hw->rpos; |
454 | + struct st_sample *src2 = NULL; | ||
453 | 455 | ||
454 | if (pos > hw->samples) { | 456 | if (pos > hw->samples) { |
455 | src_len1 = hw->samples - hw->rpos; | 457 | src_len1 = hw->samples - hw->rpos; |
audio/esdaudio.c
@@ -115,7 +115,7 @@ static void *qesd_thread_out (void *arg) | @@ -115,7 +115,7 @@ static void *qesd_thread_out (void *arg) | ||
115 | while (to_mix) { | 115 | while (to_mix) { |
116 | ssize_t written; | 116 | ssize_t written; |
117 | int chunk = audio_MIN (to_mix, hw->samples - rpos); | 117 | int chunk = audio_MIN (to_mix, hw->samples - rpos); |
118 | - st_sample_t *src = hw->mix_buf + rpos; | 118 | + struct st_sample *src = hw->mix_buf + rpos; |
119 | 119 | ||
120 | hw->clip (esd->pcm_buf, src, chunk); | 120 | hw->clip (esd->pcm_buf, src, chunk); |
121 | 121 | ||
@@ -188,10 +188,10 @@ static int qesd_write (SWVoiceOut *sw, void *buf, int len) | @@ -188,10 +188,10 @@ static int qesd_write (SWVoiceOut *sw, void *buf, int len) | ||
188 | return audio_pcm_sw_write (sw, buf, len); | 188 | return audio_pcm_sw_write (sw, buf, len); |
189 | } | 189 | } |
190 | 190 | ||
191 | -static int qesd_init_out (HWVoiceOut *hw, audsettings_t *as) | 191 | +static int qesd_init_out (HWVoiceOut *hw, struct audsettings *as) |
192 | { | 192 | { |
193 | ESDVoiceOut *esd = (ESDVoiceOut *) hw; | 193 | ESDVoiceOut *esd = (ESDVoiceOut *) hw; |
194 | - audsettings_t obt_as = *as; | 194 | + struct audsettings obt_as = *as; |
195 | int esdfmt = ESD_STREAM | ESD_PLAY; | 195 | int esdfmt = ESD_STREAM | ESD_PLAY; |
196 | int err; | 196 | int err; |
197 | sigset_t set, old_set; | 197 | sigset_t set, old_set; |
@@ -421,10 +421,10 @@ static int qesd_read (SWVoiceIn *sw, void *buf, int len) | @@ -421,10 +421,10 @@ static int qesd_read (SWVoiceIn *sw, void *buf, int len) | ||
421 | return audio_pcm_sw_read (sw, buf, len); | 421 | return audio_pcm_sw_read (sw, buf, len); |
422 | } | 422 | } |
423 | 423 | ||
424 | -static int qesd_init_in (HWVoiceIn *hw, audsettings_t *as) | 424 | +static int qesd_init_in (HWVoiceIn *hw, struct audsettings *as) |
425 | { | 425 | { |
426 | ESDVoiceIn *esd = (ESDVoiceIn *) hw; | 426 | ESDVoiceIn *esd = (ESDVoiceIn *) hw; |
427 | - audsettings_t obt_as = *as; | 427 | + struct audsettings obt_as = *as; |
428 | int esdfmt = ESD_STREAM | ESD_RECORD; | 428 | int esdfmt = ESD_STREAM | ESD_RECORD; |
429 | int err; | 429 | int err; |
430 | sigset_t set, old_set; | 430 | sigset_t set, old_set; |
audio/fmodaudio.c
@@ -142,8 +142,8 @@ static void fmod_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) | @@ -142,8 +142,8 @@ static void fmod_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) | ||
142 | int src_len1 = dst_len; | 142 | int src_len1 = dst_len; |
143 | int src_len2 = 0; | 143 | int src_len2 = 0; |
144 | int pos = hw->rpos + dst_len; | 144 | int pos = hw->rpos + dst_len; |
145 | - st_sample_t *src1 = hw->mix_buf + hw->rpos; | ||
146 | - st_sample_t *src2 = NULL; | 145 | + struct st_sample *src1 = hw->mix_buf + hw->rpos; |
146 | + struct st_sample *src2 = NULL; | ||
147 | 147 | ||
148 | if (pos > hw->samples) { | 148 | if (pos > hw->samples) { |
149 | src_len1 = hw->samples - hw->rpos; | 149 | src_len1 = hw->samples - hw->rpos; |
@@ -355,11 +355,11 @@ static void fmod_fini_out (HWVoiceOut *hw) | @@ -355,11 +355,11 @@ static void fmod_fini_out (HWVoiceOut *hw) | ||
355 | } | 355 | } |
356 | } | 356 | } |
357 | 357 | ||
358 | -static int fmod_init_out (HWVoiceOut *hw, audsettings_t *as) | 358 | +static int fmod_init_out (HWVoiceOut *hw, struct audsettings *as) |
359 | { | 359 | { |
360 | int bits16, mode, channel; | 360 | int bits16, mode, channel; |
361 | FMODVoiceOut *fmd = (FMODVoiceOut *) hw; | 361 | FMODVoiceOut *fmd = (FMODVoiceOut *) hw; |
362 | - audsettings_t obt_as = *as; | 362 | + struct audsettings obt_as = *as; |
363 | 363 | ||
364 | mode = aud_to_fmodfmt (as->fmt, as->nchannels == 2 ? 1 : 0); | 364 | mode = aud_to_fmodfmt (as->fmt, as->nchannels == 2 ? 1 : 0); |
365 | fmd->fmod_sample = FSOUND_Sample_Alloc ( | 365 | fmd->fmod_sample = FSOUND_Sample_Alloc ( |
@@ -417,11 +417,11 @@ static int fmod_ctl_out (HWVoiceOut *hw, int cmd, ...) | @@ -417,11 +417,11 @@ static int fmod_ctl_out (HWVoiceOut *hw, int cmd, ...) | ||
417 | return 0; | 417 | return 0; |
418 | } | 418 | } |
419 | 419 | ||
420 | -static int fmod_init_in (HWVoiceIn *hw, audsettings_t *as) | 420 | +static int fmod_init_in (HWVoiceIn *hw, struct audsettings *as) |
421 | { | 421 | { |
422 | int bits16, mode; | 422 | int bits16, mode; |
423 | FMODVoiceIn *fmd = (FMODVoiceIn *) hw; | 423 | FMODVoiceIn *fmd = (FMODVoiceIn *) hw; |
424 | - audsettings_t obt_as = *as; | 424 | + struct audsettings obt_as = *as; |
425 | 425 | ||
426 | if (conf.broken_adc) { | 426 | if (conf.broken_adc) { |
427 | return -1; | 427 | return -1; |
audio/mixeng.c
@@ -290,7 +290,7 @@ struct rate { | @@ -290,7 +290,7 @@ struct rate { | ||
290 | uint64_t opos; | 290 | uint64_t opos; |
291 | uint64_t opos_inc; | 291 | uint64_t opos_inc; |
292 | uint32_t ipos; /* position in the input stream (integer) */ | 292 | uint32_t ipos; /* position in the input stream (integer) */ |
293 | - st_sample_t ilast; /* last sample in the input stream */ | 293 | + struct st_sample ilast; /* last sample in the input stream */ |
294 | }; | 294 | }; |
295 | 295 | ||
296 | /* | 296 | /* |
@@ -329,7 +329,7 @@ void st_rate_stop (void *opaque) | @@ -329,7 +329,7 @@ void st_rate_stop (void *opaque) | ||
329 | qemu_free (opaque); | 329 | qemu_free (opaque); |
330 | } | 330 | } |
331 | 331 | ||
332 | -void mixeng_clear (st_sample_t *buf, int len) | 332 | +void mixeng_clear (struct st_sample *buf, int len) |
333 | { | 333 | { |
334 | - memset (buf, 0, len * sizeof (st_sample_t)); | 334 | + memset (buf, 0, len * sizeof (struct st_sample)); |
335 | } | 335 | } |
audio/mixeng.h
@@ -25,27 +25,27 @@ | @@ -25,27 +25,27 @@ | ||
25 | #define QEMU_MIXENG_H | 25 | #define QEMU_MIXENG_H |
26 | 26 | ||
27 | #ifdef FLOAT_MIXENG | 27 | #ifdef FLOAT_MIXENG |
28 | -typedef float real_t; | ||
29 | -typedef struct { int mute; real_t r; real_t l; } volume_t; | ||
30 | -typedef struct { real_t l; real_t r; } st_sample_t; | 28 | +typedef float mixeng_real; |
29 | +struct mixeng_volume { int mute; mixeng_real r; mixeng_real l; }; | ||
30 | +struct mixeng_sample { mixeng_real l; mixeng_real r; }; | ||
31 | #else | 31 | #else |
32 | -typedef struct { int mute; int64_t r; int64_t l; } volume_t; | ||
33 | -typedef struct { int64_t l; int64_t r; } st_sample_t; | 32 | +struct mixeng_volume { int mute; int64_t r; int64_t l; }; |
33 | +struct st_sample { int64_t l; int64_t r; }; | ||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | -typedef void (t_sample) (st_sample_t *dst, const void *src, | ||
37 | - int samples, volume_t *vol); | ||
38 | -typedef void (f_sample) (void *dst, const st_sample_t *src, int samples); | 36 | +typedef void (t_sample) (struct st_sample *dst, const void *src, |
37 | + int samples, struct mixeng_volume *vol); | ||
38 | +typedef void (f_sample) (void *dst, const struct st_sample *src, int samples); | ||
39 | 39 | ||
40 | extern t_sample *mixeng_conv[2][2][2][3]; | 40 | extern t_sample *mixeng_conv[2][2][2][3]; |
41 | extern f_sample *mixeng_clip[2][2][2][3]; | 41 | extern f_sample *mixeng_clip[2][2][2][3]; |
42 | 42 | ||
43 | void *st_rate_start (int inrate, int outrate); | 43 | void *st_rate_start (int inrate, int outrate); |
44 | -void st_rate_flow (void *opaque, st_sample_t *ibuf, st_sample_t *obuf, | 44 | +void st_rate_flow (void *opaque, struct st_sample *ibuf, struct st_sample *obuf, |
45 | int *isamp, int *osamp); | 45 | int *isamp, int *osamp); |
46 | -void st_rate_flow_mix (void *opaque, st_sample_t *ibuf, st_sample_t *obuf, | 46 | +void st_rate_flow_mix (void *opaque, struct st_sample *ibuf, struct st_sample *obuf, |
47 | int *isamp, int *osamp); | 47 | int *isamp, int *osamp); |
48 | void st_rate_stop (void *opaque); | 48 | void st_rate_stop (void *opaque); |
49 | -void mixeng_clear (st_sample_t *buf, int len); | 49 | +void mixeng_clear (struct st_sample *buf, int len); |
50 | 50 | ||
51 | #endif /* mixeng.h */ | 51 | #endif /* mixeng.h */ |
audio/mixeng_template.h
@@ -44,26 +44,26 @@ | @@ -44,26 +44,26 @@ | ||
44 | #define ET glue (ENDIAN_CONVERSION, glue (_, IN_T)) | 44 | #define ET glue (ENDIAN_CONVERSION, glue (_, IN_T)) |
45 | 45 | ||
46 | #ifdef FLOAT_MIXENG | 46 | #ifdef FLOAT_MIXENG |
47 | -static real_t inline glue (conv_, ET) (IN_T v) | 47 | +static mixeng_real inline glue (conv_, ET) (IN_T v) |
48 | { | 48 | { |
49 | IN_T nv = ENDIAN_CONVERT (v); | 49 | IN_T nv = ENDIAN_CONVERT (v); |
50 | 50 | ||
51 | #ifdef RECIPROCAL | 51 | #ifdef RECIPROCAL |
52 | #ifdef SIGNED | 52 | #ifdef SIGNED |
53 | - return nv * (1.f / (real_t) (IN_MAX - IN_MIN)); | 53 | + return nv * (1.f / (mixeng_real) (IN_MAX - IN_MIN)); |
54 | #else | 54 | #else |
55 | - return (nv - HALF) * (1.f / (real_t) IN_MAX); | 55 | + return (nv - HALF) * (1.f / (mixeng_real) IN_MAX); |
56 | #endif | 56 | #endif |
57 | #else /* !RECIPROCAL */ | 57 | #else /* !RECIPROCAL */ |
58 | #ifdef SIGNED | 58 | #ifdef SIGNED |
59 | - return nv / (real_t) (IN_MAX - IN_MIN); | 59 | + return nv / (mixeng_real) (IN_MAX - IN_MIN); |
60 | #else | 60 | #else |
61 | - return (nv - HALF) / (real_t) IN_MAX; | 61 | + return (nv - HALF) / (mixeng_real) IN_MAX; |
62 | #endif | 62 | #endif |
63 | #endif | 63 | #endif |
64 | } | 64 | } |
65 | 65 | ||
66 | -static IN_T inline glue (clip_, ET) (real_t v) | 66 | +static IN_T inline glue (clip_, ET) (mixeng_real v) |
67 | { | 67 | { |
68 | if (v >= 0.5) { | 68 | if (v >= 0.5) { |
69 | return IN_MAX; | 69 | return IN_MAX; |
@@ -109,9 +109,9 @@ static inline IN_T glue (clip_, ET) (int64_t v) | @@ -109,9 +109,9 @@ static inline IN_T glue (clip_, ET) (int64_t v) | ||
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | static void glue (glue (conv_, ET), _to_stereo) | 111 | static void glue (glue (conv_, ET), _to_stereo) |
112 | - (st_sample_t *dst, const void *src, int samples, volume_t *vol) | 112 | + (struct st_sample *dst, const void *src, int samples, struct mixeng_volume *vol) |
113 | { | 113 | { |
114 | - st_sample_t *out = dst; | 114 | + struct st_sample *out = dst; |
115 | IN_T *in = (IN_T *) src; | 115 | IN_T *in = (IN_T *) src; |
116 | #ifdef CONFIG_MIXEMU | 116 | #ifdef CONFIG_MIXEMU |
117 | if (vol->mute) { | 117 | if (vol->mute) { |
@@ -129,9 +129,9 @@ static void glue (glue (conv_, ET), _to_stereo) | @@ -129,9 +129,9 @@ static void glue (glue (conv_, ET), _to_stereo) | ||
129 | } | 129 | } |
130 | 130 | ||
131 | static void glue (glue (conv_, ET), _to_mono) | 131 | static void glue (glue (conv_, ET), _to_mono) |
132 | - (st_sample_t *dst, const void *src, int samples, volume_t *vol) | 132 | + (struct st_sample *dst, const void *src, int samples, struct mixeng_volume *vol) |
133 | { | 133 | { |
134 | - st_sample_t *out = dst; | 134 | + struct st_sample *out = dst; |
135 | IN_T *in = (IN_T *) src; | 135 | IN_T *in = (IN_T *) src; |
136 | #ifdef CONFIG_MIXEMU | 136 | #ifdef CONFIG_MIXEMU |
137 | if (vol->mute) { | 137 | if (vol->mute) { |
@@ -150,9 +150,9 @@ static void glue (glue (conv_, ET), _to_mono) | @@ -150,9 +150,9 @@ static void glue (glue (conv_, ET), _to_mono) | ||
150 | } | 150 | } |
151 | 151 | ||
152 | static void glue (glue (clip_, ET), _from_stereo) | 152 | static void glue (glue (clip_, ET), _from_stereo) |
153 | - (void *dst, const st_sample_t *src, int samples) | 153 | + (void *dst, const struct st_sample *src, int samples) |
154 | { | 154 | { |
155 | - const st_sample_t *in = src; | 155 | + const struct st_sample *in = src; |
156 | IN_T *out = (IN_T *) dst; | 156 | IN_T *out = (IN_T *) dst; |
157 | while (samples--) { | 157 | while (samples--) { |
158 | *out++ = glue (clip_, ET) (in->l); | 158 | *out++ = glue (clip_, ET) (in->l); |
@@ -162,9 +162,9 @@ static void glue (glue (clip_, ET), _from_stereo) | @@ -162,9 +162,9 @@ static void glue (glue (clip_, ET), _from_stereo) | ||
162 | } | 162 | } |
163 | 163 | ||
164 | static void glue (glue (clip_, ET), _from_mono) | 164 | static void glue (glue (clip_, ET), _from_mono) |
165 | - (void *dst, const st_sample_t *src, int samples) | 165 | + (void *dst, const struct st_sample *src, int samples) |
166 | { | 166 | { |
167 | - const st_sample_t *in = src; | 167 | + const struct st_sample *in = src; |
168 | IN_T *out = (IN_T *) dst; | 168 | IN_T *out = (IN_T *) dst; |
169 | while (samples--) { | 169 | while (samples--) { |
170 | *out++ = glue (clip_, ET) (in->l + in->r); | 170 | *out++ = glue (clip_, ET) (in->l + in->r); |
audio/noaudio.c
@@ -68,7 +68,7 @@ static int no_write (SWVoiceOut *sw, void *buf, int len) | @@ -68,7 +68,7 @@ static int no_write (SWVoiceOut *sw, void *buf, int len) | ||
68 | return audio_pcm_sw_write (sw, buf, len); | 68 | return audio_pcm_sw_write (sw, buf, len); |
69 | } | 69 | } |
70 | 70 | ||
71 | -static int no_init_out (HWVoiceOut *hw, audsettings_t *as) | 71 | +static int no_init_out (HWVoiceOut *hw, struct audsettings *as) |
72 | { | 72 | { |
73 | audio_pcm_init_info (&hw->info, as); | 73 | audio_pcm_init_info (&hw->info, as); |
74 | hw->samples = 1024; | 74 | hw->samples = 1024; |
@@ -87,7 +87,7 @@ static int no_ctl_out (HWVoiceOut *hw, int cmd, ...) | @@ -87,7 +87,7 @@ static int no_ctl_out (HWVoiceOut *hw, int cmd, ...) | ||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | -static int no_init_in (HWVoiceIn *hw, audsettings_t *as) | 90 | +static int no_init_in (HWVoiceIn *hw, struct audsettings *as) |
91 | { | 91 | { |
92 | audio_pcm_init_info (&hw->info, as); | 92 | audio_pcm_init_info (&hw->info, as); |
93 | hw->samples = 1024; | 93 | hw->samples = 1024; |
audio/ossaudio.c
@@ -294,7 +294,7 @@ static int oss_run_out (HWVoiceOut *hw) | @@ -294,7 +294,7 @@ static int oss_run_out (HWVoiceOut *hw) | ||
294 | int err, rpos, live, decr; | 294 | int err, rpos, live, decr; |
295 | int samples; | 295 | int samples; |
296 | uint8_t *dst; | 296 | uint8_t *dst; |
297 | - st_sample_t *src; | 297 | + struct st_sample *src; |
298 | struct audio_buf_info abinfo; | 298 | struct audio_buf_info abinfo; |
299 | struct count_info cntinfo; | 299 | struct count_info cntinfo; |
300 | int bufsize; | 300 | int bufsize; |
@@ -434,7 +434,7 @@ static void oss_fini_out (HWVoiceOut *hw) | @@ -434,7 +434,7 @@ static void oss_fini_out (HWVoiceOut *hw) | ||
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | -static int oss_init_out (HWVoiceOut *hw, audsettings_t *as) | 437 | +static int oss_init_out (HWVoiceOut *hw, struct audsettings *as) |
438 | { | 438 | { |
439 | OSSVoiceOut *oss = (OSSVoiceOut *) hw; | 439 | OSSVoiceOut *oss = (OSSVoiceOut *) hw; |
440 | struct oss_params req, obt; | 440 | struct oss_params req, obt; |
@@ -442,7 +442,7 @@ static int oss_init_out (HWVoiceOut *hw, audsettings_t *as) | @@ -442,7 +442,7 @@ static int oss_init_out (HWVoiceOut *hw, audsettings_t *as) | ||
442 | int err; | 442 | int err; |
443 | int fd; | 443 | int fd; |
444 | audfmt_e effective_fmt; | 444 | audfmt_e effective_fmt; |
445 | - audsettings_t obt_as; | 445 | + struct audsettings obt_as; |
446 | 446 | ||
447 | oss->fd = -1; | 447 | oss->fd = -1; |
448 | 448 | ||
@@ -576,7 +576,7 @@ static int oss_ctl_out (HWVoiceOut *hw, int cmd, ...) | @@ -576,7 +576,7 @@ static int oss_ctl_out (HWVoiceOut *hw, int cmd, ...) | ||
576 | return 0; | 576 | return 0; |
577 | } | 577 | } |
578 | 578 | ||
579 | -static int oss_init_in (HWVoiceIn *hw, audsettings_t *as) | 579 | +static int oss_init_in (HWVoiceIn *hw, struct audsettings *as) |
580 | { | 580 | { |
581 | OSSVoiceIn *oss = (OSSVoiceIn *) hw; | 581 | OSSVoiceIn *oss = (OSSVoiceIn *) hw; |
582 | struct oss_params req, obt; | 582 | struct oss_params req, obt; |
@@ -584,7 +584,7 @@ static int oss_init_in (HWVoiceIn *hw, audsettings_t *as) | @@ -584,7 +584,7 @@ static int oss_init_in (HWVoiceIn *hw, audsettings_t *as) | ||
584 | int err; | 584 | int err; |
585 | int fd; | 585 | int fd; |
586 | audfmt_e effective_fmt; | 586 | audfmt_e effective_fmt; |
587 | - audsettings_t obt_as; | 587 | + struct audsettings obt_as; |
588 | 588 | ||
589 | oss->fd = -1; | 589 | oss->fd = -1; |
590 | 590 |
audio/paaudio.c
@@ -95,7 +95,7 @@ static void *qpa_thread_out (void *arg) | @@ -95,7 +95,7 @@ static void *qpa_thread_out (void *arg) | ||
95 | while (to_mix) { | 95 | while (to_mix) { |
96 | int error; | 96 | int error; |
97 | int chunk = audio_MIN (to_mix, hw->samples - rpos); | 97 | int chunk = audio_MIN (to_mix, hw->samples - rpos); |
98 | - st_sample_t *src = hw->mix_buf + rpos; | 98 | + struct st_sample *src = hw->mix_buf + rpos; |
99 | 99 | ||
100 | hw->clip (pa->pcm_buf, src, chunk); | 100 | hw->clip (pa->pcm_buf, src, chunk); |
101 | 101 | ||
@@ -295,11 +295,11 @@ static audfmt_e pa_to_audfmt (pa_sample_format_t fmt, int *endianness) | @@ -295,11 +295,11 @@ static audfmt_e pa_to_audfmt (pa_sample_format_t fmt, int *endianness) | ||
295 | } | 295 | } |
296 | } | 296 | } |
297 | 297 | ||
298 | -static int qpa_init_out (HWVoiceOut *hw, audsettings_t *as) | 298 | +static int qpa_init_out (HWVoiceOut *hw, struct audsettings *as) |
299 | { | 299 | { |
300 | int error; | 300 | int error; |
301 | static pa_sample_spec ss; | 301 | static pa_sample_spec ss; |
302 | - audsettings_t obt_as = *as; | 302 | + struct audsettings obt_as = *as; |
303 | PAVoiceOut *pa = (PAVoiceOut *) hw; | 303 | PAVoiceOut *pa = (PAVoiceOut *) hw; |
304 | 304 | ||
305 | ss.format = audfmt_to_pa (as->fmt, as->endianness); | 305 | ss.format = audfmt_to_pa (as->fmt, as->endianness); |
@@ -349,11 +349,11 @@ static int qpa_init_out (HWVoiceOut *hw, audsettings_t *as) | @@ -349,11 +349,11 @@ static int qpa_init_out (HWVoiceOut *hw, audsettings_t *as) | ||
349 | return -1; | 349 | return -1; |
350 | } | 350 | } |
351 | 351 | ||
352 | -static int qpa_init_in (HWVoiceIn *hw, audsettings_t *as) | 352 | +static int qpa_init_in (HWVoiceIn *hw, struct audsettings *as) |
353 | { | 353 | { |
354 | int error; | 354 | int error; |
355 | static pa_sample_spec ss; | 355 | static pa_sample_spec ss; |
356 | - audsettings_t obt_as = *as; | 356 | + struct audsettings obt_as = *as; |
357 | PAVoiceIn *pa = (PAVoiceIn *) hw; | 357 | PAVoiceIn *pa = (PAVoiceIn *) hw; |
358 | 358 | ||
359 | ss.format = audfmt_to_pa (as->fmt, as->endianness); | 359 | ss.format = audfmt_to_pa (as->fmt, as->endianness); |
audio/rate_template.h
@@ -27,15 +27,15 @@ | @@ -27,15 +27,15 @@ | ||
27 | * Processed signed long samples from ibuf to obuf. | 27 | * Processed signed long samples from ibuf to obuf. |
28 | * Return number of samples processed. | 28 | * Return number of samples processed. |
29 | */ | 29 | */ |
30 | -void NAME (void *opaque, st_sample_t *ibuf, st_sample_t *obuf, | 30 | +void NAME (void *opaque, struct st_sample *ibuf, struct st_sample *obuf, |
31 | int *isamp, int *osamp) | 31 | int *isamp, int *osamp) |
32 | { | 32 | { |
33 | struct rate *rate = opaque; | 33 | struct rate *rate = opaque; |
34 | - st_sample_t *istart, *iend; | ||
35 | - st_sample_t *ostart, *oend; | ||
36 | - st_sample_t ilast, icur, out; | 34 | + struct st_sample *istart, *iend; |
35 | + struct st_sample *ostart, *oend; | ||
36 | + struct st_sample ilast, icur, out; | ||
37 | #ifdef FLOAT_MIXENG | 37 | #ifdef FLOAT_MIXENG |
38 | - real_t t; | 38 | + mixeng_real t; |
39 | #else | 39 | #else |
40 | int64_t t; | 40 | int64_t t; |
41 | #endif | 41 | #endif |
@@ -84,7 +84,7 @@ void NAME (void *opaque, st_sample_t *ibuf, st_sample_t *obuf, | @@ -84,7 +84,7 @@ void NAME (void *opaque, st_sample_t *ibuf, st_sample_t *obuf, | ||
84 | #ifdef RECIPROCAL | 84 | #ifdef RECIPROCAL |
85 | t = (rate->opos & UINT_MAX) * (1.f / UINT_MAX); | 85 | t = (rate->opos & UINT_MAX) * (1.f / UINT_MAX); |
86 | #else | 86 | #else |
87 | - t = (rate->opos & UINT_MAX) / (real_t) UINT_MAX; | 87 | + t = (rate->opos & UINT_MAX) / (mixeng_real) UINT_MAX; |
88 | #endif | 88 | #endif |
89 | out.l = (ilast.l * (1.0 - t)) + icur.l * t; | 89 | out.l = (ilast.l * (1.0 - t)) + icur.l * t; |
90 | out.r = (ilast.r * (1.0 - t)) + icur.r * t; | 90 | out.r = (ilast.r * (1.0 - t)) + icur.r * t; |
audio/sdlaudio.c
@@ -257,7 +257,7 @@ static void sdl_callback (void *opaque, Uint8 *buf, int len) | @@ -257,7 +257,7 @@ static void sdl_callback (void *opaque, Uint8 *buf, int len) | ||
257 | decr = to_mix; | 257 | decr = to_mix; |
258 | while (to_mix) { | 258 | while (to_mix) { |
259 | int chunk = audio_MIN (to_mix, hw->samples - hw->rpos); | 259 | int chunk = audio_MIN (to_mix, hw->samples - hw->rpos); |
260 | - st_sample_t *src = hw->mix_buf + hw->rpos; | 260 | + struct st_sample *src = hw->mix_buf + hw->rpos; |
261 | 261 | ||
262 | /* dolog ("in callback to_mix %d, chunk %d\n", to_mix, chunk); */ | 262 | /* dolog ("in callback to_mix %d, chunk %d\n", to_mix, chunk); */ |
263 | hw->clip (buf, src, chunk); | 263 | hw->clip (buf, src, chunk); |
@@ -323,7 +323,7 @@ static void sdl_fini_out (HWVoiceOut *hw) | @@ -323,7 +323,7 @@ static void sdl_fini_out (HWVoiceOut *hw) | ||
323 | sdl_close (&glob_sdl); | 323 | sdl_close (&glob_sdl); |
324 | } | 324 | } |
325 | 325 | ||
326 | -static int sdl_init_out (HWVoiceOut *hw, audsettings_t *as) | 326 | +static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as) |
327 | { | 327 | { |
328 | SDLVoiceOut *sdl = (SDLVoiceOut *) hw; | 328 | SDLVoiceOut *sdl = (SDLVoiceOut *) hw; |
329 | SDLAudioState *s = &glob_sdl; | 329 | SDLAudioState *s = &glob_sdl; |
@@ -332,7 +332,7 @@ static int sdl_init_out (HWVoiceOut *hw, audsettings_t *as) | @@ -332,7 +332,7 @@ static int sdl_init_out (HWVoiceOut *hw, audsettings_t *as) | ||
332 | int endianess; | 332 | int endianess; |
333 | int err; | 333 | int err; |
334 | audfmt_e effective_fmt; | 334 | audfmt_e effective_fmt; |
335 | - audsettings_t obt_as; | 335 | + struct audsettings obt_as; |
336 | 336 | ||
337 | shift <<= as->nchannels == 2; | 337 | shift <<= as->nchannels == 2; |
338 | 338 |
audio/wavaudio.c
@@ -37,7 +37,7 @@ typedef struct WAVVoiceOut { | @@ -37,7 +37,7 @@ typedef struct WAVVoiceOut { | ||
37 | } WAVVoiceOut; | 37 | } WAVVoiceOut; |
38 | 38 | ||
39 | static struct { | 39 | static struct { |
40 | - audsettings_t settings; | 40 | + struct audsettings settings; |
41 | const char *wav_path; | 41 | const char *wav_path; |
42 | } conf = { | 42 | } conf = { |
43 | { | 43 | { |
@@ -54,7 +54,7 @@ static int wav_run_out (HWVoiceOut *hw) | @@ -54,7 +54,7 @@ static int wav_run_out (HWVoiceOut *hw) | ||
54 | WAVVoiceOut *wav = (WAVVoiceOut *) hw; | 54 | WAVVoiceOut *wav = (WAVVoiceOut *) hw; |
55 | int rpos, live, decr, samples; | 55 | int rpos, live, decr, samples; |
56 | uint8_t *dst; | 56 | uint8_t *dst; |
57 | - st_sample_t *src; | 57 | + struct st_sample *src; |
58 | int64_t now = qemu_get_clock (vm_clock); | 58 | int64_t now = qemu_get_clock (vm_clock); |
59 | int64_t ticks = now - wav->old_ticks; | 59 | int64_t ticks = now - wav->old_ticks; |
60 | int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec; | 60 | int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec; |
@@ -109,7 +109,7 @@ static void le_store (uint8_t *buf, uint32_t val, int len) | @@ -109,7 +109,7 @@ static void le_store (uint8_t *buf, uint32_t val, int len) | ||
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | -static int wav_init_out (HWVoiceOut *hw, audsettings_t *as) | 112 | +static int wav_init_out (HWVoiceOut *hw, struct audsettings *as) |
113 | { | 113 | { |
114 | WAVVoiceOut *wav = (WAVVoiceOut *) hw; | 114 | WAVVoiceOut *wav = (WAVVoiceOut *) hw; |
115 | int bits16 = 0, stereo = 0; | 115 | int bits16 = 0, stereo = 0; |
@@ -119,7 +119,7 @@ static int wav_init_out (HWVoiceOut *hw, audsettings_t *as) | @@ -119,7 +119,7 @@ static int wav_init_out (HWVoiceOut *hw, audsettings_t *as) | ||
119 | 0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04, | 119 | 0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04, |
120 | 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00 | 120 | 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00 |
121 | }; | 121 | }; |
122 | - audsettings_t wav_as = conf.settings; | 122 | + struct audsettings wav_as = conf.settings; |
123 | 123 | ||
124 | (void) as; | 124 | (void) as; |
125 | 125 |
audio/wavcapture.c
@@ -91,7 +91,7 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, | @@ -91,7 +91,7 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, | ||
91 | 0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04, | 91 | 0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04, |
92 | 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00 | 92 | 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00 |
93 | }; | 93 | }; |
94 | - audsettings_t as; | 94 | + struct audsettings as; |
95 | struct audio_capture_ops ops; | 95 | struct audio_capture_ops ops; |
96 | int stereo, bits16, shift; | 96 | int stereo, bits16, shift; |
97 | CaptureVoiceOut *cap; | 97 | CaptureVoiceOut *cap; |
hw/ac97.c
@@ -354,7 +354,7 @@ static uint16_t mixer_load (AC97LinkState *s, uint32_t i) | @@ -354,7 +354,7 @@ static uint16_t mixer_load (AC97LinkState *s, uint32_t i) | ||
354 | 354 | ||
355 | static void open_voice (AC97LinkState *s, int index, int freq) | 355 | static void open_voice (AC97LinkState *s, int index, int freq) |
356 | { | 356 | { |
357 | - audsettings_t as; | 357 | + struct audsettings as; |
358 | 358 | ||
359 | as.freq = freq; | 359 | as.freq = freq; |
360 | as.nchannels = 2; | 360 | as.nchannels = 2; |
hw/adlib.c
@@ -280,7 +280,7 @@ static void Adlib_fini (AdlibState *s) | @@ -280,7 +280,7 @@ static void Adlib_fini (AdlibState *s) | ||
280 | int Adlib_init (AudioState *audio, qemu_irq *pic) | 280 | int Adlib_init (AudioState *audio, qemu_irq *pic) |
281 | { | 281 | { |
282 | AdlibState *s = &glob_adlib; | 282 | AdlibState *s = &glob_adlib; |
283 | - audsettings_t as; | 283 | + struct audsettings as; |
284 | 284 | ||
285 | if (!audio) { | 285 | if (!audio) { |
286 | dolog ("No audio state\n"); | 286 | dolog ("No audio state\n"); |
hw/cs4231a.c
@@ -268,7 +268,7 @@ static void cs_audio_callback (void *opaque, int free) | @@ -268,7 +268,7 @@ static void cs_audio_callback (void *opaque, int free) | ||
268 | static void cs_reset_voices (CSState *s, uint32_t val) | 268 | static void cs_reset_voices (CSState *s, uint32_t val) |
269 | { | 269 | { |
270 | int xtal; | 270 | int xtal; |
271 | - audsettings_t as; | 271 | + struct audsettings as; |
272 | 272 | ||
273 | #ifdef DEBUG_XLAW | 273 | #ifdef DEBUG_XLAW |
274 | if (val == 0 || val == 32) | 274 | if (val == 0 || val == 32) |
hw/es1370.c
@@ -421,7 +421,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl) | @@ -421,7 +421,7 @@ static void es1370_update_voices (ES1370State *s, uint32_t ctl, uint32_t sctl) | ||
421 | (new_fmt & 2) ? AUD_FMT_S16 : AUD_FMT_U8, | 421 | (new_fmt & 2) ? AUD_FMT_S16 : AUD_FMT_U8, |
422 | d->shift); | 422 | d->shift); |
423 | if (new_freq) { | 423 | if (new_freq) { |
424 | - audsettings_t as; | 424 | + struct audsettings as; |
425 | 425 | ||
426 | as.freq = new_freq; | 426 | as.freq = new_freq; |
427 | as.nchannels = 1 << (new_fmt & 1); | 427 | as.nchannels = 1 << (new_fmt & 1); |
hw/gus.c
@@ -253,7 +253,7 @@ static int GUS_load (QEMUFile *f, void *opaque, int version_id) | @@ -253,7 +253,7 @@ static int GUS_load (QEMUFile *f, void *opaque, int version_id) | ||
253 | int GUS_init (AudioState *audio, qemu_irq *pic) | 253 | int GUS_init (AudioState *audio, qemu_irq *pic) |
254 | { | 254 | { |
255 | GUSState *s; | 255 | GUSState *s; |
256 | - audsettings_t as; | 256 | + struct audsettings as; |
257 | 257 | ||
258 | if (!audio) { | 258 | if (!audio) { |
259 | dolog ("No audio state\n"); | 259 | dolog ("No audio state\n"); |
hw/omap2.c
@@ -1610,7 +1610,7 @@ static void omap_eac_volume_update(struct omap_eac_s *s) | @@ -1610,7 +1610,7 @@ static void omap_eac_volume_update(struct omap_eac_s *s) | ||
1610 | 1610 | ||
1611 | static void omap_eac_format_update(struct omap_eac_s *s) | 1611 | static void omap_eac_format_update(struct omap_eac_s *s) |
1612 | { | 1612 | { |
1613 | - audsettings_t fmt; | 1613 | + struct audsettings fmt; |
1614 | 1614 | ||
1615 | /* The hardware buffers at most one sample */ | 1615 | /* The hardware buffers at most one sample */ |
1616 | if (s->codec.rxlen) | 1616 | if (s->codec.rxlen) |
hw/pcspk.c
@@ -99,7 +99,7 @@ static void pcspk_callback(void *opaque, int free) | @@ -99,7 +99,7 @@ static void pcspk_callback(void *opaque, int free) | ||
99 | int pcspk_audio_init(AudioState *audio, qemu_irq *pic) | 99 | int pcspk_audio_init(AudioState *audio, qemu_irq *pic) |
100 | { | 100 | { |
101 | PCSpkState *s = &pcspk_state; | 101 | PCSpkState *s = &pcspk_state; |
102 | - audsettings_t as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8, 0}; | 102 | + struct audsettings as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8, 0}; |
103 | 103 | ||
104 | if (!audio) { | 104 | if (!audio) { |
105 | AUD_log(s_spk, "No audio state\n"); | 105 | AUD_log(s_spk, "No audio state\n"); |
hw/sb16.c
@@ -201,7 +201,7 @@ static void aux_timer (void *opaque) | @@ -201,7 +201,7 @@ static void aux_timer (void *opaque) | ||
201 | static void continue_dma8 (SB16State *s) | 201 | static void continue_dma8 (SB16State *s) |
202 | { | 202 | { |
203 | if (s->freq > 0) { | 203 | if (s->freq > 0) { |
204 | - audsettings_t as; | 204 | + struct audsettings as; |
205 | 205 | ||
206 | s->audio_free = 0; | 206 | s->audio_free = 0; |
207 | 207 | ||
@@ -346,7 +346,7 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8_t d0, int dma_len) | @@ -346,7 +346,7 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8_t d0, int dma_len) | ||
346 | } | 346 | } |
347 | 347 | ||
348 | if (s->freq) { | 348 | if (s->freq) { |
349 | - audsettings_t as; | 349 | + struct audsettings as; |
350 | 350 | ||
351 | s->audio_free = 0; | 351 | s->audio_free = 0; |
352 | 352 | ||
@@ -833,7 +833,7 @@ static void complete (SB16State *s) | @@ -833,7 +833,7 @@ static void complete (SB16State *s) | ||
833 | 833 | ||
834 | static void legacy_reset (SB16State *s) | 834 | static void legacy_reset (SB16State *s) |
835 | { | 835 | { |
836 | - audsettings_t as; | 836 | + struct audsettings as; |
837 | 837 | ||
838 | s->freq = 11025; | 838 | s->freq = 11025; |
839 | s->fmt_signed = 0; | 839 | s->fmt_signed = 0; |
@@ -1375,7 +1375,7 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id) | @@ -1375,7 +1375,7 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id) | ||
1375 | 1375 | ||
1376 | if (s->dma_running) { | 1376 | if (s->dma_running) { |
1377 | if (s->freq) { | 1377 | if (s->freq) { |
1378 | - audsettings_t as; | 1378 | + struct audsettings as; |
1379 | 1379 | ||
1380 | s->audio_free = 0; | 1380 | s->audio_free = 0; |
1381 | 1381 |
hw/tsc210x.c
@@ -327,7 +327,7 @@ static void tsc2102_audio_rate_update(struct tsc210x_state_s *s) | @@ -327,7 +327,7 @@ static void tsc2102_audio_rate_update(struct tsc210x_state_s *s) | ||
327 | static void tsc2102_audio_output_update(struct tsc210x_state_s *s) | 327 | static void tsc2102_audio_output_update(struct tsc210x_state_s *s) |
328 | { | 328 | { |
329 | int enable; | 329 | int enable; |
330 | - audsettings_t fmt; | 330 | + struct audsettings fmt; |
331 | 331 | ||
332 | if (s->dac_voice[0]) { | 332 | if (s->dac_voice[0]) { |
333 | tsc210x_out_flush(s, s->codec.out.len); | 333 | tsc210x_out_flush(s, s->codec.out.len); |
hw/wm8750.c
@@ -170,9 +170,9 @@ static void wm8750_vol_update(struct wm8750_s *s) | @@ -170,9 +170,9 @@ static void wm8750_vol_update(struct wm8750_s *s) | ||
170 | static void wm8750_set_format(struct wm8750_s *s) | 170 | static void wm8750_set_format(struct wm8750_s *s) |
171 | { | 171 | { |
172 | int i; | 172 | int i; |
173 | - audsettings_t in_fmt; | ||
174 | - audsettings_t out_fmt; | ||
175 | - audsettings_t monoout_fmt; | 173 | + struct audsettings in_fmt; |
174 | + struct audsettings out_fmt; | ||
175 | + struct audsettings monoout_fmt; | ||
176 | 176 | ||
177 | wm8750_out_flush(s); | 177 | wm8750_out_flush(s); |
178 | 178 |
vnc.c
@@ -171,7 +171,7 @@ struct VncState | @@ -171,7 +171,7 @@ struct VncState | ||
171 | int client_blue_shift, client_blue_max, server_blue_shift, server_blue_max; | 171 | int client_blue_shift, client_blue_max, server_blue_shift, server_blue_max; |
172 | 172 | ||
173 | CaptureVoiceOut *audio_cap; | 173 | CaptureVoiceOut *audio_cap; |
174 | - audsettings_t as; | 174 | + struct audsettings as; |
175 | 175 | ||
176 | VncReadEvent *read_handler; | 176 | VncReadEvent *read_handler; |
177 | size_t read_handler_expect; | 177 | size_t read_handler_expect; |