Browse Source

remove statushack

philippe44 5 years ago
parent
commit
54b39d7d09
2 changed files with 0 additions and 11 deletions
  1. 0 3
      components/squeezelite/main.c
  2. 0 8
      components/squeezelite/slimproto.c

+ 0 - 3
components/squeezelite/main.c

@@ -220,9 +220,6 @@ static void usage(const char *argv0) {
 #endif
 #if LINKALL
 		   " LINKALL"
-#endif
-#if STATUSHACK
-		   " STATUSHACK"
 #endif
 		   "\n\n",
 		   argv0);

+ 0 - 8
components/squeezelite/slimproto.c

@@ -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) {
 		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);
-#endif
 		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) {
 		ms_played = now - status.stream_start;
@@ -330,9 +328,6 @@ static void process_strm(u8_t *pkt, int len) {
 			LOCK_O;
 			output.state = jiffies ? OUTPUT_START_AT : OUTPUT_RUNNING;
 			output.start_at = jiffies;
-#ifdef STATUSHACK
-			status.frames_played = output.frames_played;
-#endif
 			UNLOCK_O;
 
 			LOG_DEBUG("unpause at: %u now: %u", jiffies, gettime_ms());
@@ -698,9 +693,6 @@ static void slimproto_run() {
 				_sendSTMs = true;
 				output.track_started = false;
 				status.stream_start = output.track_start_time;
-#ifdef STATUSHACK 
-				status.frames_played = output.frames_played;
-#endif
 			}
 #if PORTAUDIO
 			if (output.pa_reopen) {