Changeset 3 for trunk/include/mpcdec


Ignore:
Timestamp:
08/12/06 16:21:35 (18 years ago)
Author:
zorg
Message:

Update to 1.2 (work in progress)

Location:
trunk/include/mpcdec
Files:
1 added
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/include/mpcdec/config_types.h.in

    r1 r3  
    3636#define __MUSEPACK_CONFIG_TYPES_H__
    3737
    38 typedef unsigned char BOOL;
     38typedef unsigned char mpc_bool_t;
    3939#define TRUE  1
    4040#define FALSE 0
    4141
    42 /* these are filled in by configure */
    4342typedef @SIZE16@ mpc_int16_t;
    4443typedef @USIZE16@ mpc_uint16_t;
  • trunk/include/mpcdec/decoder.h

    r1 r3  
    3535/// \file decoder.h
    3636
    37 #ifndef _musepack_decoder_h_
    38 #define _musepack_decoder_h_
     37#ifndef _mpcdec_decoder_h_
     38#define _mpcdec_decoder_h_
    3939
    40 #include "musepack/huffman.h"
    41 #include "musepack/math.h"
    42 #include "musepack/musepack.h"
    43 #include "musepack/reader.h"
    44 #include "musepack/streaminfo.h"
     40#include "huffman.h"
     41#include "math.h"
     42#include "mpcdec.h"
     43#include "reader.h"
     44#include "streaminfo.h"
    4545
    4646enum {
  • trunk/include/mpcdec/huffman.h

    r1 r3  
    3636/// Data structures and functions for huffman coding.
    3737
    38 #ifndef _musepack_huffman_h_
    39 #define _musepack_huffman_h_
     38#ifndef _mpcdec_huffman_h_
     39#define _mpcdec_huffman_h_
    4040
    41 #include "musepack/config_types.h"
    42 #include "musepack/decoder.h"
     41#ifndef WIN32
     42#include "mpcdec/config_types.h"
     43#else
     44#include "mpcdec/config_win32.h"
     45#endif
     46
     47#include "decoder.h"
    4348
    4449struct mpc_decoder_t; // forward declare to break circular dependencies
     
    7378void mpc_decoder_init_huffman_sv7_tables(struct mpc_decoder_t *d);
    7479
    75 #endif // _musepack_huffman_h_
     80#endif // _mpcdec_huffman_h_
  • trunk/include/mpcdec/internal.h

    r1 r3  
    3333*/
    3434
    35 /// \file musepack_internal.h
    36 /// Definitions and structures used only internally by the libmusepack.
     35/// \file internal.h
     36/// Definitions and structures used only internally by the libmpcdec.
    3737
    38 #ifndef _musepack_internal_h
    39 #define _musepack_internal_h
     38#ifndef _mpcdec_internal_h
     39#define _mpcdec_internal_h
     40
    4041
    4142enum {
     
    4445
    4546/// Big/little endian 32 bit byte swapping routine.
    46 static inline
     47static __inline
    4748mpc_uint32_t swap32(mpc_uint32_t val) {
    4849    const unsigned char* src = (const unsigned char*)&val;
     
    5960
    6061/// helper functions used by multiple files
    61 mpc_uint32_t random_int(mpc_decoder *d); // in synth_filter.c
     62mpc_uint32_t mpc_random_int(mpc_decoder *d); // in synth_filter.c
    6263void mpc_decoder_initialisiere_quantisierungstabellen(mpc_decoder *d, double scale_factor);
    6364void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData);
    6465
    65 #endif // _musepack_internal_h
     66#endif // _mpcdec_internal_h
    6667
  • trunk/include/mpcdec/math.h

    r1 r3  
    3333*/
    3434
    35 /// \file mpc_math.h
    36 /// Libmusepack internal math routines. 
     35/// \file math.h
     36/// Libmpcdec internal math routines. 
    3737
    38 #ifndef _musepack_math_h_
    39 #define _musepack_math_h_
     38#ifndef _mpcdec_math_h_
     39#define _mpcdec_math_h_
    4040
    4141//#define MPC_FIXED_POINT
     
    141141#endif
    142142
    143 #endif // _musepack_math_h_
     143#endif // _mpcdec_math_h_
    144144
  • trunk/include/mpcdec/reader.h

    r1 r3  
    3535/// \file reader.h
    3636
    37 #ifndef _musepack_reader_h_
    38 #define _musepack_reader_h_
     37#ifndef _mpcdec_reader_h_
     38#define _mpcdec_reader_h_
    3939
    4040/// \brief Stream reader interface structure.
     
    4848
    4949    /// Seeks to byte position offset.
    50         BOOL (*seek)(void *t, mpc_int32_t offset);
     50        mpc_bool_t (*seek)(void *t, mpc_int32_t offset);
    5151
    5252    /// Returns the current byte offset in the stream.
     
    5757
    5858    /// True if the stream is a seekable stream.
    59         BOOL (*canseek)(void *t);
     59        mpc_bool_t (*canseek)(void *t);
    6060
    61     /// Optional field that can be used to identify a particular instance of
     61    /// Field that can be used to identify a particular instance of
    6262    /// reader or carry along data associated with that reader.
    6363    void *data;
    6464
    65     // These are used by provided internal standard file-based reader implementation.
    66     // You shouldn't touch them.  They're included in the main struct to avoid
    67     // malloc/free.
     65} mpc_reader;
     66
     67typedef struct mpc_reader_file_t {
     68        mpc_reader reader;
     69
    6870    FILE *file;
    6971    long file_size;
    70     BOOL is_seekable;
    71 } mpc_reader;
     72    mpc_bool_t is_seekable;
     73} mpc_reader_file;
    7274
    7375/// Initializes reader with default stdio file reader implementation.  Use
     
    7678/// \param r reader struct to initalize
    7779/// \param input input stream to attach to the reader
    78 void mpc_reader_setup_file_reader(mpc_reader *r, FILE *input);
     80void mpc_reader_setup_file_reader(mpc_reader_file *r, FILE *input);
    7981
    80 #endif // _musepack_reader_h_
     82#endif // _mpcdec_reader_h_
  • trunk/include/mpcdec/requant.h

    r1 r3  
    3636/// Requantization function definitions.
    3737
    38 #ifndef _musepack_requant_h
    39 #define _musepack_requant_h_
     38#ifndef _mpcdec_requant_h
     39#define _mpcdec_requant_h_
    4040
    41 #include "musepack/musepack.h"
     41#include "mpcdec.h"
    4242
    4343/* C O N S T A N T S */
     
    4949#define Dc      (__Dc + 1)
    5050
    51 #endif // _musepack_requant_h_
     51#endif // _mpcdec_requant_h_
  • trunk/include/mpcdec/streaminfo.h

    r1 r3  
    3535/// \file streaminfo.h
    3636
    37 #ifndef _musepack_streaminfo_h_
    38 #define _musepack_streaminfo_h_
     37#ifndef _mpcdec_streaminfo_h_
     38#define _mpcdec_streaminfo_h_
    3939
    4040typedef mpc_int32_t mpc_streaminfo_off_t;
     
    8484} mpc_streaminfo;
    8585
    86 #endif // _musepack_streaminfo_h_
     86#endif // _mpcdec_streaminfo_h_
Note: See TracChangeset for help on using the changeset viewer.