diff --git a/src/httpd_jsonapi.c b/src/httpd_jsonapi.c index ddc1fdb7..fc9a9363 100644 --- a/src/httpd_jsonapi.c +++ b/src/httpd_jsonapi.c @@ -1430,7 +1430,7 @@ jsonapi_reply_outputs_get_byid(struct httpd_request *hreq) return HTTP_BADREQUEST; } - ret = player_speaker_get_byid(output_id, &speaker_info); + ret = player_speaker_get_byid(&speaker_info, output_id); if (ret < 0) { @@ -1520,7 +1520,7 @@ jsonapi_reply_outputs_toggle_byid(struct httpd_request *hreq) return HTTP_BADREQUEST; } - ret = player_speaker_get_byid(output_id, &spk); + ret = player_speaker_get_byid(&spk, output_id); if (ret < 0) { DPRINTF(E_LOG, L_WEB, "No output found for the given output id, toggle failed for '%s'\n", hreq->uri_parsed->path); @@ -2629,7 +2629,7 @@ output_volume_set(int volume, int step, uint64_t output_id) if (step != 0) { // Calculate new output volume from the given step value - ret = player_speaker_get_byid(output_id, &speaker_info); + ret = player_speaker_get_byid(&speaker_info, output_id); if (ret < 0) { DPRINTF(E_LOG, L_WEB, "No output found for the given output id .\n"); diff --git a/src/player.c b/src/player.c index 58cdbfd2..141222ae 100644 --- a/src/player.c +++ b/src/player.c @@ -3109,7 +3109,7 @@ player_speaker_set(uint64_t *ids) } int -player_speaker_get_byid(uint64_t id, struct player_speaker_info *spk) +player_speaker_get_byid(struct player_speaker_info *spk, uint64_t id) { struct speaker_get_param param; int ret; diff --git a/src/player.h b/src/player.h index fd2f0368..f844c3e1 100644 --- a/src/player.h +++ b/src/player.h @@ -91,7 +91,7 @@ int player_speaker_set(uint64_t *ids); int -player_speaker_get_byid(uint64_t id, struct player_speaker_info *spk); +player_speaker_get_byid(struct player_speaker_info *spk, uint64_t id); int player_speaker_get_byactiveremote(struct player_speaker_info *spk, uint32_t active_remote);