static void do_wav_capture(Monitor *mon, const QDict *qdict)

{

    const char *path = qdict_get_str(qdict, "path");

    int has_freq = qdict_haskey(qdict, "freq");

    int freq = qdict_get_try_int(qdict, "freq", -1);

    int has_bits = qdict_haskey(qdict, "bits");

    int bits = qdict_get_try_int(qdict, "bits", -1);

    int has_channels = qdict_haskey(qdict, "nchannels");

    int nchannels = qdict_get_try_int(qdict, "nchannels", -1);

    CaptureState *s;



    s = qemu_mallocz (sizeof (*s));



    freq = has_freq ? freq : 44100;

    bits = has_bits ? bits : 16;

    nchannels = has_channels ? nchannels : 2;



    if (wav_start_capture (s, path, freq, bits, nchannels)) {

        monitor_printf(mon, "Faied to add wave capture\n");

        qemu_free (s);

    }

    QLIST_INSERT_HEAD (&capture_head, s, entries);

}

static void do_wav_capture(Monitor *mon, const QDict *qdict)

{

    const char *path = qdict_get_str(qdict, "path");

    int has_freq = qdict_haskey(qdict, "freq");

    int freq = qdict_get_try_int(qdict, "freq", -1);

    int has_bits = qdict_haskey(qdict, "bits");

    int bits = qdict_get_try_int(qdict, "bits", -1);

    int has_channels = qdict_haskey(qdict, "nchannels");

    int nchannels = qdict_get_try_int(qdict, "nchannels", -1);

    CaptureState *s;



    s = qemu_mallocz (sizeof (*s));



    freq = has_freq ? freq : 44100;

    bits = has_bits ? bits : 16;

    nchannels = has_channels ? nchannels : 2;



    if (wav_start_capture (s, path, freq, bits, nchannels)) {

        monitor_printf(mon, "Faied to add wave capture\n");

        qemu_free (s);

    }

    QLIST_INSERT_HEAD (&capture_head, s, entries);

}

        monitor_printf(mon, "Faied to add wave capture\n");
static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)

{

    const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2");

    int VAR_3 = qdict_haskey(VAR_1, "VAR_4");

    int VAR_4 = qdict_get_try_int(VAR_1, "VAR_4", -1);

    int VAR_5 = qdict_haskey(VAR_1, "VAR_6");

    int VAR_6 = qdict_get_try_int(VAR_1, "VAR_6", -1);

    int VAR_7 = qdict_haskey(VAR_1, "VAR_8");

    int VAR_8 = qdict_get_try_int(VAR_1, "VAR_8", -1);

    CaptureState *s;



    s = qemu_mallocz (sizeof (*s));



    VAR_4 = VAR_3 ? VAR_4 : 44100;

    VAR_6 = VAR_5 ? VAR_6 : 16;

    VAR_8 = VAR_7 ? VAR_8 : 2;



    if (wav_start_capture (s, VAR_2, VAR_4, VAR_6, VAR_8)) {

        monitor_printf(VAR_0, "Faied to add wave capture\n");

        qemu_free (s);

    }

    QLIST_INSERT_HEAD (&capture_head, s, entries);

}

static void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{ const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2"); int VAR_3 = qdict_haskey(VAR_1, "VAR_4"); int VAR_4 = qdict_get_try_int(VAR_1, "VAR_4", -1); int VAR_5 = qdict_haskey(VAR_1, "VAR_6"); int VAR_6 = qdict_get_try_int(VAR_1, "VAR_6", -1); int VAR_7 = qdict_haskey(VAR_1, "VAR_8"); int VAR_8 = qdict_get_try_int(VAR_1, "VAR_8", -1); CaptureState *s; s = qemu_mallocz (sizeof (*s)); VAR_4 = VAR_3 ? VAR_4 : 44100; VAR_6 = VAR_5 ? VAR_6 : 16; VAR_8 = VAR_7 ? VAR_8 : 2; if (wav_start_capture (s, VAR_2, VAR_4, VAR_6, VAR_8)) { monitor_printf(VAR_0, "Faied to add wave capture\n"); qemu_free (s); } QLIST_INSERT_HEAD (&capture_head, s, entries); }