diff options
-rw-r--r-- | include/tinyalsa/asoundlib.h | 3 | ||||
-rw-r--r-- | pcm.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index 8fb7c95..d87e357 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -153,6 +153,9 @@ unsigned int pcm_params_get_min(struct pcm_params *pcm_params, unsigned int pcm_params_get_max(struct pcm_params *pcm_params, enum pcm_param param); +/* Returns the file descriptor associated with the pcm */ +int pcm_get_file_descriptor(struct pcm *pcm); + /* Returns a human readable reason for the last error */ const char *pcm_get_error(struct pcm *pcm); @@ -179,6 +179,11 @@ unsigned int pcm_get_buffer_size(struct pcm *pcm) return pcm->buffer_size; } +int pcm_get_file_descriptor(struct pcm *pcm) +{ + return pcm->fd; +} + const char* pcm_get_error(struct pcm *pcm) { return pcm->error; |