[alsa-devel] [alsa-lib PATCH 2/4] Search-and-replace improve documentation language
--- src/pcm/pcm.c | 146 ++++++++++++++++++++++++++------------------------------- 1 files changed, 67 insertions(+), 79 deletions(-)
/**
- \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");
Raymond Yau wrote:
- 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
You cannot guarantee this for all future hardware, and not for plugins that select different hardware depending on parameters.
Regards, Clemens
participants (3)
-
Andrew Eikum
-
Clemens Ladisch
-
Raymond Yau