mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
def: Add a new enum to allow differntiation between sinks and sources.
This is for bits of code or API where the concepts and constructs are extensibly the same for sinks and sources. To avoid duplication we can simply define our structure/API and then use this enum to differentiate the two.
This commit is contained in:
parent
a6ad2d860a
commit
cc117be62b
1 changed files with 11 additions and 0 deletions
|
|
@ -124,6 +124,17 @@ typedef enum pa_context_flags {
|
||||||
#define PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL
|
#define PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL
|
||||||
/** \endcond */
|
/** \endcond */
|
||||||
|
|
||||||
|
/** The type of device we are dealing with */
|
||||||
|
typedef enum pa_device_type {
|
||||||
|
PA_DEVICE_TYPE_SINK, /**< Playback device */
|
||||||
|
PA_DEVICE_TYPE_SOURCE /**< Recording device */
|
||||||
|
} pa_device_type_t;
|
||||||
|
|
||||||
|
/** \cond fulldocs */
|
||||||
|
#define PA_DEVICE_TYPE_SINK PA_DEVICE_TYPE_SINK
|
||||||
|
#define PA_DEVICE_TYPE_SOURCE PA_DEVICE_TYPE_SOURCE
|
||||||
|
/** \endcond */
|
||||||
|
|
||||||
/** The direction of a pa_stream object */
|
/** The direction of a pa_stream object */
|
||||||
typedef enum pa_stream_direction {
|
typedef enum pa_stream_direction {
|
||||||
PA_STREAM_NODIRECTION, /**< Invalid direction */
|
PA_STREAM_NODIRECTION, /**< Invalid direction */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue