mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
remove statushack
This commit is contained in:
@@ -220,9 +220,6 @@ static void usage(const char *argv0) {
|
|||||||
#endif
|
#endif
|
||||||
#if LINKALL
|
#if LINKALL
|
||||||
" LINKALL"
|
" LINKALL"
|
||||||
#endif
|
|
||||||
#if STATUSHACK
|
|
||||||
" STATUSHACK"
|
|
||||||
#endif
|
#endif
|
||||||
"\n\n",
|
"\n\n",
|
||||||
argv0);
|
argv0);
|
||||||
|
|||||||
@@ -158,9 +158,7 @@ static void sendSTAT(const char *event, u32_t server_timestamp) {
|
|||||||
|
|
||||||
if (status.current_sample_rate && status.frames_played && status.frames_played > status.device_frames) {
|
if (status.current_sample_rate && status.frames_played && status.frames_played > status.device_frames) {
|
||||||
ms_played = (u32_t)(((u64_t)(status.frames_played - status.device_frames) * (u64_t)1000) / (u64_t)status.current_sample_rate);
|
ms_played = (u32_t)(((u64_t)(status.frames_played - status.device_frames) * (u64_t)1000) / (u64_t)status.current_sample_rate);
|
||||||
#ifndef STATUSHACK
|
|
||||||
if (now > status.updated) ms_played += (now - status.updated);
|
if (now > status.updated) ms_played += (now - status.updated);
|
||||||
#endif
|
|
||||||
LOG_SDEBUG("ms_played: %u (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
|
LOG_SDEBUG("ms_played: %u (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
|
||||||
} else if (status.frames_played && now > status.stream_start) {
|
} else if (status.frames_played && now > status.stream_start) {
|
||||||
ms_played = now - status.stream_start;
|
ms_played = now - status.stream_start;
|
||||||
@@ -330,9 +328,6 @@ static void process_strm(u8_t *pkt, int len) {
|
|||||||
LOCK_O;
|
LOCK_O;
|
||||||
output.state = jiffies ? OUTPUT_START_AT : OUTPUT_RUNNING;
|
output.state = jiffies ? OUTPUT_START_AT : OUTPUT_RUNNING;
|
||||||
output.start_at = jiffies;
|
output.start_at = jiffies;
|
||||||
#ifdef STATUSHACK
|
|
||||||
status.frames_played = output.frames_played;
|
|
||||||
#endif
|
|
||||||
UNLOCK_O;
|
UNLOCK_O;
|
||||||
|
|
||||||
LOG_DEBUG("unpause at: %u now: %u", jiffies, gettime_ms());
|
LOG_DEBUG("unpause at: %u now: %u", jiffies, gettime_ms());
|
||||||
@@ -698,9 +693,6 @@ static void slimproto_run() {
|
|||||||
_sendSTMs = true;
|
_sendSTMs = true;
|
||||||
output.track_started = false;
|
output.track_started = false;
|
||||||
status.stream_start = output.track_start_time;
|
status.stream_start = output.track_start_time;
|
||||||
#ifdef STATUSHACK
|
|
||||||
status.frames_played = output.frames_played;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#if PORTAUDIO
|
#if PORTAUDIO
|
||||||
if (output.pa_reopen) {
|
if (output.pa_reopen) {
|
||||||
|
|||||||
Reference in New Issue
Block a user