summaryrefslogtreecommitdiffstats
path: root/apps/codec_thread.c
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2009-11-05 17:32:32 +0000
committerJeffrey Goode <jeffg7@gmail.com>2009-11-05 17:32:32 +0000
commit013fe35992c2e735f6f93e51ca26fb6d61dd8c33 (patch)
tree38da6463deb82c7bd7b15c0fbe226c20dd74d809 /apps/codec_thread.c
parent070d515049fab343786b237bc92881f9a28ea688 (diff)
downloadrockbox-013fe35992c2e735f6f93e51ca26fb6d61dd8c33.tar.gz
rockbox-013fe35992c2e735f6f93e51ca26fb6d61dd8c33.tar.bz2
rockbox-013fe35992c2e735f6f93e51ca26fb6d61dd8c33.zip
pcmbuf: better latency calculation, added debug code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23537 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codec_thread.c')
-rw-r--r--apps/codec_thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c
index affb560183..fbcb23179d 100644
--- a/apps/codec_thread.c
+++ b/apps/codec_thread.c
@@ -215,7 +215,7 @@ static bool codec_pcmbuf_insert_callback(
return true;
} /* codec_pcmbuf_insert_callback */
-static void codec_set_elapsed_callback(unsigned int value)
+static void codec_set_elapsed_callback(unsigned long value)
{
if (ci.seek_time)
return;
@@ -224,12 +224,12 @@ static void codec_set_elapsed_callback(unsigned int value)
ab_position_report(value);
#endif
- unsigned int latency = pcmbuf_get_latency();
+ unsigned long latency = pcmbuf_get_latency();
if (value < latency)
thistrack_id3->elapsed = 0;
else
{
- unsigned int elapsed = value - latency;
+ unsigned long elapsed = value - latency;
if (elapsed > thistrack_id3->elapsed ||
elapsed < thistrack_id3->elapsed - 2)
{
@@ -243,7 +243,7 @@ static void codec_set_offset_callback(size_t value)
if (ci.seek_time)
return;
- unsigned int latency = pcmbuf_get_latency() * thistrack_id3->bitrate / 8;
+ unsigned long latency = pcmbuf_get_latency() * thistrack_id3->bitrate / 8;
if (value < latency)
thistrack_id3->offset = 0;
else