summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/timer.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-02-22 21:02:57 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-02-22 21:02:57 +0000
commit3f5f3524d478743a4c2f470f0baf7b767ce8d1c2 (patch)
tree26a7df9071388e223c2f1b165dc84ae3bf4f5832 /apps/codecs/libmad/timer.c
parent398b37124e870b3be69a03e5d89c5887204d6990 (diff)
downloadrockbox-3f5f3524d478743a4c2f470f0baf7b767ce8d1c2.zip
rockbox-3f5f3524d478743a4c2f470f0baf7b767ce8d1c2.tar.gz
rockbox-3f5f3524d478743a4c2f470f0baf7b767ce8d1c2.tar.bz2
rockbox-3f5f3524d478743a4c2f470f0baf7b767ce8d1c2.tar.xz
Change liba52 and libmad to the original 8-spaced tabbing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24863 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad/timer.c')
-rw-r--r--apps/codecs/libmad/timer.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/apps/codecs/libmad/timer.c b/apps/codecs/libmad/timer.c
index 33ea4a6..a6c6479 100644
--- a/apps/codecs/libmad/timer.c
+++ b/apps/codecs/libmad/timer.c
@@ -36,7 +36,7 @@
mad_timer_t const mad_timer_zero = { 0, 0 };
/*
- * NAME: timer->compare()
+ * NAME: timer->compare()
* DESCRIPTION: indicate relative order of two timers
*/
int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2)
@@ -59,7 +59,7 @@ int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2)
}
/*
- * NAME: timer->negate()
+ * NAME: timer->negate()
* DESCRIPTION: invert the sign of a timer
*/
void mad_timer_negate(mad_timer_t *timer)
@@ -73,7 +73,7 @@ void mad_timer_negate(mad_timer_t *timer)
}
/*
- * NAME: timer->abs()
+ * NAME: timer->abs()
* DESCRIPTION: return the absolute value of a timer
*/
mad_timer_t mad_timer_abs(mad_timer_t timer)
@@ -85,7 +85,7 @@ mad_timer_t mad_timer_abs(mad_timer_t timer)
}
/*
- * NAME: reduce_timer()
+ * NAME: reduce_timer()
* DESCRIPTION: carry timer fraction into seconds
*/
static
@@ -96,7 +96,7 @@ void reduce_timer(mad_timer_t *timer)
}
/*
- * NAME: gcd()
+ * NAME: gcd()
* DESCRIPTION: compute greatest common denominator
*/
static
@@ -114,7 +114,7 @@ unsigned long gcd(unsigned long num1, unsigned long num2)
}
/*
- * NAME: reduce_rational()
+ * NAME: reduce_rational()
* DESCRIPTION: convert rational expression to lowest terms
*/
static
@@ -131,12 +131,12 @@ void reduce_rational(unsigned long *numer, unsigned long *denom)
}
/*
- * NAME: scale_rational()
+ * NAME: scale_rational()
* DESCRIPTION: solve numer/denom == ?/scale avoiding overflowing
*/
static
unsigned long scale_rational(unsigned long numer, unsigned long denom,
- unsigned long scale)
+ unsigned long scale)
{
reduce_rational(&numer, &denom);
reduce_rational(&scale, &denom);
@@ -152,11 +152,11 @@ unsigned long scale_rational(unsigned long numer, unsigned long denom,
}
/*
- * NAME: timer->set()
+ * NAME: timer->set()
* DESCRIPTION: set timer to specific (positive) value
*/
void mad_timer_set(mad_timer_t *timer, unsigned long seconds,
- unsigned long numer, unsigned long denom)
+ unsigned long numer, unsigned long denom)
{
timer->seconds = seconds;
if (numer >= denom && denom > 0) {
@@ -224,7 +224,7 @@ void mad_timer_set(mad_timer_t *timer, unsigned long seconds,
}
/*
- * NAME: timer->add()
+ * NAME: timer->add()
* DESCRIPTION: add one timer to another
*/
void mad_timer_add(mad_timer_t *timer, mad_timer_t incr)
@@ -237,7 +237,7 @@ void mad_timer_add(mad_timer_t *timer, mad_timer_t incr)
}
/*
- * NAME: timer->multiply()
+ * NAME: timer->multiply()
* DESCRIPTION: multiply a timer by a scalar value
*/
void mad_timer_multiply(mad_timer_t *timer, signed long scalar)
@@ -264,7 +264,7 @@ void mad_timer_multiply(mad_timer_t *timer, signed long scalar)
}
/*
- * NAME: timer->count()
+ * NAME: timer->count()
* DESCRIPTION: return timer value in selected units
*/
signed long mad_timer_count(mad_timer_t timer, enum mad_units units)
@@ -302,7 +302,7 @@ signed long mad_timer_count(mad_timer_t timer, enum mad_units units)
case MAD_UNITS_75_FPS:
return timer.seconds * (signed long) units +
(signed long) scale_rational(timer.fraction, MAD_TIMER_RESOLUTION,
- units);
+ units);
case MAD_UNITS_23_976_FPS:
case MAD_UNITS_24_975_FPS:
@@ -318,7 +318,7 @@ signed long mad_timer_count(mad_timer_t timer, enum mad_units units)
}
/*
- * NAME: timer->fraction()
+ * NAME: timer->fraction()
* DESCRIPTION: return fractional part of timer in arbitrary terms
*/
unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom)
@@ -339,12 +339,12 @@ unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom)
}
/*
- * NAME: timer->string()
+ * NAME: timer->string()
* DESCRIPTION: write a string representation of a timer using a template
*/
void mad_timer_string(mad_timer_t timer,
- char *dest, char const *format, enum mad_units units,
- enum mad_units fracunits, unsigned long subparts)
+ char *dest, char const *format, enum mad_units units,
+ enum mad_units fracunits, unsigned long subparts)
{
unsigned long hours, minutes, seconds, sub;
unsigned int frac;
@@ -413,7 +413,7 @@ void mad_timer_string(mad_timer_t timer,
m = frame % cycle;
frame += (10 - 1) * 2 * d;
if (m > 2)
- frame += 2 * ((m - 2) / (cycle / 10));
+ frame += 2 * ((m - 2) / (cycle / 10));
frac = frame % -fracunits;
seconds = frame / -fracunits;
@@ -427,25 +427,25 @@ void mad_timer_string(mad_timer_t timer,
hours = minutes / 60;
// sprintf(dest, format,
-// hours,
-// (unsigned int) (minutes % 60),
-// (unsigned int) (seconds % 60),
-// frac, sub);
+// hours,
+// (unsigned int) (minutes % 60),
+// (unsigned int) (seconds % 60),
+// frac, sub);
break;
case MAD_UNITS_MINUTES:
minutes = seconds / 60;
// sprintf(dest, format,
-// minutes,
-// (unsigned int) (seconds % 60),
-// frac, sub);
+// minutes,
+// (unsigned int) (seconds % 60),
+// frac, sub);
break;
case MAD_UNITS_SECONDS:
// sprintf(dest, format,
-// seconds,
-// frac, sub);
+// seconds,
+// frac, sub);
break;
case MAD_UNITS_23_976_FPS: