snd_pcm_format_set_silence(9)
π NAME π
snd_pcm_format_set_silence β bestie, this is the one that sets the silence data on the buffer π
β¨
okay so real talk, the manual name is snd_pcm_format_set_silence(9) β that's the kernel API manual, and yes it's giving "quiet kid in the back of the class who's actually a genius" π«Ά
β¨ SYNOPSIS β¨
int snd_pcm_format_set_silence (snd_pcm_format_t format , void *data ,
unsigned int samples );
like, that's the whole vibe. no cap π₯
π¦ ARGUMENTS π¦
formatβ the PCM format π this is the glow-up blueprint, the whole personality of the data we're about to silence-ify.dataβ the buffer pointer π this is the bestie we're writing into, the actual memory spot getting the treatment.samplesβ the number of samples to set silence πΈ like how many lil slots are getting the silent treatment. iconic.
π DESCRIPTION π
Sets the silence data on the buffer for the given samples.
that's it, that's the whole plot π it takes your buffer, it takes your format, it takes a sample count, and it drops the silence data right on in there for however many samples you asked for. main character energy, zero drama, just quiet. π§
β RETURN β
- Zero if successful π slay, we ate, no crumbs.
- a negative error code on failure π ok so if it's negative something went sideways and you should lowkey check yourself before you wreck yourself.
π SEE ALSO π
Kernel file: ./sound/core/pcm_misc.c π
and the whole friend group, fr fr:
snd_pcm_format_signed(9)snd_pcm_format_unsigned(9)snd_pcm_format_linear(9)snd_pcm_format_little_endian(9)snd_pcm_format_big_endian(9)snd_pcm_format_width(9)snd_pcm_format_physical_width(9)snd_pcm_format_size(9)snd_pcm_format_silence_64(9)snd_pcm_hw_limit_rates(9)snd_pcm_rate_to_rate_bit(9)snd_pcm_rate_bit_to_rate(9)snd_pcm_rate_mask_intersect(9)
mwah π this page lives in ./sound/core and it's stamped October 2026 β go forth and silence those buffers bestie, you got this π«Άπβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms