diff options
author | Taylor Holberton <taylorcholberton@gmail.com> | 2017-04-10 11:45:44 -0700 |
---|---|---|
committer | Taylor Holberton <taylorcholberton@gmail.com> | 2017-04-10 11:45:44 -0700 |
commit | 08bb59091c1d262e2a314c61166bfec3f9a31ea0 (patch) | |
tree | 1dbed75d0c777b1bb6941fd8372111880e665b04 /src | |
parent | ea06b977fabd88a3e22c89021ae8020baeebb427 (diff) |
added pcm_get_config()
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -215,6 +215,20 @@ unsigned int pcm_get_channels(const struct pcm *pcm) return pcm->config.channels; } +/** Gets the PCM configuration. + * @param pcm A PCM handle. + * @return The PCM configuration. + * This function only returns NULL if + * @p pcm is NULL. + * @ingroup libtinyalsa-pcm + * */ +const struct pcm_config * pcm_get_config(const struct pcm *pcm) +{ + if (pcm == NULL) + return NULL; + return &pcm->config; +} + /** Gets the rate of the PCM. * The rate is given in frames per second. * @param pcm A PCM handle. |