attempt to improve elapsed time measurement for sync
Adrian Smith
9 years ago
143 | 143 |
LOG_INFO("track start sample rate: %u replay_gain: %u", output.next_sample_rate, output.next_replay_gain);
|
144 | 144 |
output.frames_played = 0;
|
145 | 145 |
output.track_started = true;
|
|
146 |
output.track_start_time = gettime_ms();
|
146 | 147 |
output.current_sample_rate = output.next_sample_rate;
|
147 | 148 |
IF_DSD(
|
148 | 149 |
output.dop = output.next_dop;
|
597 | 597 |
LOCK_O;
|
598 | 598 |
status.output_full = _buf_used(outputbuf);
|
599 | 599 |
status.output_size = outputbuf->size;
|
600 | |
status.frames_played = output.frames_played;
|
|
600 |
status.frames_played = output.frames_played_dmp;
|
601 | 601 |
status.current_sample_rate = output.current_sample_rate;
|
602 | 602 |
status.updated = output.updated;
|
603 | 603 |
status.device_frames = output.device_frames;
|
|
605 | 605 |
if (output.track_started) {
|
606 | 606 |
_sendSTMs = true;
|
607 | 607 |
output.track_started = false;
|
608 | |
status.stream_start = output.updated;
|
|
608 |
status.stream_start = output.track_start_time;
|
609 | 609 |
}
|
610 | 610 |
#if PORTAUDIO
|
611 | 611 |
if (output.pa_reopen) {
|
19 | 19 |
|
20 | 20 |
// make may define: PORTAUDIO, SELFPIPE, RESAMPLE, RESAMPLE_MP, VISEXPORT, DSD, LINKALL to influence build
|
21 | 21 |
|
22 | |
#define VERSION "v1.6.3"
|
|
22 |
#define VERSION "v1.6.4-test"
|
23 | 23 |
|
24 | 24 |
// build detection
|
25 | 25 |
#if defined(linux)
|
|
525 | 525 |
int (* write_cb)(frames_t out_frames, bool silence, s32_t gainL, s32_t gainR, s32_t cross_gain_in, s32_t cross_gain_out, s32_t **cross_ptr);
|
526 | 526 |
unsigned start_frames;
|
527 | 527 |
unsigned frames_played;
|
|
528 |
unsigned frames_played_dmp;// frames played at the point delay is measured
|
528 | 529 |
unsigned current_sample_rate;
|
529 | 530 |
unsigned supported_rates[MAX_SUPPORTED_SAMPLERATES]; // ordered largest first so [0] is max_rate
|
530 | 531 |
unsigned default_sample_rate;
|
531 | 532 |
bool error_opening;
|
532 | 533 |
unsigned device_frames;
|
533 | 534 |
u32_t updated;
|
|
535 |
u32_t track_start_time;
|
534 | 536 |
u32_t current_replay_gain;
|
535 | 537 |
union {
|
536 | 538 |
u32_t pause_frames;
|