PipeWire 1.2.7
Loading...
Searching...
No Matches
dsd.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2021 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_AUDIO_DSD_H
6#define SPA_AUDIO_DSD_H
7
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <spa/param/param.h>
15#include <spa/param/audio/raw.h>
16
23#define SPA_AUDIO_DSD_FLAG_NONE (0) /*< no valid flag */
24
25/* DSD bits are transferred in a buffer grouped in bytes with the bitorder
26 * defined by \a bitorder.
27 *
28 * Channels are placed in separate planes (interleave = 0) or interleaved
29 * using the interleave value. A negative interleave value means that the
30 * bytes need to be reversed in the group.
31 *
32 * Planar (interleave = 0):
33 * plane1: l1 l2 l3 l4 l5 ...
34 * plane2: r1 r2 r3 r4 r5 ...
35 *
36 * Interleaved 4:
37 * plane1: l1 l2 l3 l4 r1 r2 r3 r4 l5 l6 l7 l8 r5 r6 r7 r8 l9 ...
38 *
39 * Interleaved 2:
40 * plane1: l1 l2 r1 r2 l3 l4 r3 r4 ...
41 */
42struct spa_audio_info_dsd {
43 enum spa_param_bitorder bitorder; /*< the order of the bits */
44 uint32_t flags; /*< extra flags */
45 int32_t interleave; /*< interleave bytes */
46 uint32_t rate; /*< sample rate (in bytes per second) */
47 uint32_t channels; /*< channels */
48 uint32_t position[SPA_AUDIO_MAX_CHANNELS]; /*< channel position from enum spa_audio_channel */
49};
51#define SPA_AUDIO_INFO_DSD_INIT(...) ((struct spa_audio_info_dsd) { __VA_ARGS__ })
57#ifdef __cplusplus
58} /* extern "C" */
59#endif
60
61#endif /* SPA_AUDIO_DSD_H */
spa/param/audio/raw.h
spa_param_bitorder
Definition param.h:73
#define SPA_AUDIO_MAX_CHANNELS
Definition raw.h:29
spa/param/param.h
Definition dsd.h:48
uint32_t position[SPA_AUDIO_MAX_CHANNELS]
Definition dsd.h:54
uint32_t channels
Definition dsd.h:53
enum spa_param_bitorder bitorder
Definition dsd.h:49
uint32_t rate
Definition dsd.h:52
int32_t interleave
Definition dsd.h:51
uint32_t flags
Definition dsd.h:50