aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 17:53:08 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 17:53:08 -0800
commitf3d6c67db4f5eea516d2d4fcbc2edd75f33d48a4 (patch)
tree9a7ff13c949f1f78f7db2b087574058aca038984 /include
parentf42051ce4de1a3b2655c2cab778338fe66ee9580 (diff)
parent147d7adec6ff293be328d6da2eb0d8d2419e9b34 (diff)
Merge branch 'const-correctness' into develop
Added const specifiers to all applicable functions in the PCM API.
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/pcm.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h
index 3d9dfaa..a6c95ce 100644
--- a/include/tinyalsa/pcm.h
+++ b/include/tinyalsa/pcm.h
@@ -223,38 +223,38 @@ 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;
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);
-int pcm_is_ready(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);