From c85af1f8e2866b7bb9a7cab90490b02bfdf03f2a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 1 Aug 2004 11:56:45 +0000 Subject: [PATCH] Debug display. --- src/input/r_tta.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/input/r_tta.cpp b/src/input/r_tta.cpp index ea27da2aa..cf87111ae 100644 --- a/src/input/r_tta.cpp +++ b/src/input/r_tta.cpp @@ -139,14 +139,15 @@ tta_reader_c::read(generic_packetizer_c *, memory_c mem(buf, nread, true); if (pos >= seek_points.size()) { - int64_t samples_left; + double samples_left; - samples_left = irnd(get_uint32(&header.data_length) - - (seek_points.size() - 1) * TTA_FRAME_TIME * - get_uint32(&header.sample_rate)); + samples_left = (double)get_uint32(&header.data_length) - + (seek_points.size() - 1) * TTA_FRAME_TIME * + get_uint32(&header.sample_rate); + mxverb(2, "tta: samples_left %lf\n", samples_left); - PTZR0->process(mem, -1, samples_left * 1000000000ll / - get_uint32(&header.sample_rate)); + PTZR0->process(mem, -1, irnd(samples_left * 1000000000.0l / + get_uint32(&header.sample_rate))); } else PTZR0->process(mem); bytes_processed += nread;