static int line_out_init (HWVoiceOut *hw, struct audsettings *as)

{

    SpiceVoiceOut *out = container_of (hw, SpiceVoiceOut, hw);

    struct audsettings settings;



#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    settings.freq       = spice_server_get_best_playback_rate(NULL);

#else

    settings.freq       = SPICE_INTERFACE_PLAYBACK_FREQ;

#endif

    settings.nchannels  = SPICE_INTERFACE_PLAYBACK_CHAN;

    settings.fmt        = AUD_FMT_S16;

    settings.endianness = AUDIO_HOST_ENDIANNESS;



    audio_pcm_init_info (&hw->info, &settings);

    hw->samples = LINE_OUT_SAMPLES;

    out->active = 0;



    out->sin.base.sif = &playback_sif.base;

    qemu_spice_add_interface (&out->sin.base);

#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    spice_server_set_playback_rate(&out->sin, settings.freq);

#endif

    return 0;

}

static int line_out_init (HWVoiceOut *hw, struct audsettings *as)

{

    SpiceVoiceOut *out = container_of (hw, SpiceVoiceOut, hw);

    struct audsettings settings;



#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    settings.freq       = spice_server_get_best_playback_rate(NULL);

#else

    settings.freq       = SPICE_INTERFACE_PLAYBACK_FREQ;

#endif

    settings.nchannels  = SPICE_INTERFACE_PLAYBACK_CHAN;

    settings.fmt        = AUD_FMT_S16;

    settings.endianness = AUDIO_HOST_ENDIANNESS;



    audio_pcm_init_info (&hw->info, &settings);

    hw->samples = LINE_OUT_SAMPLES;

    out->active = 0;



    out->sin.base.sif = &playback_sif.base;

    qemu_spice_add_interface (&out->sin.base);

#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    spice_server_set_playback_rate(&out->sin, settings.freq);

#endif

    return 0;

}

static int line_out_init (HWVoiceOut *hw, struct audsettings *as)
static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)

{

    SpiceVoiceOut *out = container_of (VAR_0, SpiceVoiceOut, VAR_0);

    struct audsettings VAR_2;



#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    VAR_2.freq       = spice_server_get_best_playback_rate(NULL);

#else

    VAR_2.freq       = SPICE_INTERFACE_PLAYBACK_FREQ;

#endif

    VAR_2.nchannels  = SPICE_INTERFACE_PLAYBACK_CHAN;

    VAR_2.fmt        = AUD_FMT_S16;

    VAR_2.endianness = AUDIO_HOST_ENDIANNESS;



    audio_pcm_init_info (&VAR_0->info, &VAR_2);

    VAR_0->samples = LINE_OUT_SAMPLES;

    out->active = 0;



    out->sin.base.sif = &playback_sif.base;

    qemu_spice_add_interface (&out->sin.base);

#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3

    spice_server_set_playback_rate(&out->sin, VAR_2.freq);

#endif

    return 0;

}

static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)
{ SpiceVoiceOut *out = container_of (VAR_0, SpiceVoiceOut, VAR_0); struct audsettings VAR_2; #if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
VAR_2.freq       = spice_server_get_best_playback_rate(NULL); #else
VAR_2.freq       = SPICE_INTERFACE_PLAYBACK_FREQ; #endif
VAR_2.nchannels  = SPICE_INTERFACE_PLAYBACK_CHAN; VAR_2.fmt        = AUD_FMT_S16; VAR_2.endianness = AUDIO_HOST_ENDIANNESS; audio_pcm_init_info (&VAR_0->info, &VAR_2); VAR_0->samples = LINE_OUT_SAMPLES; out->active = 0; out->sin.base.sif = &playback_sif.base; qemu_spice_add_interface (&out->sin.base); #if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
spice_server_set_playback_rate(&out->sin, VAR_2.freq); #endif
return 0; }