CSL  5.2
SoundFileMP3.cpp File Reference
#include "SoundFileMP3.h"
#include "math.h"

Go to the source code of this file.

Classes

struct  vbuffer

Macros

#define DEFAULT_MP3_RATE   44100
#define MP3_SAMP_TYPE   short
#define MP3_WRITE   sf_writef_short
#define MP3_DEPTH   16
#define scale_MP3F(v)   (((float) scale_MP3(v)) / 32768.0f)

Functions

static MP3_SAMP_TYPE scale_MP3 (mad_fixed_t sample)
void close_file (int fildes)
static enum mad_flow m3_input (void *data, struct mad_stream *stream)
static enum mad_flow m3_output (void *data, struct mad_header const *header, struct mad_pcm *pcm)
static enum mad_flow m3_error (void *data, struct mad_stream *stream, struct mad_frame *frame)
static enum mad_flow m3_header (void *data, struct mad_header const *header)

Macro Definition Documentation

#define DEFAULT_MP3_RATE   44100

Definition at line 13 of file SoundFileMP3.cpp.

Referenced by csl::MP3File::MP3File().

#define MP3_SAMP_TYPE   short

Definition at line 32 of file SoundFileMP3.cpp.

Referenced by csl::MP3File::decodeMP3(), m3_output(), and scale_MP3().

#define MP3_WRITE   sf_writef_short

Definition at line 50 of file SoundFileMP3.cpp.

Referenced by m3_output().

#define MP3_DEPTH   16

Definition at line 51 of file SoundFileMP3.cpp.

Referenced by csl::MP3File::decodeMP3().

#define scale_MP3F (   v)    (((float) scale_MP3(v)) / 32768.0f)

Definition at line 55 of file SoundFileMP3.cpp.

Referenced by csl::DecodedFile::writeBuffer().


Function Documentation

static MP3_SAMP_TYPE scale_MP3 ( mad_fixed_t  sample)
inlinestatic

Definition at line 41 of file SoundFileMP3.cpp.

References MP3_SAMP_TYPE.

Referenced by m3_output().

void close_file ( int  fildes)

Definition at line 290 of file SoundFileMP3.cpp.

Referenced by csl::MP3File::decodeMP3().

static enum mad_flow m3_input ( void *  data,
struct mad_stream *  stream 
)
static

Definition at line 297 of file SoundFileMP3.cpp.

References vbuffer::length, and vbuffer::start.

Referenced by csl::MP3File::decodeMP3().

static enum mad_flow m3_output ( void *  data,
struct mad_header const *  header,
struct mad_pcm *  pcm 
)
static
static enum mad_flow m3_error ( void *  data,
struct mad_stream *  stream,
struct mad_frame *  frame 
)
static

Definition at line 345 of file SoundFileMP3.cpp.

Referenced by csl::MP3File::decodeMP3().

static enum mad_flow m3_header ( void *  data,
struct mad_header const *  header 
)
static