Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Typedefs | Enumerations | Functions
opl3.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xemu/opl3.h"
Include dependency graph for opl3.c:

Go to the source code of this file.

Macros

#define RSM_FRAC   10
 

Typedefs

typedef int16_t(* envelope_sinfunc) (uint16_t phase, uint16_t envelope)
 
typedef void(* envelope_genfunc) (opl3_slot *slott)
 

Enumerations

enum  { ch_2op = 0, ch_4op = 1, ch_4op2 = 2, ch_drum = 3 }
 
enum  { egk_norm = 0x01, egk_drum = 0x02 }
 
enum  envelope_gen_num { envelope_gen_num_attack = 0, envelope_gen_num_decay = 1, envelope_gen_num_sustain = 2, envelope_gen_num_release = 3 }
 

Functions

void OPL3_Generate (opl3_chip *chip, int16_t *buf)
 
void OPL3_GenerateResampled (opl3_chip *chip, int16_t *buf1, int16_t *buf2)
 
void OPL3_Reset (opl3_chip *chip, uint32_t samplerate)
 
void OPL3_WriteReg (opl3_chip *chip, uint16_t reg, uint8_t v)
 
void OPL3_WriteRegBuffered (opl3_chip *chip, uint16_t reg, uint8_t v)
 
void OPL3_GenerateStream (opl3_chip *chip, int16_t *sndptr1, int16_t *sndptr2, uint32_t numsamples, const uint32_t increment1, const uint32_t increment2)
 

Macro Definition Documentation

◆ RSM_FRAC

#define RSM_FRAC   10

Definition at line 38 of file opl3.c.

Typedef Documentation

◆ envelope_genfunc

typedef void(* envelope_genfunc) (opl3_slot *slott)

Definition at line 186 of file opl3.c.

◆ envelope_sinfunc

typedef int16_t(* envelope_sinfunc) (uint16_t phase, uint16_t envelope)

Definition at line 185 of file opl3.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ch_2op 
ch_4op 
ch_4op2 
ch_drum 

Definition at line 42 of file opl3.c.

◆ anonymous enum

anonymous enum
Enumerator
egk_norm 
egk_drum 

Definition at line 51 of file opl3.c.

◆ envelope_gen_num

Enumerator
envelope_gen_num_attack 
envelope_gen_num_decay 
envelope_gen_num_sustain 
envelope_gen_num_release 

Definition at line 345 of file opl3.c.

Function Documentation

◆ OPL3_Generate()

void OPL3_Generate ( opl3_chip chip,
int16_t *  buf 
)

Definition at line 1050 of file opl3.c.

Here is the caller graph for this function:

◆ OPL3_GenerateResampled()

void OPL3_GenerateResampled ( opl3_chip chip,
int16_t *  buf1,
int16_t *  buf2 
)

Definition at line 1182 of file opl3.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OPL3_GenerateStream()

void OPL3_GenerateStream ( opl3_chip chip,
int16_t *  sndptr1,
int16_t *  sndptr2,
uint32_t  numsamples,
const uint32_t  increment1,
const uint32_t  increment2 
)

Definition at line 1372 of file opl3.c.

Here is the call graph for this function:

◆ OPL3_Reset()

void OPL3_Reset ( opl3_chip chip,
uint32_t  samplerate 
)

Definition at line 1198 of file opl3.c.

◆ OPL3_WriteReg()

void OPL3_WriteReg ( opl3_chip chip,
uint16_t  reg,
uint8_t  v 
)

Definition at line 1245 of file opl3.c.

Here is the caller graph for this function:

◆ OPL3_WriteRegBuffered()

void OPL3_WriteRegBuffered ( opl3_chip chip,
uint16_t  reg,
uint8_t  v 
)

Definition at line 1344 of file opl3.c.

Here is the call graph for this function: