ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

frac.h File Reference

#include "common/scummsys.h"
Include dependency graph for frac.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef int32 frac_t
 Fixed-point fractions, used by the sound rate converter and other code.

Enumerations

enum  {
  FRAC_BITS = 16, FRAC_LO_MASK = ((1L << FRAC_BITS) - 1), FRAC_HI_MASK = ((1L << FRAC_BITS) - 1) << FRAC_BITS, FRAC_ONE = (1L << FRAC_BITS),
  FRAC_HALF = (1L << (FRAC_BITS-1))
}
 

The precision of the fractional (fixed point) type we define below.

More...

Functions

frac_t doubleToFrac (double value)
double fracToDouble (frac_t value)
frac_t intToFrac (int16 value)
int16 fracToInt (frac_t value)

Typedef Documentation

typedef int32 frac_t

Fixed-point fractions, used by the sound rate converter and other code.

Definition at line 44 of file frac.h.


Enumeration Type Documentation

anonymous enum

The precision of the fractional (fixed point) type we define below.

Normally you should never have to modify this value.

Enumerator:
FRAC_BITS 
FRAC_LO_MASK 
FRAC_HI_MASK 
FRAC_ONE 
FRAC_HALF 

Definition at line 32 of file frac.h.


Function Documentation

frac_t doubleToFrac ( double  value  )  [inline]

Definition at line 46 of file frac.h.

double fracToDouble ( frac_t  value  )  [inline]

Definition at line 47 of file frac.h.

int16 fracToInt ( frac_t  value  )  [inline]

Definition at line 50 of file frac.h.

frac_t intToFrac ( int16  value  )  [inline]

Definition at line 49 of file frac.h.



Generated on Sat Mar 16 2019 05:02:49 for ResidualVM by doxygen 1.7.1
curved edge   curved edge