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

int snd_pcm_sw_params_set_xrun_mode ( snd_pcm_t *pcm  ATTRIBUTE_UNUSED,
snd_pcm_sw_params_t params,
snd_pcm_xrun_t  val 
)

(DEPRECATED) Set xrun mode inside a software configuration container

Parameters:
pcmPCM handle
paramsSoftware configuration container
valXrun mode
Returns:
0 otherwise a negative error code

Definition at line 5389 of file pcm.c.

References SND_PCM_XRUN_NONE, and SND_PCM_XRUN_STOP.

{
      assert(pcm && params);
      switch (val) {
      case SND_PCM_XRUN_STOP:
            params->stop_threshold = pcm->buffer_size;
            break;
      case SND_PCM_XRUN_NONE:
            params->stop_threshold = pcm->boundary;
            break;
      default:
            SNDMSG("invalid xrun mode value %d\n", val);
            return -EINVAL;
      }
      return 0;
}

Generated by  Doxygen 1.6.0   Back to index