Merge remote-tracking branch 'origin/master' into master-cmake

Conflicts:
	components/driver_bt/bt_app_sink.c
This commit is contained in:
Sebastien
2020-03-15 08:37:23 -04:00
7 changed files with 50 additions and 34 deletions

View File

@@ -23,7 +23,8 @@
#include "squeezelite.h"
#include "raop_sink.h"
#include <math.h>
#include <platform_bt_sink.h>
#include "bt_app_sink.h"
#define LOCK_O mutex_lock(outputbuf->mutex)
#define UNLOCK_O mutex_unlock(outputbuf->mutex)
@@ -132,21 +133,23 @@ 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.stop_time = gettime_ms();
LOG_INFO("BT sink stopped");
}
break;
case BT_SINK_PLAY:
output.state = OUTPUT_RUNNING;
LOG_INFO("BT sink playing");
LOG_INFO("BT playing");
break;
case BT_SINK_STOP:
_buf_flush(outputbuf);
output.state = OUTPUT_STOPPED;
output.stop_time = gettime_ms();
LOG_INFO("BT sink stopped");
LOG_INFO("BT stopped");
break;
case BT_SINK_PAUSE:
LOG_INFO("BT sink paused, just silence");
output.stop_time = gettime_ms();
LOG_INFO("BT paused, just silence");
break;
case BT_SINK_RATE:
output.next_sample_rate = output.current_sample_rate = va_arg(args, u32_t);