mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 12:37:01 +03:00
wait to switch external AMP GPIO even when stopping (pause = stop for stream)
This commit is contained in:
@@ -89,7 +89,7 @@ bool spkfault_svc (void) {
|
|||||||
*/
|
*/
|
||||||
void set_jack_gpio(int gpio, char *value) {
|
void set_jack_gpio(int gpio, char *value) {
|
||||||
if (!strcasecmp(value, "jack")) {
|
if (!strcasecmp(value, "jack")) {
|
||||||
ESP_LOGI(TAG,"Adding jack detection gpio %d", gpio);
|
ESP_LOGI(TAG,"Adding jack detection GPIO %d", gpio);
|
||||||
|
|
||||||
gpio_pad_select_gpio(JACK_GPIO);
|
gpio_pad_select_gpio(JACK_GPIO);
|
||||||
gpio_set_direction(JACK_GPIO, GPIO_MODE_INPUT);
|
gpio_set_direction(JACK_GPIO, GPIO_MODE_INPUT);
|
||||||
|
|||||||
@@ -284,22 +284,14 @@ static void process_strm(u8_t *pkt, int len) {
|
|||||||
case 't':
|
case 't':
|
||||||
sendSTAT("STMt", strm->replay_gain); // STMt replay_gain is no longer used to track latency, but support it
|
sendSTAT("STMt", strm->replay_gain); // STMt replay_gain is no longer used to track latency, but support it
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
case 'q':
|
case 'q':
|
||||||
decode_flush();
|
decode_flush();
|
||||||
if (!output.external) output_flush();
|
if (!output.external) output_flush();
|
||||||
status.frames_played = 0;
|
status.frames_played = 0;
|
||||||
stream_disconnect();
|
if (stream_disconnect() && strm->command == 'f') sendSTAT("STMf", 0);
|
||||||
sendSTAT("STMf", 0);
|
|
||||||
buf_flush(streambuf);
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
decode_flush();
|
|
||||||
if (!output.external) output_flush();
|
|
||||||
status.frames_played = 0;
|
|
||||||
if (stream_disconnect()) {
|
|
||||||
sendSTAT("STMf", 0);
|
|
||||||
}
|
|
||||||
buf_flush(streambuf);
|
buf_flush(streambuf);
|
||||||
|
output.stop_time = gettime_ms();
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user