spiceaudio.c (6ceb1b51f05f9e1892d082960ed602dca7b6696e) spiceaudio.c (85bc58520c0e43660cbbe51b9eb5022a0baafe9f)
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

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

125 struct audsettings settings;
126
127#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
128 settings.freq = spice_server_get_best_playback_rate(NULL);
129#else
130 settings.freq = SPICE_INTERFACE_PLAYBACK_FREQ;
131#endif
132 settings.nchannels = SPICE_INTERFACE_PLAYBACK_CHAN;
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

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

125 struct audsettings settings;
126
127#if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= 3
128 settings.freq = spice_server_get_best_playback_rate(NULL);
129#else
130 settings.freq = SPICE_INTERFACE_PLAYBACK_FREQ;
131#endif
132 settings.nchannels = SPICE_INTERFACE_PLAYBACK_CHAN;
133 settings.fmt = AUD_FMT_S16;
133 settings.fmt = AUDIO_FORMAT_S16;
134 settings.endianness = AUDIO_HOST_ENDIANNESS;
135
136 audio_pcm_init_info (&hw->info, &settings);
137 hw->samples = LINE_OUT_SAMPLES;
138 out->active = 0;
139
140 out->sin.base.sif = &playback_sif.base;
141 qemu_spice_add_interface (&out->sin.base);

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

253 struct audsettings settings;
254
255#if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >= 3
256 settings.freq = spice_server_get_best_record_rate(NULL);
257#else
258 settings.freq = SPICE_INTERFACE_RECORD_FREQ;
259#endif
260 settings.nchannels = SPICE_INTERFACE_RECORD_CHAN;
134 settings.endianness = AUDIO_HOST_ENDIANNESS;
135
136 audio_pcm_init_info (&hw->info, &settings);
137 hw->samples = LINE_OUT_SAMPLES;
138 out->active = 0;
139
140 out->sin.base.sif = &playback_sif.base;
141 qemu_spice_add_interface (&out->sin.base);

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

253 struct audsettings settings;
254
255#if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >= 3
256 settings.freq = spice_server_get_best_record_rate(NULL);
257#else
258 settings.freq = SPICE_INTERFACE_RECORD_FREQ;
259#endif
260 settings.nchannels = SPICE_INTERFACE_RECORD_CHAN;
261 settings.fmt = AUD_FMT_S16;
261 settings.fmt = AUDIO_FORMAT_S16;
262 settings.endianness = AUDIO_HOST_ENDIANNESS;
263
264 audio_pcm_init_info (&hw->info, &settings);
265 hw->samples = LINE_IN_SAMPLES;
266 in->active = 0;
267
268 in->sin.base.sif = &record_sif.base;
269 qemu_spice_add_interface (&in->sin.base);

--- 150 unchanged lines hidden ---
262 settings.endianness = AUDIO_HOST_ENDIANNESS;
263
264 audio_pcm_init_info (&hw->info, &settings);
265 hw->samples = LINE_IN_SAMPLES;
266 in->active = 0;
267
268 in->sin.base.sif = &record_sif.base;
269 qemu_spice_add_interface (&in->sin.base);

--- 150 unchanged lines hidden ---