Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Data Structures | Macros | Typedefs | Functions | Variables
aiff_extract_codebook.c File Reference
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

Data Structures

struct  ALADPCMloop
 

Macros

#define _XOPEN_SOURCE   500
 Create an ADPCM codebook either by extracting it from an AIFF section, or by executing tabledesign. More...
 
#define BSWAP16(x)   x = __builtin_bswap16(x)
 
#define BSWAP32(x)   x = __builtin_bswap32(x)
 
#define NORETURN   __attribute__((noreturn))
 
#define UNUSED   __attribute__((unused))
 
#define checked_fread(a, b, c, d)   if (fread(a, b, c, d) != c) fail_parse("error parsing file")
 

Typedefs

typedef short s16
 
typedef int s32
 
typedef unsigned char u8
 
typedef unsigned int u32
 

Functions

NORETURN void fail_parse (const char *fmt,...)
 
s32 readaifccodebook (FILE *fhandle, s32 ****table, s16 *order, s16 *npredictors)
 
int main (int argc, char **argv)
 

Variables

static const char usage [] = "input.aiff"
 
static const charprogname
 
static const charinfilename
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   500

Create an ADPCM codebook either by extracting it from an AIFF section, or by executing tabledesign.

◆ BSWAP16

#define BSWAP16 (   x)    x = __builtin_bswap16(x)

◆ BSWAP32

#define BSWAP32 (   x)    x = __builtin_bswap32(x)

◆ checked_fread

#define checked_fread (   a,
  b,
  c,
 
)    if (fread(a, b, c, d) != c) fail_parse("error parsing file")

◆ NORETURN

#define NORETURN   __attribute__((noreturn))

◆ UNUSED

#define UNUSED   __attribute__((unused))

Typedef Documentation

◆ s16

typedef short s16

◆ s32

◆ u32

typedef unsigned int u32

◆ u8

typedef unsigned char u8

Function Documentation

◆ fail_parse()

NORETURN void fail_parse ( const char fmt,
  ... 
)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ readaifccodebook()

s32 readaifccodebook ( FILE *  fhandle,
s32 ****  table,
s16 order,
s16 npredictors 
)

Variable Documentation

◆ infilename

const char * infilename
static

◆ progname

const char* progname
static

◆ usage

const char usage[] = "input.aiff"
static