pixelperfectengine.audio.base.func

Undocumented in source.

Public Imports

pixelperfectengine.audio.base.types
public import pixelperfectengine.audio.base.types;
Undocumented in source.

Members

Aliases

ADPCMStream
alias ADPCMStream = NibbleArray
Undocumented in source.

Functions

convExIntToFlt
void convExIntToFlt(size_t length, int* src, float* dest)

Converts a 32 bit extended integer stream to 32 bit floating point.

createLPF
BiquadFilterValues createLPF(float fs, float f0, float q)

Calculates biquad low-pass filter values from the supplied values.

decode16bitPCM
void decode16bitPCM(const(short)[] src, int[] dest, Workpad wp)

Decodes an amount of 16 bit signed PCM to extended 32 bit. Amount is decided by dest.length. src is a full waveform. Position is stored in wp.pos.

decode4bitDialogicADPCM
void decode4bitDialogicADPCM(ADPCMStream src, int[] dest, Workpad wp)

Decodes an amount of 4 bit Oki/Dialogic ADPCM stream to extended 32 bit. Amount is decided by dest.length. src is a full waveform. Position is stored in wp.pos.

decode4bitIMAADPCM
void decode4bitIMAADPCM(ADPCMStream src, int[] dest, Workpad wp)

Decodes an amount of 4 bit IMA ADPCM stream to extended 32 bit. Amount is decided by dest.length. src is a full waveform. Position is stored in wp.pos.

decode8bitPCM
void decode8bitPCM(const(ubyte)[] src, int[] dest, Workpad wp)

Decodes an amount of 8 bit unsigned PCM to extended 32 bit. Amount is decided by dest.length. src is a full waveform. Position is stored in wp.pos.

decodeALawStream
void decodeALawStream(const(ubyte)[] src, int[] dest, Workpad wp)

Decodes an A-Law encoded stream.

decodeMuLawStream
void decodeMuLawStream(const(ubyte)[] src, int[] dest, Workpad wp)

Decodes a Mu-Law encoded stream.

interleave
void interleave(size_t length, float* srcL, float* srcR, float* dest)

Interleaves two channels. dest must be as big as the length of srcL and srcR.

midiToFreq
double midiToFreq(int note, double baseFreq)

Converts MIDI note to frequency.

mixIntoStream
void mixIntoStream(size_t length, float* src, float* dest, float amount, float corr)

Mixes an audio stream to the destination.

noteToFreq
double noteToFreq(double note, double baseFreq)

Converts note number to frequency.

stretchAudioNoIterpol
void stretchAudioNoIterpol(const(int)[] src, int[] dest, WavemodWorkpad wp, uint modifier)

Streches a buffer to the given amount using no interpolation. Can be used to pitch the sample.

Static variables

ADPCM_INDEX_TABLE_2BIT
byte[4] ADPCM_INDEX_TABLE_2BIT;

For IMA ADPCM Needs less storage at the cost of worse quality

ADPCM_INDEX_TABLE_3BIT
byte[8] ADPCM_INDEX_TABLE_3BIT;

For IMA ADPCM Needs less storage at the cost of worse quality

ADPCM_INDEX_TABLE_4BIT
byte[16] ADPCM_INDEX_TABLE_4BIT;

For IMA and Dialogic ADPCM Standard quality and size

ADPCM_INDEX_TABLE_5BIT
byte[32] ADPCM_INDEX_TABLE_5BIT;

For IMA ADPCM Better quality, but needs more storage

A_LAW_DECODER_TABLE
short[256] A_LAW_DECODER_TABLE;

Used for decoding A-Law encoded PCM streams.

DIALOGIC_ADPCM_STEP_TABLE
ushort[49] DIALOGIC_ADPCM_STEP_TABLE;

Most OKI and Yamaha chips seems to use this step-table

IMA_ADPCM_STEP_TABLE
ushort[89] IMA_ADPCM_STEP_TABLE;

Used by IMA ADPCM and its derivatives.

MU_LAW_DECODER_TABLE
short[256] MU_LAW_DECODER_TABLE;

Used for decoding Mu-Law encoded PCM samples

Y_ADPCM_INDEX_TABLE
byte[16] Y_ADPCM_INDEX_TABLE;

For the Yamaha ADPCM A found in YM2610 and probably other chips

Variables

CONV_RATIO_RECIPROCAL
__m128 CONV_RATIO_RECIPROCAL;

Constant for fast integer to floating point conversion

Meta