conf: const pointers in block get functions
All config_get_block_*() functions should accept constant config_param pointers.
This commit is contained in:
parent
80799fa84e
commit
5f77910097
@ -43,7 +43,7 @@ static unsigned int audioOutputArraySize;
|
|||||||
unsigned int audio_output_count(void)
|
unsigned int audio_output_count(void)
|
||||||
{
|
{
|
||||||
unsigned int nr = 0;
|
unsigned int nr = 0;
|
||||||
struct config_param *param = NULL;
|
const struct config_param *param = NULL;
|
||||||
|
|
||||||
while ((param = config_get_next_param(CONF_AUDIO_OUTPUT, param)))
|
while ((param = config_get_next_param(CONF_AUDIO_OUTPUT, param)))
|
||||||
nr++;
|
nr++;
|
||||||
@ -55,7 +55,7 @@ unsigned int audio_output_count(void)
|
|||||||
/* make sure initPlayerData is called before this function!! */
|
/* make sure initPlayerData is called before this function!! */
|
||||||
void initAudioDriver(void)
|
void initAudioDriver(void)
|
||||||
{
|
{
|
||||||
struct config_param *param = NULL;
|
const struct config_param *param = NULL;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
notify_init(&audio_output_client_notify);
|
notify_init(&audio_output_client_notify);
|
||||||
@ -106,7 +106,7 @@ void getOutputAudioFormat(const struct audio_format *inAudioFormat,
|
|||||||
|
|
||||||
void initAudioConfig(void)
|
void initAudioConfig(void)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(CONF_AUDIO_OUTPUT_FORMAT);
|
const struct config_param *param = config_get_param(CONF_AUDIO_OUTPUT_FORMAT);
|
||||||
|
|
||||||
if (NULL == param || NULL == param->value)
|
if (NULL == param || NULL == param->value)
|
||||||
return;
|
return;
|
||||||
|
16
src/conf.c
16
src/conf.c
@ -350,7 +350,7 @@ void config_read_file(const char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct config_param *
|
struct config_param *
|
||||||
config_get_next_param(const char *name, struct config_param * last)
|
config_get_next_param(const char *name, const struct config_param * last)
|
||||||
{
|
{
|
||||||
struct config_entry *entry;
|
struct config_entry *entry;
|
||||||
GSList *node;
|
GSList *node;
|
||||||
@ -381,7 +381,7 @@ config_get_next_param(const char *name, struct config_param * last)
|
|||||||
const char *
|
const char *
|
||||||
config_get_string(const char *name, const char *default_value)
|
config_get_string(const char *name, const char *default_value)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(name);
|
const struct config_param *param = config_get_param(name);
|
||||||
|
|
||||||
if (param == NULL)
|
if (param == NULL)
|
||||||
return default_value;
|
return default_value;
|
||||||
@ -410,7 +410,7 @@ config_get_path(const char *name)
|
|||||||
unsigned
|
unsigned
|
||||||
config_get_positive(const char *name, unsigned default_value)
|
config_get_positive(const char *name, unsigned default_value)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(name);
|
const struct config_param *param = config_get_param(name);
|
||||||
long value;
|
long value;
|
||||||
char *endptr;
|
char *endptr;
|
||||||
|
|
||||||
@ -428,7 +428,7 @@ config_get_positive(const char *name, unsigned default_value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct block_param *
|
struct block_param *
|
||||||
getBlockParam(struct config_param * param, const char *name)
|
getBlockParam(const struct config_param * param, const char *name)
|
||||||
{
|
{
|
||||||
struct block_param *ret = NULL;
|
struct block_param *ret = NULL;
|
||||||
int i;
|
int i;
|
||||||
@ -449,7 +449,7 @@ getBlockParam(struct config_param * param, const char *name)
|
|||||||
|
|
||||||
bool config_get_bool(const char *name, bool default_value)
|
bool config_get_bool(const char *name, bool default_value)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(name);
|
const struct config_param *param = config_get_param(name);
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
if (param == NULL)
|
if (param == NULL)
|
||||||
@ -468,7 +468,7 @@ bool config_get_bool(const char *name, bool default_value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
config_get_block_string(struct config_param *param, const char *name,
|
config_get_block_string(const struct config_param *param, const char *name,
|
||||||
const char *default_value)
|
const char *default_value)
|
||||||
{
|
{
|
||||||
struct block_param *bp = getBlockParam(param, name);
|
struct block_param *bp = getBlockParam(param, name);
|
||||||
@ -480,7 +480,7 @@ config_get_block_string(struct config_param *param, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
config_get_block_unsigned(struct config_param *param, const char *name,
|
config_get_block_unsigned(const struct config_param *param, const char *name,
|
||||||
unsigned default_value)
|
unsigned default_value)
|
||||||
{
|
{
|
||||||
struct block_param *bp = getBlockParam(param, name);
|
struct block_param *bp = getBlockParam(param, name);
|
||||||
@ -501,7 +501,7 @@ config_get_block_unsigned(struct config_param *param, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
config_get_block_bool(struct config_param *param, const char *name,
|
config_get_block_bool(const struct config_param *param, const char *name,
|
||||||
bool default_value)
|
bool default_value)
|
||||||
{
|
{
|
||||||
struct block_param *bp = getBlockParam(param, name);
|
struct block_param *bp = getBlockParam(param, name);
|
||||||
|
12
src/conf.h
12
src/conf.h
@ -94,7 +94,7 @@ void config_read_file(const char *file);
|
|||||||
/* don't free the returned value
|
/* don't free the returned value
|
||||||
set _last_ to NULL to get first entry */
|
set _last_ to NULL to get first entry */
|
||||||
struct config_param *
|
struct config_param *
|
||||||
config_get_next_param(const char *name, struct config_param *last);
|
config_get_next_param(const char *name, const struct config_param *last);
|
||||||
|
|
||||||
static inline struct config_param *
|
static inline struct config_param *
|
||||||
config_get_param(const char *name)
|
config_get_param(const char *name)
|
||||||
@ -117,27 +117,27 @@ unsigned
|
|||||||
config_get_positive(const char *name, unsigned default_value);
|
config_get_positive(const char *name, unsigned default_value);
|
||||||
|
|
||||||
struct block_param *
|
struct block_param *
|
||||||
getBlockParam(struct config_param *param, const char *name);
|
getBlockParam(const struct config_param *param, const char *name);
|
||||||
|
|
||||||
bool config_get_bool(const char *name, bool default_value);
|
bool config_get_bool(const char *name, bool default_value);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
config_get_block_string(struct config_param *param, const char *name,
|
config_get_block_string(const struct config_param *param, const char *name,
|
||||||
const char *default_value);
|
const char *default_value);
|
||||||
|
|
||||||
static inline char *
|
static inline char *
|
||||||
config_dup_block_string(struct config_param *param, const char *name,
|
config_dup_block_string(const struct config_param *param, const char *name,
|
||||||
const char *default_value)
|
const char *default_value)
|
||||||
{
|
{
|
||||||
return g_strdup(config_get_block_string(param, name, default_value));
|
return g_strdup(config_get_block_string(param, name, default_value));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
config_get_block_unsigned(struct config_param *param, const char *name,
|
config_get_block_unsigned(const struct config_param *param, const char *name,
|
||||||
unsigned default_value);
|
unsigned default_value);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
config_get_block_bool(struct config_param *param, const char *name,
|
config_get_block_bool(const struct config_param *param, const char *name,
|
||||||
bool default_value);
|
bool default_value);
|
||||||
|
|
||||||
struct config_param *
|
struct config_param *
|
||||||
|
@ -128,7 +128,7 @@ static bool ipv6Supported(void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
parseListenConfigParam(G_GNUC_UNUSED unsigned int port,
|
parseListenConfigParam(G_GNUC_UNUSED unsigned int port,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
const struct sockaddr *addrp;
|
const struct sockaddr *addrp;
|
||||||
socklen_t addrlen;
|
socklen_t addrlen;
|
||||||
@ -254,7 +254,7 @@ parseListenConfigParam(G_GNUC_UNUSED unsigned int port,
|
|||||||
void listenOnPort(void)
|
void listenOnPort(void)
|
||||||
{
|
{
|
||||||
int port = config_get_positive(CONF_PORT, DEFAULT_PORT);
|
int port = config_get_positive(CONF_PORT, DEFAULT_PORT);
|
||||||
struct config_param *param =
|
const struct config_param *param =
|
||||||
config_get_next_param(CONF_BIND_TO_ADDRESS, NULL);
|
config_get_next_param(CONF_BIND_TO_ADDRESS, NULL);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -219,7 +219,7 @@ parse_log_level(const char *value, unsigned line)
|
|||||||
|
|
||||||
void log_init(bool verbose, bool use_stdout)
|
void log_init(bool verbose, bool use_stdout)
|
||||||
{
|
{
|
||||||
struct config_param *param;
|
const struct config_param *param;
|
||||||
|
|
||||||
g_get_charset(&log_charset);
|
g_get_charset(&log_charset);
|
||||||
|
|
||||||
@ -252,9 +252,8 @@ void log_init(bool verbose, bool use_stdout)
|
|||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
g_error("error parsing \"%s\" at line %i\n",
|
g_error("error parsing \"%s\" at line %i\n",
|
||||||
CONF_LOG_FILE, param->line);
|
CONF_LOG_FILE, param->line);
|
||||||
param->value = path;
|
|
||||||
|
|
||||||
log_init_file(param->value, param->line);
|
log_init_file(path, param->line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ static void openDB(Options * options, char *argv0)
|
|||||||
static void
|
static void
|
||||||
initialize_decoder_and_player(void)
|
initialize_decoder_and_player(void)
|
||||||
{
|
{
|
||||||
struct config_param *param;
|
const struct config_param *param;
|
||||||
char *test;
|
char *test;
|
||||||
size_t buffer_size;
|
size_t buffer_size;
|
||||||
float perc;
|
float perc;
|
||||||
|
@ -43,7 +43,7 @@ alsa_mixer_finish(struct mixer_data *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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;
|
struct alsa_mixer *am = (struct alsa_mixer *)data;
|
||||||
const char *value;
|
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;
|
struct alsa_mixer *am = (struct alsa_mixer *)data;
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case AC_MIXER_CONFIGURE:
|
case AC_MIXER_CONFIGURE:
|
||||||
alsa_mixer_configure(data, (struct config_param *)arg);
|
alsa_mixer_configure(data, (const struct config_param *)arg);
|
||||||
if (am->handle)
|
if (am->handle)
|
||||||
alsa_mixer_close(data);
|
alsa_mixer_close(data);
|
||||||
return true;
|
return true;
|
||||||
|
@ -47,7 +47,7 @@ oss_mixer_finish(struct mixer_data *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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;
|
struct oss_mixer *om = (struct oss_mixer *) data;
|
||||||
const char *value;
|
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;
|
struct oss_mixer *om = (struct oss_mixer *) data;
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case AC_MIXER_CONFIGURE:
|
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)
|
if (om->device_fd >= 0)
|
||||||
oss_mixer_close(data);
|
oss_mixer_close(data);
|
||||||
return true;
|
return true;
|
||||||
|
@ -20,7 +20,7 @@ void mixer_finish(struct mixer *mixer)
|
|||||||
mixer->plugin = NULL;
|
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);
|
assert(mixer != NULL && mixer->plugin != NULL);
|
||||||
mixer->plugin->configure(mixer->data, param);
|
mixer->plugin->configure(mixer->data, param);
|
||||||
|
@ -28,7 +28,8 @@ struct mixer_plugin {
|
|||||||
/**
|
/**
|
||||||
* Setup and configure mixer
|
* 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
|
* Open mixer device
|
||||||
@ -53,7 +54,7 @@ struct mixer {
|
|||||||
|
|
||||||
void mixer_init(struct mixer *mixer, struct mixer_plugin *plugin);
|
void mixer_init(struct mixer *mixer, struct mixer_plugin *plugin);
|
||||||
void mixer_finish(struct mixer *mixer);
|
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_open(struct mixer *mixer);
|
||||||
bool mixer_control(struct mixer *mixer, int cmd, void *arg);
|
bool mixer_control(struct mixer *mixer, int cmd, void *arg);
|
||||||
void mixer_close(struct mixer *mixer);
|
void mixer_close(struct mixer *mixer);
|
||||||
|
@ -108,7 +108,7 @@ alsa_data_free(struct alsa_data *ad)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
alsa_configure(struct alsa_data *ad, struct config_param *param)
|
alsa_configure(struct alsa_data *ad, const struct config_param *param)
|
||||||
{
|
{
|
||||||
ad->device = config_dup_block_string(param, "device", NULL);
|
ad->device = config_dup_block_string(param, "device", NULL);
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ alsa_configure(struct alsa_data *ad, struct config_param *param)
|
|||||||
static void *
|
static void *
|
||||||
alsa_init(G_GNUC_UNUSED struct audio_output *ao,
|
alsa_init(G_GNUC_UNUSED struct audio_output *ao,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
/* no need for pthread_once thread-safety when reading config */
|
/* no need for pthread_once thread-safety when reading config */
|
||||||
static int free_global_registered;
|
static int free_global_registered;
|
||||||
|
@ -77,7 +77,7 @@ static void audioOutputAo_error(const char *msg)
|
|||||||
static void *
|
static void *
|
||||||
audioOutputAo_initDriver(struct audio_output *ao,
|
audioOutputAo_initDriver(struct audio_output *ao,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
ao_info *ai;
|
ao_info *ai;
|
||||||
AoData *ad = newAoData();
|
AoData *ad = newAoData();
|
||||||
|
@ -161,7 +161,7 @@ static bool openFifo(FifoData *fd)
|
|||||||
|
|
||||||
static void *fifo_initDriver(G_GNUC_UNUSED struct audio_output *ao,
|
static void *fifo_initDriver(G_GNUC_UNUSED struct audio_output *ao,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
FifoData *fd;
|
FifoData *fd;
|
||||||
char *value, *path;
|
char *value, *path;
|
||||||
|
@ -183,7 +183,7 @@ mpd_jack_error(const char *msg)
|
|||||||
static void *
|
static void *
|
||||||
mpd_jack_init(struct audio_output *ao,
|
mpd_jack_init(struct audio_output *ao,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
struct jack_data *jd;
|
struct jack_data *jd;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
@ -112,7 +112,7 @@ static bool mvp_testDefault(void)
|
|||||||
|
|
||||||
static void *mvp_initDriver(G_GNUC_UNUSED struct audio_output *audio_output,
|
static void *mvp_initDriver(G_GNUC_UNUSED struct audio_output *audio_output,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
G_GNUC_UNUSED struct config_param *param)
|
G_GNUC_UNUSED const struct config_param *param)
|
||||||
{
|
{
|
||||||
MvpData *md = g_new(MvpData, 1);
|
MvpData *md = g_new(MvpData, 1);
|
||||||
md->audio_output = audio_output;
|
md->audio_output = audio_output;
|
||||||
|
@ -32,7 +32,7 @@ struct null_data {
|
|||||||
static void *
|
static void *
|
||||||
null_init(G_GNUC_UNUSED struct audio_output *audio_output,
|
null_init(G_GNUC_UNUSED struct audio_output *audio_output,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
G_GNUC_UNUSED struct config_param *param)
|
G_GNUC_UNUSED const struct config_param *param)
|
||||||
{
|
{
|
||||||
struct null_data *nd = g_new(struct null_data, 1);
|
struct null_data *nd = g_new(struct null_data, 1);
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ static bool oss_testDefault(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *oss_open_default(struct config_param *param)
|
static void *oss_open_default(const struct config_param *param)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int err[G_N_ELEMENTS(default_devices)];
|
int err[G_N_ELEMENTS(default_devices)];
|
||||||
@ -390,7 +390,7 @@ static void *oss_open_default(struct config_param *param)
|
|||||||
static void *
|
static void *
|
||||||
oss_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
|
oss_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
if (param) {
|
if (param) {
|
||||||
const char *device =
|
const char *device =
|
||||||
|
@ -83,7 +83,7 @@ static bool osx_testDefault(void)
|
|||||||
static void *
|
static void *
|
||||||
osx_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
|
osx_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
G_GNUC_UNUSED struct config_param *param)
|
G_GNUC_UNUSED const struct config_param *param)
|
||||||
{
|
{
|
||||||
return newOsxData();
|
return newOsxData();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ static void pulse_free_data(struct pulse_data *pd)
|
|||||||
static void *
|
static void *
|
||||||
pulse_init(struct audio_output *ao,
|
pulse_init(struct audio_output *ao,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
struct pulse_data *pd;
|
struct pulse_data *pd;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ static void free_shout_data(struct shout_data *sd)
|
|||||||
|
|
||||||
static void *my_shout_init_driver(struct audio_output *audio_output,
|
static void *my_shout_init_driver(struct audio_output *audio_output,
|
||||||
const struct audio_format *audio_format,
|
const struct audio_format *audio_format,
|
||||||
struct config_param *param)
|
const struct config_param *param)
|
||||||
{
|
{
|
||||||
struct shout_data *sd;
|
struct shout_data *sd;
|
||||||
char *test;
|
char *test;
|
||||||
|
@ -60,7 +60,7 @@ struct audio_output_plugin {
|
|||||||
*/
|
*/
|
||||||
void *(*init)(struct audio_output *ao,
|
void *(*init)(struct audio_output *ao,
|
||||||
const struct audio_format *audio_format,
|
const struct audio_format *audio_format,
|
||||||
struct config_param *param);
|
const struct config_param *param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free resources allocated by this device.
|
* Free resources allocated by this device.
|
||||||
|
@ -29,7 +29,7 @@ struct tag;
|
|||||||
struct config_param;
|
struct config_param;
|
||||||
|
|
||||||
int
|
int
|
||||||
audio_output_init(struct audio_output *, struct config_param *param);
|
audio_output_init(struct audio_output *, const struct config_param *param);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
audio_output_open(struct audio_output *audioOutput,
|
audio_output_open(struct audio_output *audioOutput,
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
audio_output_init(struct audio_output *ao, struct config_param *param)
|
audio_output_init(struct audio_output *ao, const struct config_param *param)
|
||||||
{
|
{
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
char *format = NULL;
|
char *format = NULL;
|
||||||
|
@ -71,7 +71,7 @@ void initPermissions(void)
|
|||||||
{
|
{
|
||||||
char *password;
|
char *password;
|
||||||
unsigned permission;
|
unsigned permission;
|
||||||
struct config_param *param;
|
const struct config_param *param;
|
||||||
|
|
||||||
permission_passwords = g_hash_table_new_full(g_str_hash, g_str_equal,
|
permission_passwords = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||||
g_free, NULL);
|
g_free, NULL);
|
||||||
|
@ -38,7 +38,7 @@ static float replay_gain_preamp = 1.0;
|
|||||||
|
|
||||||
void replay_gain_global_init(void)
|
void replay_gain_global_init(void)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(CONF_REPLAYGAIN);
|
const struct config_param *param = config_get_param(CONF_REPLAYGAIN);
|
||||||
|
|
||||||
if (!param)
|
if (!param)
|
||||||
return;
|
return;
|
||||||
|
@ -76,7 +76,7 @@ void tag_lib_init(void)
|
|||||||
char *temp;
|
char *temp;
|
||||||
char *s;
|
char *s;
|
||||||
char *c;
|
char *c;
|
||||||
struct config_param *param;
|
const struct config_param *param;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* parse the "metadata_to_use" config parameter below */
|
/* parse the "metadata_to_use" config parameter below */
|
||||||
|
@ -77,7 +77,7 @@ mixer_reconfigure(char *driver)
|
|||||||
|
|
||||||
void volume_init(void)
|
void volume_init(void)
|
||||||
{
|
{
|
||||||
struct config_param *param = config_get_param(CONF_MIXER_TYPE);
|
const struct config_param *param = config_get_param(CONF_MIXER_TYPE);
|
||||||
//hw mixing is by default
|
//hw mixing is by default
|
||||||
if (param) {
|
if (param) {
|
||||||
if (strcmp(param->value, VOLUME_MIXER_SOFTWARE) == 0) {
|
if (strcmp(param->value, VOLUME_MIXER_SOFTWARE) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user