Revision 1ea879e5 audio/audio.c
b/audio/audio.c | ||
---|---|---|
47 | 47 |
int enabled; |
48 | 48 |
int nb_voices; |
49 | 49 |
int greedy; |
50 |
audsettings_t settings;
|
|
50 |
struct audsettings settings;
|
|
51 | 51 |
}; |
52 | 52 |
|
53 | 53 |
static struct { |
... | ... | |
91 | 91 |
|
92 | 92 |
static AudioState glob_audio_state; |
93 | 93 |
|
94 |
volume_t nominal_volume = {
|
|
94 |
struct mixeng_volume nominal_volume = {
|
|
95 | 95 |
0, |
96 | 96 |
#ifdef FLOAT_MIXENG |
97 | 97 |
1.0, |
... | ... | |
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 | 518 |
dolog ("frequency=%d nchannels=%d fmt=", as->freq, as->nchannels); |
519 | 519 |
|
... | ... | |
556 | 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 | 561 |
int invalid; |
562 | 562 |
|
... | ... | |
580 | 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 | 585 |
int bits = 8, sign = 0; |
586 | 586 |
|
... | ... | |
609 | 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 | 614 |
int bits = 8, sign = 0, shift = 0; |
615 | 615 |
|
... | ... | |
704 | 704 |
/* |
705 | 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 | 710 |
(void) src; |
711 | 711 |
(void) dst; |
... | ... | |
715 | 715 |
|
716 | 716 |
static CaptureVoiceOut *audio_pcm_capture_find_specific ( |
717 | 717 |
AudioState *s, |
718 |
audsettings_t *as
|
|
718 |
struct audsettings *as
|
|
719 | 719 |
) |
720 | 720 |
{ |
721 | 721 |
CaptureVoiceOut *cap; |
... | ... | |
891 | 891 |
{ |
892 | 892 |
HWVoiceIn *hw = sw->hw; |
893 | 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 | 896 |
rpos = audio_pcm_sw_get_rpos_in (sw) % hw->samples; |
897 | 897 |
|
... | ... | |
1442 | 1442 |
while (live) { |
1443 | 1443 |
int left = hw->samples - rpos; |
1444 | 1444 |
int to_capture = audio_MIN (live, left); |
1445 |
st_sample_t *src;
|
|
1445 |
struct st_sample *src;
|
|
1446 | 1446 |
struct capture_callback *cb; |
1447 | 1447 |
|
1448 | 1448 |
src = hw->mix_buf + rpos; |
... | ... | |
1812 | 1812 |
|
1813 | 1813 |
CaptureVoiceOut *AUD_add_capture ( |
1814 | 1814 |
AudioState *s, |
1815 |
audsettings_t *as,
|
|
1815 |
struct audsettings *as,
|
|
1816 | 1816 |
struct audio_capture_ops *ops, |
1817 | 1817 |
void *cb_opaque |
1818 | 1818 |
) |
... | ... | |
1863 | 1863 |
/* XXX find a more elegant way */ |
1864 | 1864 |
hw->samples = 4096 * 4; |
1865 | 1865 |
hw->mix_buf = audio_calloc (AUDIO_FUNC, hw->samples, |
1866 |
sizeof (st_sample_t));
|
|
1866 |
sizeof (struct st_sample));
|
|
1867 | 1867 |
if (!hw->mix_buf) { |
1868 | 1868 |
dolog ("Could not allocate capture mix buffer (%d samples)\n", |
1869 | 1869 |
hw->samples); |
Also available in: Unified diff