Constructor
PwgAudioBlocknew
since: 0.1
Declaration [src]
PwgAudioBlock*
pwg_audio_block_new (
PwgAudioFormat* format,
GBytes* data,
unsigned int n_frames,
uint64_t sequence,
double peak
)
Description [src]
Creates an immutable audio block with owned sample data. The block never exposes PipeWire realtime buffer ownership to language bindings.
Stability: Unstable
Available since: 0.1
Parameters
format-
Type:
PwgAudioFormatAudio format for this block.
The data is owned by the caller of the function. data-
Type:
GBytesCopied interleaved audio sample bytes.
The data is owned by the caller of the function. n_frames-
Type:
unsigned intNumber of interleaved frames in
data. sequence-
Type:
uint64_tMonotonic stream-local block sequence number.
peak-
Type:
doubleAbsolute sample peak in this block.
Return value
Type: PwgAudioBlock
A new audio block object.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |