mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-14 15:36:25 +00:00
use C99 initializers for all audio/*
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
1dd3e4d13d
commit
1a40d5e235
@ -786,8 +786,10 @@ static int alsa_run_in (HWVoiceIn *hw)
|
|||||||
int add;
|
int add;
|
||||||
int len;
|
int len;
|
||||||
} bufs[2] = {
|
} bufs[2] = {
|
||||||
{ hw->wpos, 0 },
|
{.add = hw->wpos,
|
||||||
{ 0, 0 }
|
.len = 0},
|
||||||
|
{.add = 0,
|
||||||
|
.len = 0}
|
||||||
};
|
};
|
||||||
snd_pcm_sframes_t avail;
|
snd_pcm_sframes_t avail;
|
||||||
snd_pcm_uframes_t read_samples = 0;
|
snd_pcm_uframes_t read_samples = 0;
|
||||||
|
@ -49,18 +49,16 @@ static struct {
|
|||||||
struct audsettings settings;
|
struct audsettings settings;
|
||||||
int latency_millis;
|
int latency_millis;
|
||||||
} conf = {
|
} conf = {
|
||||||
1,
|
.lock_retries = 1,
|
||||||
1,
|
.restore_retries = 1,
|
||||||
1,
|
.getstatus_retries = 1,
|
||||||
0,
|
.set_primary = 0,
|
||||||
16384,
|
.bufsize_in = 16384,
|
||||||
16384,
|
.bufsize_out = 16384,
|
||||||
{
|
.settings.freq = 44100,
|
||||||
44100,
|
.settings.nchannels = 2,
|
||||||
2,
|
.settings.fmt = AUD_FMT_S16
|
||||||
AUD_FMT_S16
|
.latency_millis = 10
|
||||||
},
|
|
||||||
10
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -58,10 +58,8 @@ static struct {
|
|||||||
char *dac_host;
|
char *dac_host;
|
||||||
char *adc_host;
|
char *adc_host;
|
||||||
} conf = {
|
} conf = {
|
||||||
1024,
|
.samples = 1024,
|
||||||
2,
|
.divisor = 2,
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void GCC_FMT_ATTR (2, 3) qesd_logerr (int err, const char *fmt, ...)
|
static void GCC_FMT_ATTR (2, 3) qesd_logerr (int err, const char *fmt, ...)
|
||||||
|
@ -50,13 +50,9 @@ static struct {
|
|||||||
int threshold;
|
int threshold;
|
||||||
int broken_adc;
|
int broken_adc;
|
||||||
} conf = {
|
} conf = {
|
||||||
NULL,
|
.nb_samples = 2048 * 2,
|
||||||
2048 * 2,
|
.freq = 44100,
|
||||||
44100,
|
.nb_channels = 2,
|
||||||
2,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void GCC_FMT_ATTR (1, 2) fmod_logerr (const char *fmt, ...)
|
static void GCC_FMT_ATTR (1, 2) fmod_logerr (const char *fmt, ...)
|
||||||
@ -517,27 +513,40 @@ static struct {
|
|||||||
const char *name;
|
const char *name;
|
||||||
int type;
|
int type;
|
||||||
} drvtab[] = {
|
} drvtab[] = {
|
||||||
{"none", FSOUND_OUTPUT_NOSOUND},
|
{.name = "none",
|
||||||
|
.type = FSOUND_OUTPUT_NOSOUND},
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
{"winmm", FSOUND_OUTPUT_WINMM},
|
{.name = "winmm",
|
||||||
{"dsound", FSOUND_OUTPUT_DSOUND},
|
.type = FSOUND_OUTPUT_WINMM},
|
||||||
{"a3d", FSOUND_OUTPUT_A3D},
|
{.name = "dsound",
|
||||||
{"asio", FSOUND_OUTPUT_ASIO},
|
.type = FSOUND_OUTPUT_DSOUND},
|
||||||
|
{.name = "a3d",
|
||||||
|
.type = FSOUND_OUTPUT_A3D},
|
||||||
|
{.name = "asio",
|
||||||
|
.type = FSOUND_OUTPUT_ASIO},
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
{"oss", FSOUND_OUTPUT_OSS},
|
{.name = "oss",
|
||||||
{"alsa", FSOUND_OUTPUT_ALSA},
|
.type = FSOUND_OUTPUT_OSS},
|
||||||
{"esd", FSOUND_OUTPUT_ESD},
|
{.name = "alsa",
|
||||||
|
.type = FSOUND_OUTPUT_ALSA},
|
||||||
|
{.name = "esd",
|
||||||
|
.type = FSOUND_OUTPUT_ESD},
|
||||||
#endif
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
{"mac", FSOUND_OUTPUT_MAC},
|
{.name = "mac",
|
||||||
|
.type = FSOUND_OUTPUT_MAC},
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
{"xbox", FSOUND_OUTPUT_XBOX},
|
{.name = "xbox",
|
||||||
{"ps2", FSOUND_OUTPUT_PS2},
|
.type = FSOUND_OUTPUT_XBOX},
|
||||||
{"gcube", FSOUND_OUTPUT_GC},
|
{.name = "ps2",
|
||||||
|
.type = FSOUND_OUTPUT_PS2},
|
||||||
|
{.name = "gcube",
|
||||||
|
.type = FSOUND_OUTPUT_GC},
|
||||||
#endif
|
#endif
|
||||||
{"none-realtime", FSOUND_OUTPUT_NOSOUND_NONREALTIME}
|
{.name = "none-realtime",
|
||||||
|
.type = FSOUND_OUTPUT_NOSOUND_NONREALTIME}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *fmod_audio_init (void)
|
static void *fmod_audio_init (void)
|
||||||
|
@ -654,8 +654,10 @@ static int oss_run_in (HWVoiceIn *hw)
|
|||||||
int add;
|
int add;
|
||||||
int len;
|
int len;
|
||||||
} bufs[2] = {
|
} bufs[2] = {
|
||||||
{ hw->wpos, 0 },
|
{.add = hw->wpos,
|
||||||
{ 0, 0 }
|
.len = 0},
|
||||||
|
{.add = 0,
|
||||||
|
.len = 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!dead) {
|
if (!dead) {
|
||||||
|
@ -38,11 +38,8 @@ static struct {
|
|||||||
char *sink;
|
char *sink;
|
||||||
char *source;
|
char *source;
|
||||||
} conf = {
|
} conf = {
|
||||||
1024,
|
.samples = 1024,
|
||||||
2,
|
.divisor = 2,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void GCC_FMT_ATTR (2, 3) qpa_logerr (int err, const char *fmt, ...)
|
static void GCC_FMT_ATTR (2, 3) qpa_logerr (int err, const char *fmt, ...)
|
||||||
|
@ -48,7 +48,7 @@ typedef struct SDLVoiceOut {
|
|||||||
static struct {
|
static struct {
|
||||||
int nb_samples;
|
int nb_samples;
|
||||||
} conf = {
|
} conf = {
|
||||||
1024
|
.nb_samples = 1024
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct SDLAudioState {
|
static struct SDLAudioState {
|
||||||
|
@ -40,13 +40,10 @@ static struct {
|
|||||||
struct audsettings settings;
|
struct audsettings settings;
|
||||||
const char *wav_path;
|
const char *wav_path;
|
||||||
} conf = {
|
} conf = {
|
||||||
{
|
.settings.freq = 44100,
|
||||||
44100,
|
.settings.nchannels = 2,
|
||||||
2,
|
.settings.fmt = AUD_FMT_S16,
|
||||||
AUD_FMT_S16,
|
.wav_path = "qemu.wav"
|
||||||
0
|
|
||||||
},
|
|
||||||
"qemu.wav"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int wav_run_out (HWVoiceOut *hw)
|
static int wav_run_out (HWVoiceOut *hw)
|
||||||
|
Loading…
Reference in New Issue
Block a user