Ignore:
Timestamp:
10/06/06 17:14:05 (18 years ago)
Author:
zorg
Message:

Separated public interface from private headers
Use opaque objects whenever possible
Some (useless?) cosmetics on libmpcdec
Remove sv5-6 outdated support
Added libwavformat for upcoming mpcdec
New layout
Work in progress...

File:
1 moved

Legend:

Unmodified
Added
Removed
  • libmpcdec/branches/zorg/src/math.h

    r63 r68  
    3232  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    3333*/
    34 
    3534/// \file math.h
    3635/// Libmpcdec internal math routines. 
     36#ifndef _MPCDEC_MATH_H_
     37#define _MPCDEC_MATH_H_
     38#ifdef WIN32
     39#pragma once
     40#endif
    3741
    38 #ifndef _mpcdec_math_h_
    39 #define _mpcdec_math_h_
     42#include <mpcdec/mpc_types.h>
    4043
    41 //#define MPC_FIXED_POINT
     44#ifdef __cplusplus
     45extern "C" {
     46#endif
    4247
    4348#define MPC_FIXED_POINT_SHIFT 16
    4449
     50
    4551#ifdef MPC_FIXED_POINT
    4652
    47 
    4853#ifdef _WIN32_WCE
    49 
    5054#include <cmnintrin.h>
    51 
    5255#define MPC_HAVE_MULHIGH
    53 
    5456#endif
    55 
    5657
    5758#define MPC_FIXED_POINT_SCALE_SHIFT (MPC_FIXED_POINT_SHIFT + MPC_FIXED_POINT_FRACTPART)
    5859#define MPC_FIXED_POINT_SCALE (1 << (MPC_FIXED_POINT_SCALE_SHIFT - 1))
    5960
    60 
    6161//in fixedpoint mode, results in decode output buffer are in -MPC_FIXED_POINT_SCALE ... MPC_FIXED_POINT_SCALE range
    6262
    6363#define MPC_FIXED_POINT_FRACTPART 14
    64 typedef mpc_int32_t MPC_SAMPLE_FORMAT;
    6564
    6665typedef mpc_int64_t MPC_SAMPLE_FORMAT_MULTIPLY;
     
    119118//in floating-point mode, decoded samples are in -1...1 range
    120119
    121 typedef float MPC_SAMPLE_FORMAT;
    122 
    123120#define MAKE_MPC_SAMPLE(X) ((MPC_SAMPLE_FORMAT)(X))
    124121#define MAKE_MPC_SAMPLE_EX(X,Y) ((MPC_SAMPLE_FORMAT)(X))
     
    141138#endif
    142139
    143 #endif // _mpcdec_math_h_
    144 
     140#ifdef __cplusplus
     141}
     142#endif
     143#endif
Note: See TracChangeset for help on using the changeset viewer.