5 Jan
2012
5 Jan
'12
8:43 a.m.
/**
- \brief Check, if hardware supports pause
- \brief Check if hardware supports pause
- \param params Configuration space
- \return Boolean value
- \retval 0 Hardware doesn't support pause
- \retval 1 Hardware supports pause
- It is not allowed to call this function when given configuration is not exactly one.
- Usually, #snd_pcm_hw_params() function chooses one configuration
- from the configuration space.
- This function should only be called when the configuration space
- contains a single configuration. Call #snd_pcm_hw_params to choose
- a single configuration from the configuration space.
*/ int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t *params)
What is the meaning of the configuration space contains a single configuration ?
since the hardware either support pause or does not support pause
it seem that only need to call snd_pcm_hw_params_any() instead of snd_pcm_hw_params() before calling snd_pcm_hw_params_can_pause()
err= snd_pcm_open(&pcm, device, stream, SND_PCM_NONBLOCK);
err= snd_pcm_hw_params_any(pcm, pars);
if (snd_pcm_hw_params_can_pause(pars)) printf("pcm device support pause\n");