[outputs] Misc fixup

This commit is contained in:
ejurgensen 2019-02-22 09:12:38 +01:00
parent 9d5555152c
commit cfaceab9fe
2 changed files with 10 additions and 9 deletions

View File

@ -648,7 +648,7 @@ sync_check(snd_pcm_sframes_t *delay, snd_pcm_sframes_t *avail, struct alsa_sessi
// The will be used by sync_correct, so it knows how much we are out of sync // The will be used by sync_correct, so it knows how much we are out of sync
as->last_latency = latency; as->last_latency = latency;
DPRINTF(E_DBG, L_LAUDIO, "Sync=%d, pos=%lu, as->pos=%u, dev_pos=%lu, latency=%d, delay=%li, avail=%li, elapsed=%lu, dev_elapsed=%lu\n", DPRINTF(E_DBG, L_LAUDIO, "Sync=%d, pos=%" PRIu64 ", as->pos=%u, dev_pos=%" PRIu64 ", latency=%d, delay=%li, avail=%li, elapsed=%" PRIu64 ", dev_elapsed=%" PRIu64 "\n",
sync, pos, as->pos, dev_pos, latency, *delay, *avail, elapsed / 1000000, dev_elapsed / 1000000); sync, pos, as->pos, dev_pos, latency, *delay, *avail, elapsed / 1000000, dev_elapsed / 1000000);
return sync; return sync;

View File

@ -213,7 +213,7 @@ struct raop_session
int family; int family;
int volume; int volume;
uint64_t start_rtptime; uint32_t start_rtptime;
/* AirTunes v2 */ /* AirTunes v2 */
unsigned short server_port; unsigned short server_port;
@ -244,8 +244,8 @@ struct raop_metadata
int artwork_fmt; int artwork_fmt;
/* Progress data */ /* Progress data */
uint64_t start; uint32_t start;
uint64_t end; uint32_t end;
struct raop_metadata *next; struct raop_metadata *next;
}; };
@ -2327,7 +2327,7 @@ raop_cb_metadata(struct evrtsp_request *req, void *arg)
} }
static int static int
raop_metadata_send_progress(struct raop_session *rs, struct evbuffer *evbuf, struct raop_metadata *rmd, uint64_t offset, uint32_t delay) raop_metadata_send_progress(struct raop_session *rs, struct evbuffer *evbuf, struct raop_metadata *rmd, uint32_t offset, uint32_t delay)
{ {
uint32_t display; uint32_t display;
int ret; int ret;
@ -2354,7 +2354,7 @@ raop_metadata_send_progress(struct raop_session *rs, struct evbuffer *evbuf, str
return -1; return -1;
} }
DPRINTF(E_DBG, L_PLAYER, "Metadata send is start_time=%zu, start=%zu, display=%zu, current=%zu, end=%zu\n", DPRINTF(E_DBG, L_PLAYER, "Metadata send is start_time=%" PRIu32 ", start=%" PRIu32 ", display=%" PRIu32 ", current=%" PRIu32 ", end=%" PRIu32 "\n",
rs->start_rtptime, rmd->start, rmd->start - delay, rmd->start + offset, rmd->end); rs->start_rtptime, rmd->start, rmd->start - delay, rmd->start + offset, rmd->end);
ret = raop_send_req_set_parameter(rs, evbuf, "text/parameters", NULL, raop_cb_metadata, "send_progress"); ret = raop_send_req_set_parameter(rs, evbuf, "text/parameters", NULL, raop_cb_metadata, "send_progress");
@ -2432,7 +2432,7 @@ raop_metadata_send_metadata(struct raop_session *rs, struct evbuffer *evbuf, str
} }
static int static int
raop_metadata_send_internal(struct raop_session *rs, struct raop_metadata *rmd, uint64_t offset, uint32_t delay) raop_metadata_send_internal(struct raop_session *rs, struct raop_metadata *rmd, uint32_t offset, uint32_t delay)
{ {
char rtptime[32]; char rtptime[32];
struct evbuffer *evbuf; struct evbuffer *evbuf;
@ -2496,7 +2496,7 @@ static void
raop_metadata_startup_send(struct raop_session *rs) raop_metadata_startup_send(struct raop_session *rs)
{ {
struct raop_metadata *rmd; struct raop_metadata *rmd;
uint64_t offset; uint32_t offset;
int sent; int sent;
int ret; int ret;
@ -4876,7 +4876,8 @@ raop_write(struct output_buffer *obuf)
// Sends sync packets to new sessions, and if it is sync time then also to old sessions // Sends sync packets to new sessions, and if it is sync time then also to old sessions
packets_sync_send(rms, obuf->pts); packets_sync_send(rms, obuf->pts);
evbuffer_add_buffer_reference(rms->evbuf, obuf->data[i].evbuf); // TODO avoid this copy
evbuffer_add(rms->evbuf, obuf->data[i].buffer, obuf->data[i].bufsize);
rms->evbuf_samples += obuf->data[i].samples; rms->evbuf_samples += obuf->data[i].samples;
// Send as many packets as we have data for (one packet requires rawbuf_size bytes) // Send as many packets as we have data for (one packet requires rawbuf_size bytes)