aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 16:03:49 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 16:03:49 +0100
commit5f7791009790dc40f2d76be310ffeab55c242ced (patch)
tree5e26d9d5f873a76fe61c6403a69ae123b0d57ad3 /src/mixer
parent80799fa84eb4330083e4de20b87f97beea7d6ba7 (diff)
downloadmpd-5f7791009790dc40f2d76be310ffeab55c242ced.tar.gz
mpd-5f7791009790dc40f2d76be310ffeab55c242ced.tar.xz
mpd-5f7791009790dc40f2d76be310ffeab55c242ced.zip
conf: const pointers in block get functions
All config_get_block_*() functions should accept constant config_param pointers.
Diffstat (limited to '')
-rw-r--r--src/mixer/alsa_mixer.c4
-rw-r--r--src/mixer/oss_mixer.c4
-rw-r--r--src/mixer_api.c2
-rw-r--r--src/mixer_api.h5
4 files changed, 8 insertions, 7 deletions
diff --git a/src/mixer/alsa_mixer.c b/src/mixer/alsa_mixer.c
index 7dafd22cc..d0cfdd5a2 100644
--- a/src/mixer/alsa_mixer.c
+++ b/src/mixer/alsa_mixer.c
@@ -43,7 +43,7 @@ alsa_mixer_finish(struct mixer_data *data)
}
static void
-alsa_mixer_configure(struct mixer_data *data, struct config_param *param)
+alsa_mixer_configure(struct mixer_data *data, const struct config_param *param)
{
struct alsa_mixer *am = (struct alsa_mixer *)data;
const char *value;
@@ -149,7 +149,7 @@ alsa_mixer_control(struct mixer_data *data, int cmd, void *arg)
struct alsa_mixer *am = (struct alsa_mixer *)data;
switch (cmd) {
case AC_MIXER_CONFIGURE:
- alsa_mixer_configure(data, (struct config_param *)arg);
+ alsa_mixer_configure(data, (const struct config_param *)arg);
if (am->handle)
alsa_mixer_close(data);
return true;
diff --git a/src/mixer/oss_mixer.c b/src/mixer/oss_mixer.c
index 5e3b65f46..ed370483d 100644
--- a/src/mixer/oss_mixer.c
+++ b/src/mixer/oss_mixer.c
@@ -47,7 +47,7 @@ oss_mixer_finish(struct mixer_data *data)
}
static void
-oss_mixer_configure(struct mixer_data *data, struct config_param *param)
+oss_mixer_configure(struct mixer_data *data, const struct config_param *param)
{
struct oss_mixer *om = (struct oss_mixer *) data;
const char *value;
@@ -140,7 +140,7 @@ oss_mixer_control(struct mixer_data *data, int cmd, void *arg)
struct oss_mixer *om = (struct oss_mixer *) data;
switch (cmd) {
case AC_MIXER_CONFIGURE:
- oss_mixer_configure(data, (struct config_param *)arg);
+ oss_mixer_configure(data, (const struct config_param *)arg);
if (om->device_fd >= 0)
oss_mixer_close(data);
return true;
diff --git a/src/mixer_api.c b/src/mixer_api.c
index cb493aa0a..51df10d78 100644
--- a/src/mixer_api.c
+++ b/src/mixer_api.c
@@ -20,7 +20,7 @@ void mixer_finish(struct mixer *mixer)
mixer->plugin = NULL;
}
-void mixer_configure(struct mixer *mixer, struct config_param *param)
+void mixer_configure(struct mixer *mixer, const struct config_param *param)
{
assert(mixer != NULL && mixer->plugin != NULL);
mixer->plugin->configure(mixer->data, param);
diff --git a/src/mixer_api.h b/src/mixer_api.h
index 61f6c06f2..55aa7684c 100644
--- a/src/mixer_api.h
+++ b/src/mixer_api.h
@@ -28,7 +28,8 @@ struct mixer_plugin {
/**
* Setup and configure mixer
*/
- void (*configure)(struct mixer_data *data, struct config_param *param);
+ void (*configure)(struct mixer_data *data,
+ const struct config_param *param);
/**
* Open mixer device
@@ -53,7 +54,7 @@ struct mixer {
void mixer_init(struct mixer *mixer, struct mixer_plugin *plugin);
void mixer_finish(struct mixer *mixer);
-void mixer_configure(struct mixer *mixer, struct config_param *param);
+void mixer_configure(struct mixer *mixer, const struct config_param *param);
bool mixer_open(struct mixer *mixer);
bool mixer_control(struct mixer *mixer, int cmd, void *arg);
void mixer_close(struct mixer *mixer);