mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
libpulse: Add *_NOFLAGS flags with value 0 for various enums
This avoids the need for ugly casting in client implementations.
This commit is contained in:
parent
c194db71b0
commit
8f4940b17a
1 changed files with 11 additions and 0 deletions
|
|
@ -110,6 +110,8 @@ typedef enum pa_operation_state {
|
||||||
|
|
||||||
/** Some special flags for contexts. */
|
/** Some special flags for contexts. */
|
||||||
typedef enum pa_context_flags {
|
typedef enum pa_context_flags {
|
||||||
|
PA_CONTEXT_NOFLAGS = 0x0000U,
|
||||||
|
/**< Flag to pass when no specific options are needed (used to avoid casting) \since 0.9.19 */
|
||||||
PA_CONTEXT_NOAUTOSPAWN = 0x0001U,
|
PA_CONTEXT_NOAUTOSPAWN = 0x0001U,
|
||||||
/**< Disabled autospawning of the PulseAudio daemon if required */
|
/**< Disabled autospawning of the PulseAudio daemon if required */
|
||||||
PA_CONTEXT_NOFAIL = 0x0002U
|
PA_CONTEXT_NOFAIL = 0x0002U
|
||||||
|
|
@ -140,6 +142,9 @@ typedef enum pa_stream_direction {
|
||||||
/** Some special flags for stream connections. */
|
/** Some special flags for stream connections. */
|
||||||
typedef enum pa_stream_flags {
|
typedef enum pa_stream_flags {
|
||||||
|
|
||||||
|
PA_STREAM_NOFLAGS = 0x0000U,
|
||||||
|
/**< Flag to pass when no specific options are needed (used to avoid casting) \since 0.9.19 */
|
||||||
|
|
||||||
PA_STREAM_START_CORKED = 0x0001U,
|
PA_STREAM_START_CORKED = 0x0001U,
|
||||||
/**< Create the stream corked, requiring an explicit
|
/**< Create the stream corked, requiring an explicit
|
||||||
* pa_stream_cork() call to uncork it. */
|
* pa_stream_cork() call to uncork it. */
|
||||||
|
|
@ -688,6 +693,9 @@ typedef enum pa_seek_mode {
|
||||||
|
|
||||||
/** Special sink flags. */
|
/** Special sink flags. */
|
||||||
typedef enum pa_sink_flags {
|
typedef enum pa_sink_flags {
|
||||||
|
PA_SINK_NOFLAGS = 0x0000U,
|
||||||
|
/**< Flag to pass when no specific options are needed (used to avoid casting) \since 0.9.19 */
|
||||||
|
|
||||||
PA_SINK_HW_VOLUME_CTRL = 0x0001U,
|
PA_SINK_HW_VOLUME_CTRL = 0x0001U,
|
||||||
/**< Supports hardware volume control */
|
/**< Supports hardware volume control */
|
||||||
|
|
||||||
|
|
@ -775,6 +783,9 @@ static inline int PA_SINK_IS_OPENED(pa_sink_state_t x) {
|
||||||
|
|
||||||
/** Special source flags. */
|
/** Special source flags. */
|
||||||
typedef enum pa_source_flags {
|
typedef enum pa_source_flags {
|
||||||
|
PA_SOURCE_NOFLAGS = 0x0000U,
|
||||||
|
/**< Flag to pass when no specific options are needed (used to avoid casting) \since 0.9.19 */
|
||||||
|
|
||||||
PA_SOURCE_HW_VOLUME_CTRL = 0x0001U,
|
PA_SOURCE_HW_VOLUME_CTRL = 0x0001U,
|
||||||
/**< Supports hardware volume control */
|
/**< Supports hardware volume control */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue