]> code.delx.au - pulseaudio/blob - src/pulse/def.h
Implement "early requests" mode.
[pulseaudio] / src / pulse / def.h
1 #ifndef foodefhfoo
2 #define foodefhfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as
12 published by the Free Software Foundation; either version 2.1 of the
13 License, or (at your option) any later version.
14
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with PulseAudio; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 USA.
24 ***/
25
26 #include <inttypes.h>
27 #include <sys/time.h>
28 #include <time.h>
29
30 #include <pulse/cdecl.h>
31 #include <pulse/sample.h>
32
33 /** \file
34 * Global definitions */
35
36 PA_C_DECL_BEGIN
37
38 /** The state of a connection context */
39 typedef enum pa_context_state {
40 PA_CONTEXT_UNCONNECTED, /**< The context hasn't been connected yet */
41 PA_CONTEXT_CONNECTING, /**< A connection is being established */
42 PA_CONTEXT_AUTHORIZING, /**< The client is authorizing itself to the daemon */
43 PA_CONTEXT_SETTING_NAME, /**< The client is passing its application name to the daemon */
44 PA_CONTEXT_READY, /**< The connection is established, the context is ready to execute operations */
45 PA_CONTEXT_FAILED, /**< The connection failed or was disconnected */
46 PA_CONTEXT_TERMINATED /**< The connection was terminated cleanly */
47 } pa_context_state_t;
48
49 /** Return non-zero if the passed state is one of the connected states */
50 static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
51 return
52 x == PA_CONTEXT_CONNECTING ||
53 x == PA_CONTEXT_AUTHORIZING ||
54 x == PA_CONTEXT_SETTING_NAME ||
55 x == PA_CONTEXT_READY;
56 }
57
58 /** The state of a stream */
59 typedef enum pa_stream_state {
60 PA_STREAM_UNCONNECTED, /**< The stream is not yet connected to any sink or source */
61 PA_STREAM_CREATING, /**< The stream is being created */
62 PA_STREAM_READY, /**< The stream is established, you may pass audio data to it now */
63 PA_STREAM_FAILED, /**< An error occured that made the stream invalid */
64 PA_STREAM_TERMINATED /**< The stream has been terminated cleanly */
65 } pa_stream_state_t;
66
67 /** Return non-zero if the passed state is one of the connected states */
68 static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
69 return
70 x == PA_STREAM_CREATING ||
71 x == PA_STREAM_READY;
72 }
73
74 /** The state of an operation */
75 typedef enum pa_operation_state {
76 PA_OPERATION_RUNNING, /**< The operation is still running */
77 PA_OPERATION_DONE, /**< The operation has been completed */
78 PA_OPERATION_CANCELED /**< The operation has been canceled */
79 } pa_operation_state_t;
80
81 /** An invalid index */
82 #define PA_INVALID_INDEX ((uint32_t) -1)
83
84 /** Some special flags for contexts. */
85 typedef enum pa_context_flags {
86 PA_CONTEXT_NOAUTOSPAWN = 1 /**< Disabled autospawning of the PulseAudio daemon if required */
87 } pa_context_flags_t;
88
89 /** The direction of a pa_stream object */
90 typedef enum pa_stream_direction {
91 PA_STREAM_NODIRECTION, /**< Invalid direction */
92 PA_STREAM_PLAYBACK, /**< Playback stream */
93 PA_STREAM_RECORD, /**< Record stream */
94 PA_STREAM_UPLOAD /**< Sample upload stream */
95 } pa_stream_direction_t;
96
97 /** Some special flags for stream connections. */
98 typedef enum pa_stream_flags {
99
100 PA_STREAM_START_CORKED = 0x0001U,
101 /**< Create the stream corked, requiring an explicit
102 * pa_stream_cork() call to uncork it. */
103
104 PA_STREAM_INTERPOLATE_TIMING = 0x0002U,
105 /**< Interpolate the latency for this stream. When enabled,
106 * pa_stream_get_latency() and pa_stream_get_time() will try to
107 * estimate the current record/playback time based on the local
108 * time that passed since the last timing info update. Using this
109 * option has the advantage of not requiring a whole roundtrip
110 * when the current playback/recording time is needed. Consider
111 * using this option when requesting latency information
112 * frequently. This is especially useful on long latency network
113 * connections. It makes a lot of sense to combine this option
114 * with PA_STREAM_AUTO_TIMING_UPDATE. */
115
116 PA_STREAM_NOT_MONOTONIC = 0x0004U,
117 /**< Don't force the time to increase monotonically. If this
118 * option is enabled, pa_stream_get_time() will not necessarily
119 * return always monotonically increasing time values on each
120 * call. This may confuse applications which cannot deal with time
121 * going 'backwards', but has the advantage that bad transport
122 * latency estimations that caused the time to to jump ahead can
123 * be corrected quickly, without the need to wait. (Please note
124 * that this flag was named PA_STREAM_NOT_MONOTONOUS in releases
125 * prior to 0.9.11. The old name is still defined too, for
126 * compatibility reasons. */
127
128 PA_STREAM_AUTO_TIMING_UPDATE = 0x0008U,
129 /**< If set timing update requests are issued periodically
130 * automatically. Combined with PA_STREAM_INTERPOLATE_TIMING you
131 * will be able to query the current time and latency with
132 * pa_stream_get_time() and pa_stream_get_latency() at all times
133 * without a packet round trip.*/
134
135 PA_STREAM_NO_REMAP_CHANNELS = 0x0010U,
136 /**< Don't remap channels by their name, instead map them simply
137 * by their index. Implies PA_STREAM_NO_REMIX_CHANNELS. Only
138 * supported when the server is at least PA 0.9.8. It is ignored
139 * on older servers.\since 0.9.8 */
140
141 PA_STREAM_NO_REMIX_CHANNELS = 0x0020U,
142 /**< When remapping channels by name, don't upmix or downmix them
143 * to related channels. Copy them into matching channels of the
144 * device 1:1. Only supported when the server is at least PA
145 * 0.9.8. It is ignored on older servers. \since 0.9.8 */
146
147 PA_STREAM_FIX_FORMAT = 0x0040U,
148 /**< Use the sample format of the sink/device this stream is being
149 * connected to, and possibly ignore the format the sample spec
150 * contains -- but you still have to pass a valid value in it as a
151 * hint to PulseAudio what would suit your stream best. If this is
152 * used you should query the used sample format after creating the
153 * stream by using pa_stream_get_sample_spec(). Also, if you
154 * specified manual buffer metrics it is recommended to update
155 * them with pa_stream_set_buffer_attr() to compensate for the
156 * changed frame sizes. Only supported when the server is at least
157 * PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
158
159 PA_STREAM_FIX_RATE = 0x0080U,
160 /**< Use the sample rate of the sink, and possibly ignore the rate
161 * the sample spec contains. Usage similar to
162 * PA_STREAM_FIX_FORMAT.Only supported when the server is at least
163 * PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
164
165 PA_STREAM_FIX_CHANNELS = 0x0100,
166 /**< Use the number of channels and the channel map of the sink,
167 * and possibly ignore the number of channels and the map the
168 * sample spec and the passed channel map contains. Usage similar
169 * to PA_STREAM_FIX_FORMAT. Only supported when the server is at
170 * least PA 0.9.8. It is ignored on older servers. \since 0.9.8 */
171
172 PA_STREAM_DONT_MOVE = 0x0200U,
173 /**< Don't allow moving of this stream to another
174 * sink/device. Useful if you use any of the PA_STREAM_FIX_ flags
175 * and want to make sure that resampling never takes place --
176 * which might happen if the stream is moved to another
177 * sink/source whith a different sample spec/channel map. Only
178 * supported when the server is at least PA 0.9.8. It is ignored
179 * on older servers. \since 0.9.8 */
180
181 PA_STREAM_VARIABLE_RATE = 0x0400U,
182 /**< Allow dynamic changing of the sampling rate during playback
183 * with pa_stream_update_sample_rate(). Only supported when the
184 * server is at least PA 0.9.8. It is ignored on older
185 * servers. \since 0.9.8 */
186
187 PA_STREAM_PEAK_DETECT = 0x0800U,
188 /**< Find peaks instead of resampling. \since 0.9.11 */
189
190 PA_STREAM_START_MUTED = 0x1000U,
191 /**< Create in muted state. \since 0.9.11 */
192
193 PA_STREAM_ADJUST_LATENCY = 0x2000U,
194 /**< Try to adjust the latency of the sink/source based on the
195 * requested buffer metrics and adjust buffer metrics
196 * accordingly. Also see pa_buffer_attr. This option may not be
197 * specified at the same time as PA_STREAM_EARLY_REQUESTS. \since
198 * 0.9.11 */
199
200 PA_STREAM_EARLY_REQUESTS = 0x4000U
201 /**< Enable compatibility mode for legacy clients that rely on a
202 * "classic" hardware device fragment-style playback model. If
203 * this option is set, the minreq value of the buffer metrics gets
204 * a new meaning: instead of just specifying that no requests
205 * asking for less new data than this value will be made to the
206 * client it will also guarantee that requests are generated as
207 * early as this limit is reached. This flag should only be set in
208 * very few situations where compatiblity with a fragment-based
209 * playback model needs to be kept and the client applications
210 * cannot deal with data requests that are delayed to the latest
211 * moment possible. (Usually these are programs that use usleep()
212 * or a similar call in their playback loops instead of sleeping
213 * on the device itself.) Also see pa_buffer_attr. This option may
214 * not be specified at the same time as
215 * PA_STREAM_ADJUST_LATENCY. \since 0.9.12 */
216
217 } pa_stream_flags_t;
218
219 /** \cond fulldocs */
220
221 /** English is an evil language */
222 #define PA_STREAM_NOT_MONOTONOUS PA_STREAM_NOT_MONOTONIC
223
224 /** \endcond */
225
226 /** Playback and record buffer metrics */
227 typedef struct pa_buffer_attr {
228 uint32_t maxlength; /**< Maximum length of the
229 * buffer. Setting this to (uint32_t) -1 will
230 * initialize this to the maximum value
231 * supported by server, which is
232 * recommended. */
233 uint32_t tlength; /**< Playback only: target length of the
234 * buffer. The server tries to assure
235 * that at least tlength bytes are always
236 * available in the per-stream
237 * server-side playback buffer. It is
238 * recommended to set this to (uint32_t)
239 * -1, which will initialize this to a
240 * value that is deemed sensible by the
241 * server. However, this value will
242 * default to something like 2s, i.e. for
243 * applications that have specific
244 * latency requirements this value should
245 * be set to the maximum latency that the
246 * application can deal with. When
247 * PA_STREAM_ADJUST_LATENCY is not set
248 * this value will influence only the
249 * per-stream playback buffer size. When
250 * PA_STREAM_ADJUST_LATENCY is set the
251 * overall latency of the sink plus the
252 * playback buffer size is configured to
253 * this value. Set
254 * PA_STREAM_ADJUST_LATENCY if you are
255 * interested in adjusting the overall
256 * latency. Don't set it if you are
257 * interested in configuring the
258 * server-sider per-stream playback
259 * buffer size. */
260 uint32_t prebuf; /**< Playback only: pre-buffering. The
261 * server does not start with playback
262 * before at least prebug bytes are
263 * available in the buffer. It is
264 * recommended to set this to (uint32_t)
265 * -1, which will initialize this to the
266 * same value as tlength, whatever that
267 * may be. Initialize to 0 to enable
268 * manual start/stop control of the
269 * stream. This means that playback will
270 * not stop on underrun and playback will
271 * not start automatically. Instead
272 * pa_stream_corked() needs to be called
273 * explicitly. If you set this value to 0
274 * you should also set
275 * PA_STREAM_START_CORKED. */
276 uint32_t minreq; /**< Playback only: minimum request. The
277 * server does not request less than
278 * minreq bytes from the client, instead
279 * waits until the buffer is free enough
280 * to request more bytes at once. It is
281 * recommended to set this to (uint32_t)
282 * -1, which will initialize this to a
283 * value that is deemed sensible by the
284 * server. This should be set to a value
285 * that gives PulseAudio enough time to
286 * move the data from the per-stream
287 * playback buffer into the hardware
288 * playback buffer. */
289 uint32_t fragsize; /**< Recording only: fragment size. The
290 * server sends data in blocks of
291 * fragsize bytes size. Large values
292 * deminish interactivity with other
293 * operations on the connection context
294 * but decrease control overhead. It is
295 * recommended to set this to (uint32_t)
296 * -1, which will initialize this to a
297 * value that is deemed sensible by the
298 * server. However, this value will
299 * default to something like 2s, i.e. for
300 * applications that have specific
301 * latency requirements this value should
302 * be set to the maximum latency that the
303 * application can deal with. If
304 * PA_STREAM_ADJUST_LATENCY is set the
305 * overall source latency will be
306 * adjusted according to this value. If
307 * it is not set the source latency is
308 * left unmodified. */
309 } pa_buffer_attr;
310
311 /** Error values as used by pa_context_errno(). Use pa_strerror() to convert these values to human readable strings */
312 enum {
313 PA_OK = 0, /**< No error */
314 PA_ERR_ACCESS, /**< Access failure */
315 PA_ERR_COMMAND, /**< Unknown command */
316 PA_ERR_INVALID, /**< Invalid argument */
317 PA_ERR_EXIST, /**< Entity exists */
318 PA_ERR_NOENTITY, /**< No such entity */
319 PA_ERR_CONNECTIONREFUSED, /**< Connection refused */
320 PA_ERR_PROTOCOL, /**< Protocol error */
321 PA_ERR_TIMEOUT, /**< Timeout */
322 PA_ERR_AUTHKEY, /**< No authorization key */
323 PA_ERR_INTERNAL, /**< Internal error */
324 PA_ERR_CONNECTIONTERMINATED, /**< Connection terminated */
325 PA_ERR_KILLED, /**< Entity killed */
326 PA_ERR_INVALIDSERVER, /**< Invalid server */
327 PA_ERR_MODINITFAILED, /**< Module initialization failed */
328 PA_ERR_BADSTATE, /**< Bad state */
329 PA_ERR_NODATA, /**< No data */
330 PA_ERR_VERSION, /**< Incompatible protocol version */
331 PA_ERR_TOOLARGE, /**< Data too large */
332 PA_ERR_NOTSUPPORTED, /**< Operation not supported \since 0.9.5 */
333 PA_ERR_UNKNOWN, /**< The error code was unknown to the client */
334 PA_ERR_NOEXTENSION, /**< Extension does not exist. \since 0.9.12 */
335 PA_ERR_MAX /**< Not really an error but the first invalid error code */
336 };
337
338 /** Subscription event mask, as used by pa_context_subscribe() */
339 typedef enum pa_subscription_mask {
340 PA_SUBSCRIPTION_MASK_NULL = 0, /**< No events */
341 PA_SUBSCRIPTION_MASK_SINK = 1, /**< Sink events */
342 PA_SUBSCRIPTION_MASK_SOURCE = 2, /**< Source events */
343 PA_SUBSCRIPTION_MASK_SINK_INPUT = 4, /**< Sink input events */
344 PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 8, /**< Source output events */
345 PA_SUBSCRIPTION_MASK_MODULE = 16, /**< Module events */
346 PA_SUBSCRIPTION_MASK_CLIENT = 32, /**< Client events */
347 PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 64, /**< Sample cache events */
348 PA_SUBSCRIPTION_MASK_SERVER = 128, /**< Other global server changes. */
349 PA_SUBSCRIPTION_MASK_AUTOLOAD = 256, /**< Autoload table events. */
350 PA_SUBSCRIPTION_MASK_ALL = 511 /**< Catch all events */
351 } pa_subscription_mask_t;
352
353 /** Subscription event types, as used by pa_context_subscribe() */
354 typedef enum pa_subscription_event_type {
355 PA_SUBSCRIPTION_EVENT_SINK = 0, /**< Event type: Sink */
356 PA_SUBSCRIPTION_EVENT_SOURCE = 1, /**< Event type: Source */
357 PA_SUBSCRIPTION_EVENT_SINK_INPUT = 2, /**< Event type: Sink input */
358 PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 3, /**< Event type: Source output */
359 PA_SUBSCRIPTION_EVENT_MODULE = 4, /**< Event type: Module */
360 PA_SUBSCRIPTION_EVENT_CLIENT = 5, /**< Event type: Client */
361 PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 6, /**< Event type: Sample cache item */
362 PA_SUBSCRIPTION_EVENT_SERVER = 7, /**< Event type: Global server change, only occuring with PA_SUBSCRIPTION_EVENT_CHANGE. */
363 PA_SUBSCRIPTION_EVENT_AUTOLOAD = 8, /**< Event type: Autoload table changes. */
364 PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 15, /**< A mask to extract the event type from an event value */
365
366 PA_SUBSCRIPTION_EVENT_NEW = 0, /**< A new object was created */
367 PA_SUBSCRIPTION_EVENT_CHANGE = 16, /**< A property of the object was modified */
368 PA_SUBSCRIPTION_EVENT_REMOVE = 32, /**< An object was removed */
369 PA_SUBSCRIPTION_EVENT_TYPE_MASK = 16+32 /**< A mask to extract the event operation from an event value */
370 } pa_subscription_event_type_t;
371
372 /** Return one if an event type t matches an event mask bitfield */
373 #define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
374
375 /** A structure for all kinds of timing information of a stream. See
376 * pa_stream_update_timing_info() and pa_stream_get_timing_info(). The
377 * total output latency a sample that is written with
378 * pa_stream_write() takes to be played may be estimated by
379 * sink_usec+buffer_usec+transport_usec. (where buffer_usec is defined
380 * as pa_bytes_to_usec(write_index-read_index)) The output buffer
381 * which buffer_usec relates to may be manipulated freely (with
382 * pa_stream_write()'s seek argument, pa_stream_flush() and friends),
383 * the buffers sink_usec and source_usec relate to are first-in
384 * first-out (FIFO) buffers which cannot be flushed or manipulated in
385 * any way. The total input latency a sample that is recorded takes to
386 * be delivered to the application is:
387 * source_usec+buffer_usec+transport_usec-sink_usec. (Take care of
388 * sign issues!) When connected to a monitor source sink_usec contains
389 * the latency of the owning sink. The two latency estimations
390 * described here are implemented in pa_stream_get_latency(). Please
391 * note that this structure can be extended as part of evolutionary
392 * API updates at any time in any new release.*/
393 typedef struct pa_timing_info {
394 struct timeval timestamp; /**< The time when this timing info structure was current */
395 int synchronized_clocks; /**< Non-zero if the local and the
396 * remote machine have synchronized
397 * clocks. If synchronized clocks are
398 * detected transport_usec becomes much
399 * more reliable. However, the code that
400 * detects synchronized clocks is very
401 * limited und unreliable itself. */
402
403 pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. For playback streams and record streams connected to a monitor source. */
404 pa_usec_t source_usec; /**< Time in usecs a sample takes from being recorded to being delivered to the application. Only for record streams. */
405 pa_usec_t transport_usec; /**< Estimated time in usecs a sample takes to be transferred to/from the daemon. For both playback and record streams. */
406
407 int playing; /**< Non-zero when the stream is
408 * currently not underrun and data is
409 * being passed on to the device. Only
410 * for playback streams. This field does
411 * not say whether the data is actually
412 * already being played. To determine
413 * this check whether since_underrun
414 * (converted to usec) is larger than
415 * sink_usec.*/
416
417 int write_index_corrupt; /**< Non-zero if write_index is not
418 * up-to-date because a local write
419 * command that corrupted it has been
420 * issued in the time since this latency
421 * info was current . Only write
422 * commands with SEEK_RELATIVE_ON_READ
423 * and SEEK_RELATIVE_END can corrupt
424 * write_index. */
425 int64_t write_index; /**< Current write index into the
426 * playback buffer in bytes. Think twice before
427 * using this for seeking purposes: it
428 * might be out of date a the time you
429 * want to use it. Consider using
430 * PA_SEEK_RELATIVE instead. */
431
432 int read_index_corrupt; /**< Non-zero if read_index is not
433 * up-to-date because a local pause or
434 * flush request that corrupted it has
435 * been issued in the time since this
436 * latency info was current. */
437
438 int64_t read_index; /**< Current read index into the
439 * playback buffer in bytes. Think twice before
440 * using this for seeking purposes: it
441 * might be out of date a the time you
442 * want to use it. Consider using
443 * PA_SEEK_RELATIVE_ON_READ
444 * instead. */
445
446 pa_usec_t configured_sink_usec; /**< The configured latency for
447 * the sink. \since 0.9.11 */
448 pa_usec_t configured_source_usec; /**< The configured latency for
449 * the source. \since 0.9.11 */
450
451 int64_t since_underrun; /**< Bytes that were handed to the sink
452 since the last underrun happened, or
453 since playback started again after
454 the last underrun. playing will tell
455 you which case it is. \since
456 0.9.11 */
457
458 } pa_timing_info;
459
460 /** A structure for the spawn api. This may be used to integrate auto
461 * spawned daemons into your application. For more information see
462 * pa_context_connect(). When spawning a new child process the
463 * waitpid() is used on the child's PID. The spawn routine will not
464 * block or ignore SIGCHLD signals, since this cannot be done in a
465 * thread compatible way. You might have to do this in
466 * prefork/postfork. */
467 typedef struct pa_spawn_api {
468 void (*prefork)(void); /**< Is called just before the fork in the parent process. May be NULL. */
469 void (*postfork)(void); /**< Is called immediately after the fork in the parent process. May be NULL.*/
470 void (*atfork)(void); /**< Is called immediately after the
471 * fork in the child process. May be
472 * NULL. It is not safe to close all
473 * file descriptors in this function
474 * unconditionally, since a UNIX socket
475 * (created using socketpair()) is
476 * passed to the new process. */
477 } pa_spawn_api;
478
479 /** Seek type for pa_stream_write(). */
480 typedef enum pa_seek_mode {
481 PA_SEEK_RELATIVE = 0, /**< Seek relatively to the write index */
482 PA_SEEK_ABSOLUTE = 1, /**< Seek relatively to the start of the buffer queue */
483 PA_SEEK_RELATIVE_ON_READ = 2, /**< Seek relatively to the read index. */
484 PA_SEEK_RELATIVE_END = 3 /**< Seek relatively to the current end of the buffer queue. */
485 } pa_seek_mode_t;
486
487 /** Special sink flags. */
488 typedef enum pa_sink_flags {
489 PA_SINK_HW_VOLUME_CTRL = 1, /**< Supports hardware volume control */
490 PA_SINK_LATENCY = 2, /**< Supports latency querying */
491 PA_SINK_HARDWARE = 4, /**< Is a hardware sink of some kind, in contrast to "virtual"/software sinks \since 0.9.3 */
492 PA_SINK_NETWORK = 8, /**< Is a networked sink of some kind. \since 0.9.7 */
493 PA_SINK_HW_MUTE_CTRL = 16, /**< Supports hardware mute control \since 0.9.11 */
494 PA_SINK_DECIBEL_VOLUME = 32 /**< Volume can be translated to dB with pa_sw_volume_to_dB() \since 0.9.11 */
495 } pa_sink_flags_t;
496
497 /** Special source flags. */
498 typedef enum pa_source_flags {
499 PA_SOURCE_HW_VOLUME_CTRL = 1, /**< Supports hardware volume control */
500 PA_SOURCE_LATENCY = 2, /**< Supports latency querying */
501 PA_SOURCE_HARDWARE = 4, /**< Is a hardware source of some kind, in contrast to "virtual"/software source \since 0.9.3 */
502 PA_SOURCE_NETWORK = 8, /**< Is a networked sink of some kind. \since 0.9.7 */
503 PA_SOURCE_HW_MUTE_CTRL = 16, /**< Supports hardware mute control \since 0.9.11 */
504 PA_SOURCE_DECIBEL_VOLUME = 32 /**< Volume can be translated to dB with pa_sw_volume_to_dB() \since 0.9.11 */
505 } pa_source_flags_t;
506
507 /** A generic free() like callback prototype */
508 typedef void (*pa_free_cb_t)(void *p);
509
510 PA_C_DECL_END
511
512 #endif