Skip to content

Commit 4489923

Browse files
committed
pcm: extend doc for snd_pcm_hw_params_get_sbits()
Try to explain more the output value and its relation between format and sample bits defined by the format. Link: larsimmisch/pyalsaaudio#146 Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 13057b7 commit 4489923

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/pcm/pcm.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3904,11 +3904,16 @@ int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
39043904
/**
39053905
* \brief Get sample resolution info from a configuration space
39063906
* \param params Configuration space
3907-
* \return signification bits in sample otherwise a negative error code if the info is not available
3907+
* \return sample resolution (in bits) otherwise a negative error code if the info is not available
39083908
*
3909-
* Significant bits are related to usable sample bits (width) not the
3910-
* physical sample bits (width). For non-linear formats, this value may have
3911-
* a special meaning which may be defined in future.
3909+
* For linear formats, this function returns sample resolution -
3910+
* used bits starting from the first usable significant bit defined by
3911+
* the format (e.g. bit 31 for S32_LE format or bit 23 for S24_LE format -
3912+
* starting from bit zero). Application may use full sample bit range defined
3913+
* by the format, but additional bits (outside this sample resolution) are
3914+
* stripped (not processed).
3915+
*
3916+
* For non-linear formats, this value may have a special meaning which may be defined in future.
39123917
*
39133918
* This function should only be called when the configuration space
39143919
* contains a single configuration. Call #snd_pcm_hw_params to choose

0 commit comments

Comments
 (0)