mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
buffer: add EMPTY chunk flag
Add an EMPTY chunk flag to mark a piece of memory as 'empty'. For audio this means silence. Use the empty flag to avoid mixing 0 samples. Set the empty flag in output buffers on audioconvert.
This commit is contained in:
parent
71f3c759f4
commit
f2dee23085
4 changed files with 18 additions and 5 deletions
|
|
@ -63,6 +63,9 @@ struct spa_chunk {
|
|||
int32_t stride; /**< stride of valid data */
|
||||
#define SPA_CHUNK_FLAG_NONE 0
|
||||
#define SPA_CHUNK_FLAG_CORRUPTED (1u<<0) /**< chunk data is corrupted in some way */
|
||||
#define SPA_CHUNK_FLAG_EMPTY (1u<<1) /**< chunk data is empty with media specific
|
||||
* neutral data such as silence or black. This
|
||||
* could be used to optimize processing. */
|
||||
int32_t flags; /**< chunk flags */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue