spiceaudio.c (1bd5556f6686365e76f7ff67fe67260c449e8345) spiceaudio.c (05b53636d01c1c9b650465def20b683ea1382f63)
1/*
2 * Copyright (C) 2010 Red Hat, Inc.
3 *
4 * maintained by Gerd Hoffmann <kraxel@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 or

--- 92 unchanged lines hidden (view full) ---

101 settings.fmt = AUDIO_FORMAT_S16;
102 settings.endianness = AUDIO_HOST_ENDIANNESS;
103
104 audio_pcm_init_info (&hw->info, &settings);
105 hw->samples = LINE_OUT_SAMPLES;
106 out->active = 0;
107
108 out->sin.base.sif = &playback_sif.base;
1/*
2 * Copyright (C) 2010 Red Hat, Inc.
3 *
4 * maintained by Gerd Hoffmann <kraxel@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 or

--- 92 unchanged lines hidden (view full) ---

101 settings.fmt = AUDIO_FORMAT_S16;
102 settings.endianness = AUDIO_HOST_ENDIANNESS;
103
104 audio_pcm_init_info (&hw->info, &settings);
105 hw->samples = LINE_OUT_SAMPLES;
106 out->active = 0;
107
108 out->sin.base.sif = &playback_sif.base;
109 qemu_spice_add_interface (&out->sin.base);
109 qemu_spice.add_interface(&out->sin.base);
110#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
111 spice_server_set_playback_rate(&out->sin, settings.freq);
112#endif
113 return 0;
114}
115
116static void line_out_fini (HWVoiceOut *hw)
117{

--- 92 unchanged lines hidden (view full) ---

210 settings.fmt = AUDIO_FORMAT_S16;
211 settings.endianness = AUDIO_HOST_ENDIANNESS;
212
213 audio_pcm_init_info (&hw->info, &settings);
214 hw->samples = LINE_IN_SAMPLES;
215 in->active = 0;
216
217 in->sin.base.sif = &record_sif.base;
110#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
111 spice_server_set_playback_rate(&out->sin, settings.freq);
112#endif
113 return 0;
114}
115
116static void line_out_fini (HWVoiceOut *hw)
117{

--- 92 unchanged lines hidden (view full) ---

210 settings.fmt = AUDIO_FORMAT_S16;
211 settings.endianness = AUDIO_HOST_ENDIANNESS;
212
213 audio_pcm_init_info (&hw->info, &settings);
214 hw->samples = LINE_IN_SAMPLES;
215 in->active = 0;
216
217 in->sin.base.sif = &record_sif.base;
218 qemu_spice_add_interface (&in->sin.base);
218 qemu_spice.add_interface(&in->sin.base);
219#if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >= 3
220 spice_server_set_record_rate(&in->sin, settings.freq);
221#endif
222 return 0;
223}
224
225static void line_in_fini (HWVoiceIn *hw)
226{

--- 92 unchanged lines hidden ---
219#if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >= 3
220 spice_server_set_record_rate(&in->sin, settings.freq);
221#endif
222 return 0;
223}
224
225static void line_in_fini (HWVoiceIn *hw)
226{

--- 92 unchanged lines hidden ---