| 1 | /* |
| 2 | * libmad - MPEG audio decoder library |
| 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | * |
| 19 | * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $ |
| 20 | */ |
| 21 | |
| 22 | # ifndef LIBMAD_TIMER_H |
| 23 | # define LIBMAD_TIMER_Hcxx . . $ `external/mp3/mad_timer.h:23:10`! |
| 24 | |
| 25 | typedef structcxx . . $ $anonymous_type_4cf970bcc07bda5e_0# { |
| 26 | signed long secondscxx . . $ $anonymous_type_4cf970bcc07bda5e_0#seconds.; /* whole seconds */ |
| 27 | unsigned long fractioncxx . . $ $anonymous_type_4cf970bcc07bda5e_0#fraction.; /* 1/MAD_TIMER_RESOLUTION seconds */ |
| 28 | } mad_timer_tcxx . . $ mad_timer_t#; |
| 29 | |
| 30 | extern mad_timer_tcxx . . $ mad_timer_t# const mad_timer_zerocxx . . $ mad_timer_zero.; |
| 31 | |
| 32 | # define MAD_TIMER_RESOLUTIONcxx . . $ `external/mp3/mad_timer.h:32:10`! 352800000UL |
| 33 | |
| 34 | enum mad_unitscxx . . $ mad_units# { |
| 35 | MAD_UNITS_HOURScxx . . $ MAD_UNITS_HOURS. = -2, |
| 36 | MAD_UNITS_MINUTEScxx . . $ MAD_UNITS_MINUTES. = -1, |
| 37 | MAD_UNITS_SECONDScxx . . $ MAD_UNITS_SECONDS. = 0, |
| 38 | |
| 39 | /* metric units */ |
| 40 | |
| 41 | MAD_UNITS_DECISECONDScxx . . $ MAD_UNITS_DECISECONDS. = 10, |
| 42 | MAD_UNITS_CENTISECONDScxx . . $ MAD_UNITS_CENTISECONDS. = 100, |
| 43 | MAD_UNITS_MILLISECONDScxx . . $ MAD_UNITS_MILLISECONDS. = 1000, |
| 44 | |
| 45 | /* audio sample units */ |
| 46 | |
| 47 | MAD_UNITS_8000_HZcxx . . $ MAD_UNITS_8000_HZ. = 8000, |
| 48 | MAD_UNITS_11025_HZcxx . . $ MAD_UNITS_11025_HZ. = 11025, |
| 49 | MAD_UNITS_12000_HZcxx . . $ MAD_UNITS_12000_HZ. = 12000, |
| 50 | |
| 51 | MAD_UNITS_16000_HZcxx . . $ MAD_UNITS_16000_HZ. = 16000, |
| 52 | MAD_UNITS_22050_HZcxx . . $ MAD_UNITS_22050_HZ. = 22050, |
| 53 | MAD_UNITS_24000_HZcxx . . $ MAD_UNITS_24000_HZ. = 24000, |
| 54 | |
| 55 | MAD_UNITS_32000_HZcxx . . $ MAD_UNITS_32000_HZ. = 32000, |
| 56 | MAD_UNITS_44100_HZcxx . . $ MAD_UNITS_44100_HZ. = 44100, |
| 57 | MAD_UNITS_48000_HZcxx . . $ MAD_UNITS_48000_HZ. = 48000, |
| 58 | |
| 59 | /* video frame/field units */ |
| 60 | |
| 61 | MAD_UNITS_24_FPScxx . . $ MAD_UNITS_24_FPS. = 24, |
| 62 | MAD_UNITS_25_FPScxx . . $ MAD_UNITS_25_FPS. = 25, |
| 63 | MAD_UNITS_30_FPScxx . . $ MAD_UNITS_30_FPS. = 30, |
| 64 | MAD_UNITS_48_FPScxx . . $ MAD_UNITS_48_FPS. = 48, |
| 65 | MAD_UNITS_50_FPScxx . . $ MAD_UNITS_50_FPS. = 50, |
| 66 | MAD_UNITS_60_FPScxx . . $ MAD_UNITS_60_FPS. = 60, |
| 67 | |
| 68 | /* CD audio frames */ |
| 69 | |
| 70 | MAD_UNITS_75_FPScxx . . $ MAD_UNITS_75_FPS. = 75, |
| 71 | |
| 72 | /* video drop-frame units */ |
| 73 | |
| 74 | MAD_UNITS_23_976_FPScxx . . $ MAD_UNITS_23_976_FPS. = -24, |
| 75 | MAD_UNITS_24_975_FPScxx . . $ MAD_UNITS_24_975_FPS. = -25, |
| 76 | MAD_UNITS_29_97_FPScxx . . $ MAD_UNITS_29_97_FPS. = -30, |
| 77 | MAD_UNITS_47_952_FPScxx . . $ MAD_UNITS_47_952_FPS. = -48, |
| 78 | MAD_UNITS_49_95_FPScxx . . $ MAD_UNITS_49_95_FPS. = -50, |
| 79 | MAD_UNITS_59_94_FPScxx . . $ MAD_UNITS_59_94_FPS. = -60 |
| 80 | }; |
| 81 | |
| 82 | # define mad_timer_resetcxx . . $ `external/mp3/mad_timer.h:82:10`!(timer) ((void) (*(timer) = mad_timer_zero)) |
| 83 | |
| 84 | int mad_timer_comparecxx . . $ mad_timer_compare(8ff485e97cefb282).(mad_timer_tcxx . . $ mad_timer_t#, mad_timer_tcxx . . $ mad_timer_t#); |
| 85 | |
| 86 | # define mad_timer_signcxx . . $ `external/mp3/mad_timer.h:86:10`!(timer) mad_timer_compare((timer), mad_timer_zero) |
| 87 | |
| 88 | void mad_timer_negatecxx . . $ mad_timer_negate(e476e3a8159114db).(mad_timer_tcxx . . $ mad_timer_t# *); |
| 89 | mad_timer_tcxx . . $ mad_timer_t# mad_timer_abscxx . . $ mad_timer_abs(400d0cf010dc137a).(mad_timer_tcxx . . $ mad_timer_t#); |
| 90 | |
| 91 | void mad_timer_setcxx . . $ mad_timer_set(61b3f45465595963).(mad_timer_tcxx . . $ mad_timer_t# *, unsigned long, unsigned long, unsigned long); |
| 92 | void mad_timer_addcxx . . $ mad_timer_add(e024c4cb11196c89).(mad_timer_tcxx . . $ mad_timer_t# *, mad_timer_tcxx . . $ mad_timer_t#); |
| 93 | void mad_timer_multiplycxx . . $ mad_timer_multiply(122e4d88be2dc070).(mad_timer_tcxx . . $ mad_timer_t# *, signed long); |
| 94 | |
| 95 | signed long mad_timer_countcxx . . $ mad_timer_count(c7c4296e46da6e8b).(mad_timer_tcxx . . $ mad_timer_t#, enum mad_unitscxx . . $ mad_units#); |
| 96 | unsigned long mad_timer_fractioncxx . . $ mad_timer_fraction(aa13b87c45b4d8a2).(mad_timer_tcxx . . $ mad_timer_t#, unsigned long); |
| 97 | void mad_timer_stringcxx . . $ mad_timer_string(3d89f280619699ed).(mad_timer_tcxx . . $ mad_timer_t#, char *, char const *, |
| 98 | enum mad_unitscxx . . $ mad_units#, enum mad_unitscxx . . $ mad_units#, unsigned long); |
| 99 | |
| 100 | # endif |