&& (nl != volume_l || nr != volume_r)) {
volume_l = nl;
volume_r = nr;
- volume_update();
+ event_raise("volume-changed", 0);
}
}
return TRUE;
disorder_eclient_nop(client, nop_completed, 0);
}
if(rtp_supported) {
- const int old_state = rtp_is_running;
+ const int rtp_was_running = rtp_is_running;
rtp_is_running = rtp_running();
- if(old_state != rtp_is_running)
- control_monitor(0);
+ if(rtp_was_running != rtp_is_running)
+ event_raise("rtp-changed", 0);
}
return TRUE; /* keep call me please */
}
const char *error,
int attribute((unused)) nvec,
char attribute((unused)) **vec) {
+ const int rtp_was_supported = rtp_supported;
+ const int rtp_was_running = rtp_is_running;
+
++suppress_actions;
rtp_address_in_flight = 0;
if(error) {
} else {
rtp_supported = 1;
rtp_is_running = rtp_running();
- control_monitor(0);
}
- control_monitor(0);
+ if(rtp_supported != rtp_was_supported
+ || rtp_is_running != rtp_was_running)
+ event_raise("rtp-changed", 0);
--suppress_actions;
}