alignment to 4.0 + misc cspot fixes

This commit is contained in:
Philippe G
2021-12-22 12:15:05 -08:00
parent 80270b772b
commit 9dfe90c26f
17 changed files with 60 additions and 41 deletions

View File

@@ -143,6 +143,7 @@ static bool bt_sink_cmd_handler(bt_sink_cmd_t cmd, va_list args)
case BT_SINK_AUDIO_STOPPED:
if (output.external == DECODE_BT) {
if (output.state > OUTPUT_STOPPED) output.state = OUTPUT_STOPPED;
output.external = 0;
output.stop_time = gettime_ms();
LOG_INFO("BT sink stopped");
}
@@ -287,6 +288,8 @@ static bool raop_sink_cmd_handler(raop_event_t event, va_list args)
output.next_sample_rate = output.current_sample_rate = RAOP_SAMPLE_RATE;
break;
case RAOP_STOP:
output.external = 0;
__attribute__ ((fallthrough));
case RAOP_FLUSH:
LOG_INFO("%s", event == RAOP_FLUSH ? "Flush" : "Stop");
_buf_flush(outputbuf);
@@ -355,6 +358,7 @@ static bool cspot_cmd_handler(cspot_event_t cmd, va_list args)
case CSPOT_DISC:
_buf_flush(outputbuf);
abort_sink = true;
output.external = 0;
output.state = OUTPUT_STOPPED;
output.stop_time = gettime_ms();
LOG_INFO("CSpot disconnected");