snd_pcm_format_set_silence(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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:


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