From 5b9db5b8889498581a9d719400b1279a3babb444 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 15:57:09 -0800 Subject: Added const specifier to params functions Funtions changed are: - pcm_params_get_mask - pcm_params_get_min - pcm_params_get_max --- include/tinyalsa/pcm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h index 3d9dfaa..1f02e9d 100644 --- a/include/tinyalsa/pcm.h +++ b/include/tinyalsa/pcm.h @@ -223,11 +223,11 @@ struct pcm_params *pcm_params_get(unsigned int card, unsigned int device, void pcm_params_free(struct pcm_params *pcm_params); -struct pcm_mask *pcm_params_get_mask(struct pcm_params *pcm_params, enum pcm_param param); +const struct pcm_mask *pcm_params_get_mask(const struct pcm_params *pcm_params, enum pcm_param param); -unsigned int pcm_params_get_min(struct pcm_params *pcm_params, enum pcm_param param); +unsigned int pcm_params_get_min(const struct pcm_params *pcm_params, enum pcm_param param); -unsigned int pcm_params_get_max(struct pcm_params *pcm_params, enum pcm_param param); +unsigned int pcm_params_get_max(const struct pcm_params *pcm_params, enum pcm_param param); struct pcm; -- cgit v1.2.3 From ba285cfbf416af5fbda1040e3c3ce74165e3e11c Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 16:06:29 -0800 Subject: Added const specifier in pcm_open The const specifier was added to the struct pcm_config argument. --- include/tinyalsa/pcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h index 1f02e9d..c2c67bb 100644 --- a/include/tinyalsa/pcm.h +++ b/include/tinyalsa/pcm.h @@ -234,7 +234,7 @@ struct pcm; struct pcm *pcm_open(unsigned int card, unsigned int device, unsigned int flags, - struct pcm_config *config); + const struct pcm_config *config); int pcm_close(struct pcm *pcm); -- cgit v1.2.3 From 15d58481e7633281e4d13fdabd12e1cec2605752 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 17:46:29 -0800 Subject: added const specifier in function, pcm_is_ready --- include/tinyalsa/pcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h index c2c67bb..caa4d1f 100644 --- a/include/tinyalsa/pcm.h +++ b/include/tinyalsa/pcm.h @@ -238,7 +238,7 @@ struct pcm *pcm_open(unsigned int card, int pcm_close(struct pcm *pcm); -int pcm_is_ready(struct pcm *pcm); +int pcm_is_ready(const struct pcm *pcm); int pcm_get_file_descriptor(struct pcm *pcm); -- cgit v1.2.3 From 147d7adec6ff293be328d6da2eb0d8d2419e9b34 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 17:50:31 -0800 Subject: Added const specifier in several functions pcm_get_file_descriptor pcm_get_error pcm_get_buffer_size pcm_frames_to_bytes pcm_bytes_to_frames pcm_get_subdevice --- include/tinyalsa/pcm.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h index caa4d1f..a6c95ce 100644 --- a/include/tinyalsa/pcm.h +++ b/include/tinyalsa/pcm.h @@ -240,21 +240,21 @@ int pcm_close(struct pcm *pcm); int pcm_is_ready(const struct pcm *pcm); -int pcm_get_file_descriptor(struct pcm *pcm); +int pcm_get_file_descriptor(const struct pcm *pcm); -const char *pcm_get_error(struct pcm *pcm); +const char *pcm_get_error(const struct pcm *pcm); unsigned int pcm_format_to_bits(enum pcm_format format); -unsigned int pcm_get_buffer_size(struct pcm *pcm); +unsigned int pcm_get_buffer_size(const struct pcm *pcm); -unsigned int pcm_frames_to_bytes(struct pcm *pcm, unsigned int frames); +unsigned int pcm_frames_to_bytes(const struct pcm *pcm, unsigned int frames); -unsigned int pcm_bytes_to_frames(struct pcm *pcm, unsigned int bytes); +unsigned int pcm_bytes_to_frames(const struct pcm *pcm, unsigned int bytes); int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail, struct timespec *tstamp); -unsigned int pcm_get_subdevice(struct pcm *pcm); +unsigned int pcm_get_subdevice(const struct pcm *pcm); int pcm_write(struct pcm *pcm, const void *data, unsigned int count); -- cgit v1.2.3