+ +
2da5fe7 OpenAVX v0.2.0 - High-performance open-standard IP audio and video transport suite
saifmukhtar · 2026-11-24
main
| 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 | #include <spa/param/param.h> |
| 11 | #include <spa/param/audio/raw.h> |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | /** |
| 18 | * \addtogroup spa_param |
| 19 | * \{ |
| 20 | */ |
| 21 | |
| 22 | /** Extra DSD audio flags */ |
| 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 | */ |
| 42 | struct 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 | }; |
| 50 | |
| 51 | #define SPA_AUDIO_INFO_DSD_INIT(...) ((struct spa_audio_info_dsd) { __VA_ARGS__ }) |
| 52 | |
| 53 | /** |
| 54 | * \} |
| 55 | */ |
| 56 | |
| 57 | #ifdef __cplusplus |
| 58 | } /* extern "C" */ |
| 59 | #endif |
| 60 | |
| 61 | #endif /* SPA_AUDIO_DSD_H */ |