3 # Copyright (C) 2015-2019 Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
5 # This work is licensed under the terms of the GNU GPL, version 2 or later.
6 # See the COPYING file in the top-level directory.
9 # @AudiodevPerDirectionOptions:
11 # General audio backend options that are used for both playback and
14 # @fixed-settings: use fixed settings for host input/output. When off,
15 # frequency, channels and format must not be
16 # specified (default true)
18 # @frequency: frequency to use when using fixed settings
21 # @channels: number of channels when using fixed settings (default 2)
23 # @voices: number of voices to use (default 1)
25 # @format: sample format to use when using fixed settings
28 # @buffer-length: the buffer length in microseconds
32 { 'struct': 'AudiodevPerDirectionOptions',
34 '*fixed-settings': 'bool',
35 '*frequency': 'uint32',
36 '*channels': 'uint32',
38 '*format': 'AudioFormat',
39 '*buffer-length': 'uint32' } }
42 # @AudiodevGenericOptions:
44 # Generic driver-specific options.
46 # @in: options of the capture stream
48 # @out: options of the playback stream
52 { 'struct': 'AudiodevGenericOptions',
54 '*in': 'AudiodevPerDirectionOptions',
55 '*out': 'AudiodevPerDirectionOptions' } }
58 # @AudiodevAlsaPerDirectionOptions:
60 # Options of the ALSA backend that are used for both playback and
63 # @dev: the name of the ALSA device to use (default 'default')
65 # @period-length: the period length in microseconds
67 # @try-poll: attempt to use poll mode, falling back to non-polling
68 # access on failure (default true)
72 { 'struct': 'AudiodevAlsaPerDirectionOptions',
73 'base': 'AudiodevPerDirectionOptions',
76 '*period-length': 'uint32',
77 '*try-poll': 'bool' } }
80 # @AudiodevAlsaOptions:
82 # Options of the ALSA audio backend.
84 # @in: options of the capture stream
86 # @out: options of the playback stream
88 # @threshold: set the threshold (in microseconds) when playback starts
92 { 'struct': 'AudiodevAlsaOptions',
94 '*in': 'AudiodevAlsaPerDirectionOptions',
95 '*out': 'AudiodevAlsaPerDirectionOptions',
96 '*threshold': 'uint32' } }
99 # @AudiodevCoreaudioPerDirectionOptions:
101 # Options of the Core Audio backend that are used for both playback and
104 # @buffer-count: number of buffers
108 { 'struct': 'AudiodevCoreaudioPerDirectionOptions',
109 'base': 'AudiodevPerDirectionOptions',
111 '*buffer-count': 'uint32' } }
114 # @AudiodevCoreaudioOptions:
116 # Options of the coreaudio audio backend.
118 # @in: options of the capture stream
120 # @out: options of the playback stream
124 { 'struct': 'AudiodevCoreaudioOptions',
126 '*in': 'AudiodevCoreaudioPerDirectionOptions',
127 '*out': 'AudiodevCoreaudioPerDirectionOptions' } }
130 # @AudiodevDsoundOptions:
132 # Options of the DirectSound audio backend.
134 # @in: options of the capture stream
136 # @out: options of the playback stream
138 # @latency: add extra latency to playback in microseconds
143 { 'struct': 'AudiodevDsoundOptions',
145 '*in': 'AudiodevPerDirectionOptions',
146 '*out': 'AudiodevPerDirectionOptions',
147 '*latency': 'uint32' } }
150 # @AudiodevOssPerDirectionOptions:
152 # Options of the OSS backend that are used for both playback and
155 # @dev: file name of the OSS device (default '/dev/dsp')
157 # @buffer-count: number of buffers
159 # @try-poll: attempt to use poll mode, falling back to non-polling
160 # access on failure (default true)
164 { 'struct': 'AudiodevOssPerDirectionOptions',
165 'base': 'AudiodevPerDirectionOptions',
168 '*buffer-count': 'uint32',
169 '*try-poll': 'bool' } }
172 # @AudiodevOssOptions:
174 # Options of the OSS audio backend.
176 # @in: options of the capture stream
178 # @out: options of the playback stream
180 # @try-mmap: try using memory-mapped access, falling back to
181 # non-memory-mapped access on failure (default true)
183 # @exclusive: open device in exclusive mode (vmix won't work)
186 # @dsp-policy: set the timing policy of the device (between 0 and 10,
187 # where smaller number means smaller latency but higher
188 # CPU usage) or -1 to use fragment mode (option ignored
189 # on some platforms) (default 5)
193 { 'struct': 'AudiodevOssOptions',
195 '*in': 'AudiodevOssPerDirectionOptions',
196 '*out': 'AudiodevOssPerDirectionOptions',
198 '*exclusive': 'bool',
199 '*dsp-policy': 'uint32' } }
202 # @AudiodevPaPerDirectionOptions:
204 # Options of the Pulseaudio backend that are used for both playback and
207 # @name: name of the sink/source to use
209 # @latency: latency you want PulseAudio to achieve in microseconds
214 { 'struct': 'AudiodevPaPerDirectionOptions',
215 'base': 'AudiodevPerDirectionOptions',
218 '*latency': 'uint32' } }
221 # @AudiodevPaOptions:
223 # Options of the PulseAudio audio backend.
225 # @in: options of the capture stream
227 # @out: options of the playback stream
229 # @server: PulseAudio server address (default: let PulseAudio choose)
233 { 'struct': 'AudiodevPaOptions',
235 '*in': 'AudiodevPaPerDirectionOptions',
236 '*out': 'AudiodevPaPerDirectionOptions',
240 # @AudiodevWavOptions:
242 # Options of the wav audio backend.
244 # @in: options of the capture stream
246 # @out: options of the playback stream
248 # @path: name of the wav file to record (default 'qemu.wav')
252 { 'struct': 'AudiodevWavOptions',
254 '*in': 'AudiodevPerDirectionOptions',
255 '*out': 'AudiodevPerDirectionOptions',
262 # An enumeration of possible audio formats.
266 { 'enum': 'AudioFormat',
267 'data': [ 'u8', 's8', 'u16', 's16', 'u32', 's32' ] }
272 # An enumeration of possible audio backend drivers.
276 { 'enum': 'AudiodevDriver',
277 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'oss', 'pa', 'sdl',
283 # Options of an audio backend.
285 # @id: identifier of the backend
287 # @driver: the backend driver to use
289 # @timer-period: timer period (in microseconds, 0: use lowest possible)
293 { 'union': 'Audiodev',
296 'driver': 'AudiodevDriver',
297 '*timer-period': 'uint32' },
298 'discriminator': 'driver',
300 'none': 'AudiodevGenericOptions',
301 'alsa': 'AudiodevAlsaOptions',
302 'coreaudio': 'AudiodevCoreaudioOptions',
303 'dsound': 'AudiodevDsoundOptions',
304 'oss': 'AudiodevOssOptions',
305 'pa': 'AudiodevPaOptions',
306 'sdl': 'AudiodevGenericOptions',
307 'spice': 'AudiodevGenericOptions',
308 'wav': 'AudiodevWavOptions' } }