output/jack: renamed parameter "error" to "error_r"
It's a double pointer.
This commit is contained in:
@@ -187,7 +187,7 @@ mpd_jack_info(const char *msg)
|
|||||||
|
|
||||||
static void *
|
static void *
|
||||||
mpd_jack_init(G_GNUC_UNUSED const struct audio_format *audio_format,
|
mpd_jack_init(G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
const struct config_param *param, GError **error)
|
const struct config_param *param, GError **error_r)
|
||||||
{
|
{
|
||||||
struct jack_data *jd;
|
struct jack_data *jd;
|
||||||
const char *value;
|
const char *value;
|
||||||
@@ -202,7 +202,7 @@ mpd_jack_init(G_GNUC_UNUSED const struct audio_format *audio_format,
|
|||||||
char **ports = g_strsplit(value, ",", 0);
|
char **ports = g_strsplit(value, ",", 0);
|
||||||
|
|
||||||
if (ports[0] == NULL || ports[1] == NULL || ports[2] != NULL) {
|
if (ports[0] == NULL || ports[1] == NULL || ports[2] != NULL) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"two port names expected in line %d",
|
"two port names expected in line %d",
|
||||||
param->line);
|
param->line);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -236,7 +236,7 @@ mpd_jack_test_default_device(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
mpd_jack_connect(struct jack_data *jd, GError **error)
|
mpd_jack_connect(struct jack_data *jd, GError **error_r)
|
||||||
{
|
{
|
||||||
const char *output_ports[2], **jports;
|
const char *output_ports[2], **jports;
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
jd->shutdown = false;
|
jd->shutdown = false;
|
||||||
|
|
||||||
if ((jd->client = jack_client_new(jd->name)) == NULL) {
|
if ((jd->client = jack_client_new(jd->name)) == NULL) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"Failed to connect to JACK server");
|
"Failed to connect to JACK server");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
JACK_DEFAULT_AUDIO_TYPE,
|
JACK_DEFAULT_AUDIO_TYPE,
|
||||||
JackPortIsOutput, 0);
|
JackPortIsOutput, 0);
|
||||||
if (jd->ports[i] == NULL) {
|
if (jd->ports[i] == NULL) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"Cannot register output port \"%s\"",
|
"Cannot register output port \"%s\"",
|
||||||
port_names[i]);
|
port_names[i]);
|
||||||
return false;
|
return false;
|
||||||
@@ -268,7 +268,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( jack_activate(jd->client) ) {
|
if ( jack_activate(jd->client) ) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"cannot activate client");
|
"cannot activate client");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
jports = jack_get_ports(jd->client, NULL, NULL,
|
jports = jack_get_ports(jd->client, NULL, NULL,
|
||||||
JackPortIsPhysical | JackPortIsInput);
|
JackPortIsPhysical | JackPortIsInput);
|
||||||
if (jports == NULL) {
|
if (jports == NULL) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"no ports found");
|
"no ports found");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -303,7 +303,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
ret = jack_connect(jd->client, jack_port_name(jd->ports[i]),
|
ret = jack_connect(jd->client, jack_port_name(jd->ports[i]),
|
||||||
output_ports[i]);
|
output_ports[i]);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"Not a valid JACK port: %s",
|
"Not a valid JACK port: %s",
|
||||||
output_ports[i]);
|
output_ports[i]);
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ mpd_jack_connect(struct jack_data *jd, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
mpd_jack_open(void *data, struct audio_format *audio_format, GError **error)
|
mpd_jack_open(void *data, struct audio_format *audio_format, GError **error_r)
|
||||||
{
|
{
|
||||||
struct jack_data *jd = data;
|
struct jack_data *jd = data;
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ mpd_jack_open(void *data, struct audio_format *audio_format, GError **error)
|
|||||||
|
|
||||||
jd->pause = false;
|
jd->pause = false;
|
||||||
|
|
||||||
if (!mpd_jack_connect(jd, error)) {
|
if (!mpd_jack_connect(jd, error_r)) {
|
||||||
mpd_jack_client_free(jd);
|
mpd_jack_client_free(jd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -420,7 +420,7 @@ mpd_jack_write_samples(struct jack_data *jd, const void *src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
mpd_jack_play(void *data, const void *chunk, size_t size, GError **error)
|
mpd_jack_play(void *data, const void *chunk, size_t size, GError **error_r)
|
||||||
{
|
{
|
||||||
struct jack_data *jd = data;
|
struct jack_data *jd = data;
|
||||||
const size_t frame_size = audio_format_frame_size(&jd->audio_format);
|
const size_t frame_size = audio_format_frame_size(&jd->audio_format);
|
||||||
@@ -433,7 +433,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error)
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (jd->shutdown) {
|
if (jd->shutdown) {
|
||||||
g_set_error(error, jack_output_quark(), 0,
|
g_set_error(error_r, jack_output_quark(), 0,
|
||||||
"Refusing to play, because "
|
"Refusing to play, because "
|
||||||
"there is no client thread");
|
"there is no client thread");
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user