Logo Search packages:      
Sourcecode: alsa-lib version File versions  Download package

int snd_pcm_sw_params_set_silence_size ( snd_pcm_t *pcm  ATTRIBUTE_UNUSED,
snd_pcm_sw_params_t params,
snd_pcm_uframes_t  val 

Set silence size inside a software configuration container.

pcmPCM handle
paramsSoftware configuration container
valSilence size in frames (0 for disabled)
0 otherwise a negative error code

A portion of playback buffer is overwritten with silence when playback underrun is nearer than silence threshold (see snd_pcm_sw_params_set_silence_threshold)

The special case is when silence size value is equal or greater than boundary. The unused portion of the ring buffer (initial written samples are untouched) is filled with silence at start. Later, only just processed sample area is filled with silence. Note: silence_threshold must be set to zero.

Definition at line 5742 of file pcm.c.

      assert(pcm && params);
      if (CHECK_SANITY(val < pcm->boundary && val > pcm->buffer_size)) {
            SNDMSG("invalid silence_size %ld (boundary %ld, buffer_size %ld)",
                   val, pcm->boundary, pcm->buffer_size);
            return -EINVAL;
      params->silence_size = val;
      return 0;

Generated by  Doxygen 1.6.0   Back to index