PulseAudio  5.0
def.h
Go to the documentation of this file.
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 
29 #include <pulse/cdecl.h>
30 #include <pulse/sample.h>
31 #include <pulse/version.h>
32 
36 PA_C_DECL_BEGIN
37 
39 typedef enum pa_context_state {
48 
50 static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
51  return
52  x == PA_CONTEXT_CONNECTING ||
55  x == PA_CONTEXT_READY;
56 }
57 
59 #define PA_CONTEXT_UNCONNECTED PA_CONTEXT_UNCONNECTED
60 #define PA_CONTEXT_CONNECTING PA_CONTEXT_CONNECTING
61 #define PA_CONTEXT_AUTHORIZING PA_CONTEXT_AUTHORIZING
62 #define PA_CONTEXT_SETTING_NAME PA_CONTEXT_SETTING_NAME
63 #define PA_CONTEXT_READY PA_CONTEXT_READY
64 #define PA_CONTEXT_FAILED PA_CONTEXT_FAILED
65 #define PA_CONTEXT_TERMINATED PA_CONTEXT_TERMINATED
66 #define PA_CONTEXT_IS_GOOD PA_CONTEXT_IS_GOOD
67 
70 typedef enum pa_stream_state {
77 
79 static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
80  return
81  x == PA_STREAM_CREATING ||
82  x == PA_STREAM_READY;
83 }
84 
86 #define PA_STREAM_UNCONNECTED PA_STREAM_UNCONNECTED
87 #define PA_STREAM_CREATING PA_STREAM_CREATING
88 #define PA_STREAM_READY PA_STREAM_READY
89 #define PA_STREAM_FAILED PA_STREAM_FAILED
90 #define PA_STREAM_TERMINATED PA_STREAM_TERMINATED
91 #define PA_STREAM_IS_GOOD PA_STREAM_IS_GOOD
92 
95 typedef enum pa_operation_state {
105 
107 #define PA_OPERATION_RUNNING PA_OPERATION_RUNNING
108 #define PA_OPERATION_DONE PA_OPERATION_DONE
109 #define PA_OPERATION_CANCELED PA_OPERATION_CANCELLED
110 #define PA_OPERATION_CANCELLED PA_OPERATION_CANCELLED
111 
114 #define PA_INVALID_INDEX ((uint32_t) -1)
115 
117 typedef enum pa_context_flags {
125 
127 /* Allow clients to check with #ifdef for those flags */
128 #define PA_CONTEXT_NOAUTOSPAWN PA_CONTEXT_NOAUTOSPAWN
129 #define PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL
130 
136 typedef enum pa_direction {
140 
142 #define PA_DIRECTION_OUTPUT PA_DIRECTION_OUTPUT
143 #define PA_DIRECTION_INPUT PA_DIRECTION_INPUT
144 
147 typedef enum pa_device_type {
151 
153 #define PA_DEVICE_TYPE_SINK PA_DEVICE_TYPE_SINK
154 #define PA_DEVICE_TYPE_SOURCE PA_DEVICE_TYPE_SOURCE
155 
158 typedef enum pa_stream_direction {
164 
166 #define PA_STREAM_NODIRECTION PA_STREAM_NODIRECTION
167 #define PA_STREAM_PLAYBACK PA_STREAM_PLAYBACK
168 #define PA_STREAM_RECORD PA_STREAM_RECORD
169 #define PA_STREAM_UPLOAD PA_STREAM_UPLOAD
170 
173 typedef enum pa_stream_flags {
174 
175  PA_STREAM_NOFLAGS = 0x0000U,
358 
361 /* English is an evil language */
362 #define PA_STREAM_NOT_MONOTONOUS PA_STREAM_NOT_MONOTONIC
363 
364 /* Allow clients to check with #ifdef for those flags */
365 #define PA_STREAM_START_CORKED PA_STREAM_START_CORKED
366 #define PA_STREAM_INTERPOLATE_TIMING PA_STREAM_INTERPOLATE_TIMING
367 #define PA_STREAM_NOT_MONOTONIC PA_STREAM_NOT_MONOTONIC
368 #define PA_STREAM_AUTO_TIMING_UPDATE PA_STREAM_AUTO_TIMING_UPDATE
369 #define PA_STREAM_NO_REMAP_CHANNELS PA_STREAM_NO_REMAP_CHANNELS
370 #define PA_STREAM_NO_REMIX_CHANNELS PA_STREAM_NO_REMIX_CHANNELS
371 #define PA_STREAM_FIX_FORMAT PA_STREAM_FIX_FORMAT
372 #define PA_STREAM_FIX_RATE PA_STREAM_FIX_RATE
373 #define PA_STREAM_FIX_CHANNELS PA_STREAM_FIX_CHANNELS
374 #define PA_STREAM_DONT_MOVE PA_STREAM_DONT_MOVE
375 #define PA_STREAM_VARIABLE_RATE PA_STREAM_VARIABLE_RATE
376 #define PA_STREAM_PEAK_DETECT PA_STREAM_PEAK_DETECT
377 #define PA_STREAM_START_MUTED PA_STREAM_START_MUTED
378 #define PA_STREAM_ADJUST_LATENCY PA_STREAM_ADJUST_LATENCY
379 #define PA_STREAM_EARLY_REQUESTS PA_STREAM_EARLY_REQUESTS
380 #define PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND
381 #define PA_STREAM_START_UNMUTED PA_STREAM_START_UNMUTED
382 #define PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND
383 #define PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME
384 #define PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH
385 
389 typedef struct pa_buffer_attr {
390  uint32_t maxlength;
401  uint32_t tlength;
419  uint32_t prebuf;
430  uint32_t minreq;
440  uint32_t fragsize;
455 
457 typedef enum pa_error_code {
458  PA_OK = 0,
487 
489 #define PA_OK PA_OK
490 #define PA_ERR_ACCESS PA_ERR_ACCESS
491 #define PA_ERR_COMMAND PA_ERR_COMMAND
492 #define PA_ERR_INVALID PA_ERR_INVALID
493 #define PA_ERR_EXIST PA_ERR_EXIST
494 #define PA_ERR_NOENTITY PA_ERR_NOENTITY
495 #define PA_ERR_CONNECTIONREFUSED PA_ERR_CONNECTIONREFUSED
496 #define PA_ERR_PROTOCOL PA_ERR_PROTOCOL
497 #define PA_ERR_TIMEOUT PA_ERR_TIMEOUT
498 #define PA_ERR_AUTHKEY PA_ERR_AUTHKEY
499 #define PA_ERR_INTERNAL PA_ERR_INTERNAL
500 #define PA_ERR_CONNECTIONTERMINATED PA_ERR_CONNECTIONTERMINATED
501 #define PA_ERR_KILLED PA_ERR_KILLED
502 #define PA_ERR_INVALIDSERVER PA_ERR_INVALIDSERVER
503 #define PA_ERR_MODINITFAILED PA_ERR_MODINITFAILED
504 #define PA_ERR_BADSTATE PA_ERR_BADSTATE
505 #define PA_ERR_NODATA PA_ERR_NODATA
506 #define PA_ERR_VERSION PA_ERR_VERSION
507 #define PA_ERR_TOOLARGE PA_ERR_TOOLARGE
508 #define PA_ERR_NOTSUPPORTED PA_ERR_NOTSUPPORTED
509 #define PA_ERR_UNKNOWN PA_ERR_UNKNOWN
510 #define PA_ERR_NOEXTENSION PA_ERR_NOEXTENSION
511 #define PA_ERR_OBSOLETE PA_ERR_OBSOLETE
512 #define PA_ERR_NOTIMPLEMENTED PA_ERR_NOTIMPLEMENTED
513 #define PA_ERR_FORKED PA_ERR_FORKED
514 #define PA_ERR_MAX PA_ERR_MAX
515 
518 typedef enum pa_subscription_mask {
547  PA_SUBSCRIPTION_MASK_AUTOLOAD = 0x0100U,
557 
585  PA_SUBSCRIPTION_EVENT_AUTOLOAD = 0x0008U,
608 
610 #define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
611 
613 #define PA_SUBSCRIPTION_MASK_NULL PA_SUBSCRIPTION_MASK_NULL
614 #define PA_SUBSCRIPTION_MASK_SINK PA_SUBSCRIPTION_MASK_SINK
615 #define PA_SUBSCRIPTION_MASK_SOURCE PA_SUBSCRIPTION_MASK_SOURCE
616 #define PA_SUBSCRIPTION_MASK_SINK_INPUT PA_SUBSCRIPTION_MASK_SINK_INPUT
617 #define PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT
618 #define PA_SUBSCRIPTION_MASK_MODULE PA_SUBSCRIPTION_MASK_MODULE
619 #define PA_SUBSCRIPTION_MASK_CLIENT PA_SUBSCRIPTION_MASK_CLIENT
620 #define PA_SUBSCRIPTION_MASK_SAMPLE_CACHE PA_SUBSCRIPTION_MASK_SAMPLE_CACHE
621 #define PA_SUBSCRIPTION_MASK_SERVER PA_SUBSCRIPTION_MASK_SERVER
622 #define PA_SUBSCRIPTION_MASK_AUTOLOAD PA_SUBSCRIPTION_MASK_AUTOLOAD
623 #define PA_SUBSCRIPTION_MASK_CARD PA_SUBSCRIPTION_MASK_CARD
624 #define PA_SUBSCRIPTION_MASK_ALL PA_SUBSCRIPTION_MASK_ALL
625 #define PA_SUBSCRIPTION_EVENT_SINK PA_SUBSCRIPTION_EVENT_SINK
626 #define PA_SUBSCRIPTION_EVENT_SOURCE PA_SUBSCRIPTION_EVENT_SOURCE
627 #define PA_SUBSCRIPTION_EVENT_SINK_INPUT PA_SUBSCRIPTION_EVENT_SINK_INPUT
628 #define PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT
629 #define PA_SUBSCRIPTION_EVENT_MODULE PA_SUBSCRIPTION_EVENT_MODULE
630 #define PA_SUBSCRIPTION_EVENT_CLIENT PA_SUBSCRIPTION_EVENT_CLIENT
631 #define PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE
632 #define PA_SUBSCRIPTION_EVENT_SERVER PA_SUBSCRIPTION_EVENT_SERVER
633 #define PA_SUBSCRIPTION_EVENT_AUTOLOAD PA_SUBSCRIPTION_EVENT_AUTOLOAD
634 #define PA_SUBSCRIPTION_EVENT_CARD PA_SUBSCRIPTION_EVENT_CARD
635 #define PA_SUBSCRIPTION_EVENT_FACILITY_MASK PA_SUBSCRIPTION_EVENT_FACILITY_MASK
636 #define PA_SUBSCRIPTION_EVENT_NEW PA_SUBSCRIPTION_EVENT_NEW
637 #define PA_SUBSCRIPTION_EVENT_CHANGE PA_SUBSCRIPTION_EVENT_CHANGE
638 #define PA_SUBSCRIPTION_EVENT_REMOVE PA_SUBSCRIPTION_EVENT_REMOVE
639 #define PA_SUBSCRIPTION_EVENT_TYPE_MASK PA_SUBSCRIPTION_EVENT_TYPE_MASK
640 
660 typedef struct pa_timing_info {
661  struct timeval timestamp;
684  int playing;
698  int64_t write_index;
709  int64_t read_index;
721  int64_t since_underrun;
728 
736 typedef struct pa_spawn_api {
737  void (*prefork)(void);
741  void (*postfork)(void);
745  void (*atfork)(void);
751 } pa_spawn_api;
752 
754 typedef enum pa_seek_mode {
767 
769 #define PA_SEEK_RELATIVE PA_SEEK_RELATIVE
770 #define PA_SEEK_ABSOLUTE PA_SEEK_ABSOLUTE
771 #define PA_SEEK_RELATIVE_ON_READ PA_SEEK_RELATIVE_ON_READ
772 #define PA_SEEK_RELATIVE_END PA_SEEK_RELATIVE_END
773 
776 typedef enum pa_sink_flags {
777  PA_SINK_NOFLAGS = 0x0000U,
784  PA_SINK_LATENCY = 0x0002U,
787  PA_SINK_HARDWARE = 0x0004U,
791  PA_SINK_NETWORK = 0x0008U,
816 #ifdef __INCLUDED_FROM_PULSE_AUDIO
817 
818  /* PRIVATE: Server-side values -- do not try to use these at client-side.
819  * The server will filter out these flags anyway, so you should never see
820  * these flags in sinks. */
821 
822  PA_SINK_SHARE_VOLUME_WITH_MASTER = 0x1000000U,
826  PA_SINK_DEFERRED_VOLUME = 0x2000000U,
829 #endif
830 
832 
834 #define PA_SINK_HW_VOLUME_CTRL PA_SINK_HW_VOLUME_CTRL
835 #define PA_SINK_LATENCY PA_SINK_LATENCY
836 #define PA_SINK_HARDWARE PA_SINK_HARDWARE
837 #define PA_SINK_NETWORK PA_SINK_NETWORK
838 #define PA_SINK_HW_MUTE_CTRL PA_SINK_HW_MUTE_CTRL
839 #define PA_SINK_DECIBEL_VOLUME PA_SINK_DECIBEL_VOLUME
840 #define PA_SINK_FLAT_VOLUME PA_SINK_FLAT_VOLUME
841 #define PA_SINK_DYNAMIC_LATENCY PA_SINK_DYNAMIC_LATENCY
842 #define PA_SINK_SET_FORMATS PA_SINK_SET_FORMATS
843 #ifdef __INCLUDED_FROM_PULSE_AUDIO
844 #define PA_SINK_CLIENT_FLAGS_MASK 0xFFFFFF
845 #endif
846 
850 typedef enum pa_sink_state { /* enum serialized in u8 */
864  /* PRIVATE: Server-side values -- DO NOT USE THIS ON THE CLIENT
865  * SIDE! These values are *not* considered part of the official PA
866  * API/ABI. If you use them your application might break when PA
867  * is upgraded. Also, please note that these values are not useful
868  * on the client side anyway. */
869 
870  PA_SINK_INIT = -2,
873  PA_SINK_UNLINKED = -3
878 
880 static inline int PA_SINK_IS_OPENED(pa_sink_state_t x) {
881  return x == PA_SINK_RUNNING || x == PA_SINK_IDLE;
882 }
883 
885 static inline int PA_SINK_IS_RUNNING(pa_sink_state_t x) {
886  return x == PA_SINK_RUNNING;
887 }
888 
890 #define PA_SINK_INVALID_STATE PA_SINK_INVALID_STATE
891 #define PA_SINK_RUNNING PA_SINK_RUNNING
892 #define PA_SINK_IDLE PA_SINK_IDLE
893 #define PA_SINK_SUSPENDED PA_SINK_SUSPENDED
894 #define PA_SINK_INIT PA_SINK_INIT
895 #define PA_SINK_UNLINKED PA_SINK_UNLINKED
896 #define PA_SINK_IS_OPENED PA_SINK_IS_OPENED
897 
900 typedef enum pa_source_flags {
901  PA_SOURCE_NOFLAGS = 0x0000U,
908  PA_SOURCE_LATENCY = 0x0002U,
915  PA_SOURCE_NETWORK = 0x0008U,
935 #ifdef __INCLUDED_FROM_PULSE_AUDIO
936 
937  /* PRIVATE: Server-side values -- do not try to use these at client-side.
938  * The server will filter out these flags anyway, so you should never see
939  * these flags in sources. */
940 
941  PA_SOURCE_SHARE_VOLUME_WITH_MASTER = 0x1000000U,
945  PA_SOURCE_DEFERRED_VOLUME = 0x2000000U,
947 #endif
949 
951 #define PA_SOURCE_HW_VOLUME_CTRL PA_SOURCE_HW_VOLUME_CTRL
952 #define PA_SOURCE_LATENCY PA_SOURCE_LATENCY
953 #define PA_SOURCE_HARDWARE PA_SOURCE_HARDWARE
954 #define PA_SOURCE_NETWORK PA_SOURCE_NETWORK
955 #define PA_SOURCE_HW_MUTE_CTRL PA_SOURCE_HW_MUTE_CTRL
956 #define PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME
957 #define PA_SOURCE_DYNAMIC_LATENCY PA_SOURCE_DYNAMIC_LATENCY
958 #define PA_SOURCE_FLAT_VOLUME PA_SOURCE_FLAT_VOLUME
959 #ifdef __INCLUDED_FROM_PULSE_AUDIO
960 #define PA_SOURCE_CLIENT_FLAGS_MASK 0xFFFFFF
961 #endif
962 
966 typedef enum pa_source_state {
980  /* PRIVATE: Server-side values -- DO NOT USE THIS ON THE CLIENT
981  * SIDE! These values are *not* considered part of the official PA
982  * API/ABI. If you use them your application might break when PA
983  * is upgraded. Also, please note that these values are not useful
984  * on the client side anyway. */
985 
986  PA_SOURCE_INIT = -2,
989  PA_SOURCE_UNLINKED = -3
994 
996 static inline int PA_SOURCE_IS_OPENED(pa_source_state_t x) {
997  return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE;
998 }
999 
1001 static inline int PA_SOURCE_IS_RUNNING(pa_source_state_t x) {
1002  return x == PA_SOURCE_RUNNING;
1003 }
1004 
1006 #define PA_SOURCE_INVALID_STATE PA_SOURCE_INVALID_STATE
1007 #define PA_SOURCE_RUNNING PA_SOURCE_RUNNING
1008 #define PA_SOURCE_IDLE PA_SOURCE_IDLE
1009 #define PA_SOURCE_SUSPENDED PA_SOURCE_SUSPENDED
1010 #define PA_SOURCE_INIT PA_SOURCE_INIT
1011 #define PA_SOURCE_UNLINKED PA_SOURCE_UNLINKED
1012 #define PA_SOURCE_IS_OPENED PA_SOURCE_IS_OPENED
1013 
1016 typedef void (*pa_free_cb_t)(void *p);
1017 
1021 #define PA_STREAM_EVENT_REQUEST_CORK "request-cork"
1022 
1026 #define PA_STREAM_EVENT_REQUEST_UNCORK "request-uncork"
1027 
1033 #define PA_STREAM_EVENT_FORMAT_LOST "format-lost"
1034 
1035 #ifndef __INCLUDED_FROM_PULSE_AUDIO
1036 
1038 typedef enum pa_port_available {
1043 
1045 #define PA_PORT_AVAILABLE_UNKNOWN PA_PORT_AVAILABLE_UNKNOWN
1046 #define PA_PORT_AVAILABLE_NO PA_PORT_AVAILABLE_NO
1047 #define PA_PORT_AVAILABLE_YES PA_PORT_AVAILABLE_YES
1048 
1050 #endif
1051 
1052 PA_C_DECL_END
1053 
1054 #endif
Extension does not exist.
Definition: def.h:479
Other global server changes.
Definition: def.h:543
Disabled autospawning of the PulseAudio daemon if required.
Definition: def.h:120
Flag to pass when no specific options are needed (used to avoid casting)
Definition: def.h:175
pa_context_flags
Some special flags for contexts.
Definition: def.h:117
Sink events.
Definition: def.h:522
Output direction.
Definition: def.h:137
enum pa_context_flags pa_context_flags_t
Some special flags for contexts.
Unknown command.
Definition: def.h:460
enum pa_sink_state pa_sink_state_t
Sink state.
Invalid direction.
Definition: def.h:159
void(* prefork)(void)
Is called just before the fork in the parent process.
Definition: def.h:737
enum pa_operation_state pa_operation_state_t
The state of an operation.
Bad state.
Definition: def.h:473
Record stream.
Definition: def.h:161
A property of the object was modified.
Definition: def.h:598
Connection refused.
Definition: def.h:464
Supports latency querying.
Definition: def.h:784
Interpolate the latency for this stream.
Definition: def.h:182
enum pa_stream_state pa_stream_state_t
The state of a stream.
Is a hardware source of some kind, in contrast to "virtual"/software source.
Definition: def.h:911
void(* pa_free_cb_t)(void *p)
A generic free() like callback prototype.
Definition: def.h:1016
An object was removed.
Definition: def.h:601
This port is available, likely because the jack is plugged in.
Definition: def.h:1041
No events.
Definition: def.h:519
The connection failed or was disconnected.
Definition: def.h:45
Operation not supported.
Definition: def.h:477
Don't fail if the daemon is not available when pa_context_connect() is called, instead enter PA_CONTE...
Definition: def.h:122
pa_sink_flags
Special sink flags.
Definition: def.h:776
Allow dynamic changing of the sampling rate during playback with pa_stream_update_sample_rate().
Definition: def.h:289
int synchronized_clocks
Non-zero if the local and the remote machine have synchronized clocks.
Definition: def.h:664
No authorization key.
Definition: def.h:467
struct pa_buffer_attr pa_buffer_attr
Playback and record buffer metrics.
struct pa_spawn_api pa_spawn_api
A structure for the spawn api.
Is a networked source of some kind.
Definition: def.h:915
Event type: Global server change, only occurring with PA_SUBSCRIPTION_EVENT_CHANGE.
Definition: def.h:581
Catch all events.
Definition: def.h:554
Event type: Sink.
Definition: def.h:560
enum pa_source_flags pa_source_flags_t
Special source flags.
The stream is established, you may pass audio data to it now.
Definition: def.h:73
Card events.
Definition: def.h:551
If set timing update requests are issued periodically automatically.
Definition: def.h:206
Seek relatively to the start of the buffer queue.
Definition: def.h:758
Obsolete functionality.
Definition: def.h:480
If set this stream won't be taken into account when it is checked whether the device this stream is c...
Definition: def.h:328
Flag to pass when no specific options are needed (used to avoid casting)
Definition: def.h:901
Sample upload stream.
Definition: def.h:162
Create the stream corked, requiring an explicit pa_stream_cork() call to uncork it.
Definition: def.h:178
No error.
Definition: def.h:458
A structure for the spawn api.
Definition: def.h:736
Access failure.
Definition: def.h:459
The stream has been terminated cleanly.
Definition: def.h:75
pa_sink_state
Sink state.
Definition: def.h:850
enum pa_source_state pa_source_state_t
Source state.
struct timeval timestamp
The time when this timing info structure was current.
Definition: def.h:661
Playback stream.
Definition: def.h:160
pa_usec_t sink_usec
Time in usecs a sample takes to be played on the sink.
Definition: def.h:671
Missing implementation.
Definition: def.h:481
Is a hardware sink of some kind, in contrast to "virtual"/software sinks.
Definition: def.h:787
The stream is being created.
Definition: def.h:72
pa_usec_t configured_sink_usec
The configured latency for the sink.
Definition: def.h:715
Used to tag content that will be rendered by passthrough sinks.
Definition: def.h:352
An IO error happened.
Definition: def.h:483
enum pa_direction pa_direction_t
Direction bitfield - while we currently do not expose anything bidirectional, one should test against...
Enable compatibility mode for legacy clients that rely on a "classic" hardware device fragment-style ...
Definition: def.h:311
Input direction.
Definition: def.h:138
This port does not support jack detection.
Definition: def.h:1039
pa_stream_direction
The direction of a pa_stream object.
Definition: def.h:158
uint32_t tlength
Playback only: target length of the buffer.
Definition: def.h:401
Use the sample format of the sink/device this stream is being connected to, and possibly ignore the f...
Definition: def.h:225
int playing
Non-zero when the stream is currently not underrun and data is being passed on to the device...
Definition: def.h:684
Sample cache events.
Definition: def.h:540
Flag to pass when no specific options are needed (used to avoid casting)
Definition: def.h:118
Event type: Card.
Definition: def.h:589
pa_subscription_mask
Subscription event mask, as used by pa_context_subscribe()
Definition: def.h:518
uint64_t pa_usec_t
Type for usec specifications (unsigned).
Definition: sample.h:262
pa_direction
Direction bitfield - while we currently do not expose anything bidirectional, one should test against...
Definition: def.h:136
When suspended, actual sink access can be closed, for instance.
Definition: def.h:860
Don't remap channels by their name, instead map them simply by their index.
Definition: def.h:213
Entity killed.
Definition: def.h:470
pa_subscription_event_type
Subscription event types, as used by pa_context_subscribe()
Definition: def.h:559
Recording device.
Definition: def.h:149
A structure for all kinds of timing information of a stream.
Definition: def.h:660
The client is authorizing itself to the daemon.
Definition: def.h:42
uint32_t fragsize
Recording only: fragment size.
Definition: def.h:440
enum pa_context_state pa_context_state_t
The state of a connection context.
Use the number of channels and the channel map of the sink, and possibly ignore the number of channel...
Definition: def.h:261
Seek relatively to the read index.
Definition: def.h:761
pa_seek_mode
Seek type for pa_stream_write().
Definition: def.h:754
enum pa_stream_direction pa_stream_direction_t
The direction of a pa_stream object.
Don't force the time to increase monotonically.
Definition: def.h:194
Supports hardware mute control.
Definition: def.h:918
This port is not available, likely because the jack is not plugged in.
Definition: def.h:1040
No such entity.
Definition: def.h:463
The latency can be adjusted dynamically depending on the needs of the connected streams.
Definition: def.h:807
void(* atfork)(void)
Is called immediately after the fork in the child process.
Definition: def.h:745
Protocol error.
Definition: def.h:465
Device or resource busy.
Definition: def.h:484
Not really an error but the first invalid error code.
Definition: def.h:485
The operation has been cancelled.
Definition: def.h:100
enum pa_sink_flags pa_sink_flags_t
Special sink flags.
This sink is in flat volume mode, i.e. always the maximum of the volume of all connected inputs...
Definition: def.h:803
If the sink/source this stream is connected to is suspended during the creation of this stream...
Definition: def.h:339
Client events.
Definition: def.h:537
Playback and record buffer metrics.
Definition: def.h:389
enum pa_seek_mode pa_seek_mode_t
Seek type for pa_stream_write().
int64_t read_index
Current read index into the playback buffer in bytes.
Definition: def.h:709
enum pa_error_code pa_error_code_t
Error values as used by pa_context_errno().
Sink input events.
Definition: def.h:528
Event type: Source output.
Definition: def.h:569
Seek relatively to the write index.
Definition: def.h:755
int64_t since_underrun
Bytes that were handed to the sink since the last underrun happened, or since playback started again ...
Definition: def.h:721
Invalid server.
Definition: def.h:471
This state is used when the server does not support sink state introspection.
Definition: def.h:851
Find peaks instead of resampling.
Definition: def.h:295
The operation is still running.
Definition: def.h:96
Event type: Sample cache item.
Definition: def.h:578
pa_device_type
The type of device we are dealing with.
Definition: def.h:147
Module initialization failed.
Definition: def.h:472
pa_source_state
Source state.
Definition: def.h:966
struct pa_timing_info pa_timing_info
A structure for all kinds of timing information of a stream.
The stream is not yet connected to any sink or source.
Definition: def.h:71
uint32_t prebuf
Playback only: pre-buffering.
Definition: def.h:419
Playback device.
Definition: def.h:148
Connection terminated.
Definition: def.h:469
Source output events.
Definition: def.h:531
A mask to extract the event type from an event value.
Definition: def.h:592
Module events.
Definition: def.h:534
The connection is established, the context is ready to execute operations.
Definition: def.h:44
An error occurred that made the stream invalid.
Definition: def.h:74
Try to adjust the latency of the sink/source based on the requested buffer metrics and adjust buffer ...
Definition: def.h:304
This source is in flat volume mode, i.e. always the maximum of the volume of all connected outputs...
Definition: def.h:931
When suspended, actual source access can be closed, for instance.
Definition: def.h:976
Supports hardware mute control.
Definition: def.h:794
Entity exists.
Definition: def.h:462
int64_t write_index
Current write index into the playback buffer in bytes.
Definition: def.h:698
The error code was unknown to the client.
Definition: def.h:478
pa_usec_t transport_usec
Estimated time in usecs a sample takes to be transferred to/from the daemon.
Definition: def.h:680
Supports hardware volume control.
Definition: def.h:904
Define header version.
A connection is being established.
Definition: def.h:41
pa_usec_t configured_source_usec
The configured latency for the source.
Definition: def.h:718
Event type: Source.
Definition: def.h:563
Timeout.
Definition: def.h:466
Internal error.
Definition: def.h:468
Is a networked sink of some kind.
Definition: def.h:791
Don't allow moving of this stream to another sink/device.
Definition: def.h:280
Constants and routines for sample type handling.
If a volume is passed when this stream is created, consider it relative to the sink's current volume...
Definition: def.h:345
pa_stream_state
The state of a stream.
Definition: def.h:70
Incompatible protocol version.
Definition: def.h:475
Event type: Client.
Definition: def.h:575
enum pa_subscription_mask pa_subscription_mask_t
Subscription event mask, as used by pa_context_subscribe()
A new object was created.
Definition: def.h:595
int read_index_corrupt
Non-zero if read_index is not up-to-date because a local pause or flush request that corrupted it has...
Definition: def.h:704
No data.
Definition: def.h:474
This state is used when the server does not support source state introspection.
Definition: def.h:967
A mask to extract the event operation from an event value.
Definition: def.h:604
pa_port_available
Port availability / jack detection status.
Definition: def.h:1038
Data too large.
Definition: def.h:476
Source events.
Definition: def.h:525
Running, sink is playing and used by at least one non-corked sink-input.
Definition: def.h:854
enum pa_stream_flags pa_stream_flags_t
Some special flags for stream connections.
pa_stream_flags
Some special flags for stream connections.
Definition: def.h:173
Use the sample rate of the sink, and possibly ignore the rate the sample spec contains.
Definition: def.h:246
Event type: Sink input.
Definition: def.h:566
The context hasn't been connected yet.
Definition: def.h:40
Seek relatively to the current end of the buffer queue.
Definition: def.h:764
The client is passing its application name to the daemon.
Definition: def.h:43
enum pa_subscription_event_type pa_subscription_event_type_t
Subscription event types, as used by pa_context_subscribe()
The latency can be adjusted dynamically depending on the needs of the connected streams.
Definition: def.h:927
Volume can be translated to dB with pa_sw_volume_to_dB().
Definition: def.h:798
pa_usec_t source_usec
Time in usecs a sample takes from being recorded to being delivered to the application.
Definition: def.h:676
Invalid argument.
Definition: def.h:461
When remapping channels by name, don't upmix or downmix them to related channels. ...
Definition: def.h:219
int write_index_corrupt
Non-zero if write_index is not up-to-date because a local write command that corrupted it has been is...
Definition: def.h:691
pa_operation_state
The state of an operation.
Definition: def.h:95
void(* postfork)(void)
Is called immediately after the fork in the parent process.
Definition: def.h:741
Running, source is recording and used by at least one non-corked source-output.
Definition: def.h:970
Create in muted state.
Definition: def.h:298
The sink allows setting what formats are supported by the connected hardware.
Definition: def.h:811
pa_context_state
The state of a connection context.
Definition: def.h:39
Supports latency querying.
Definition: def.h:908
When idle, the source is still recording but there is no non-corked source-output.
Definition: def.h:973
enum pa_port_available pa_port_available_t
Port availability / jack detection status.
pa_source_flags
Special source flags.
Definition: def.h:900
pa_error_code
Error values as used by pa_context_errno().
Definition: def.h:457
Create in unmuted state.
Definition: def.h:333
The caller forked without calling execve() and tried to reuse the context.
Definition: def.h:482
Volume can be translated to dB with pa_sw_volume_to_dB().
Definition: def.h:922
When idle, the sink is playing but there is no non-corked sink-input attached to it.
Definition: def.h:857
enum pa_device_type pa_device_type_t
The type of device we are dealing with.
Supports hardware volume control.
Definition: def.h:780
uint32_t minreq
Playback only: minimum request.
Definition: def.h:430
Event type: Module.
Definition: def.h:572
The connection was terminated cleanly.
Definition: def.h:46
Flag to pass when no specific options are needed (used to avoid casting)
Definition: def.h:777
uint32_t maxlength
Maximum length of the buffer in bytes.
Definition: def.h:390
The operation has completed.
Definition: def.h:98