mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[airplay] Disable unused ntp_to_timestamp()
This commit is contained in:
parent
8f73616750
commit
6a0c7db50a
@ -490,24 +490,26 @@ alac_encode(struct evbuffer *evbuf, struct encode_ctx *encode_ctx, uint8_t *rawb
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AirTunes v2 time synchronization helpers */
|
// AirTunes v2 time synchronization helpers
|
||||||
static inline void
|
static inline void
|
||||||
timespec_to_ntp(struct timespec *ts, struct ntp_stamp *ns)
|
timespec_to_ntp(struct timespec *ts, struct ntp_stamp *ns)
|
||||||
{
|
{
|
||||||
/* Seconds since NTP Epoch (1900-01-01) */
|
// Seconds since NTP Epoch (1900-01-01)
|
||||||
ns->sec = ts->tv_sec + NTP_EPOCH_DELTA;
|
ns->sec = ts->tv_sec + NTP_EPOCH_DELTA;
|
||||||
|
|
||||||
ns->frac = (uint32_t)((double)ts->tv_nsec * 1e-9 * FRAC);
|
ns->frac = (uint32_t)((double)ts->tv_nsec * 1e-9 * FRAC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static inline void
|
static inline void
|
||||||
ntp_to_timespec(struct ntp_stamp *ns, struct timespec *ts)
|
ntp_to_timespec(struct ntp_stamp *ns, struct timespec *ts)
|
||||||
{
|
{
|
||||||
/* Seconds since Unix Epoch (1970-01-01) */
|
// Seconds since Unix Epoch (1970-01-01)
|
||||||
ts->tv_sec = ns->sec - NTP_EPOCH_DELTA;
|
ts->tv_sec = ns->sec - NTP_EPOCH_DELTA;
|
||||||
|
|
||||||
ts->tv_nsec = (long)((double)ns->frac / (1e-9 * FRAC));
|
ts->tv_nsec = (long)((double)ns->frac / (1e-9 * FRAC));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
timing_get_clock_ntp(struct ntp_stamp *ns)
|
timing_get_clock_ntp(struct ntp_stamp *ns)
|
||||||
|
Loading…
Reference in New Issue
Block a user