mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
neotools: make adpcmb encoder & decoder streamable (encoder untested)
This commit is contained in:
27
neotools/adpcmb.h
Normal file
27
neotools/adpcmb.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef ADPCMB_H
|
||||
#define ADPCMB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct AdpcmBEncoderState
|
||||
{
|
||||
bool flag;
|
||||
long xn, stepSize;
|
||||
uint8_t adpcmPack;
|
||||
} AdpcmBEncoderState;
|
||||
|
||||
void adpcmBEncoderInit(AdpcmBEncoderState* encoder);
|
||||
void adpcmBEncode(AdpcmBEncoderState* encoder, const int16_t* restrict in, uint8_t* restrict out, int len);
|
||||
|
||||
typedef struct AdpcmBDecoderState
|
||||
{
|
||||
int shift, step;
|
||||
long xn, stepSize;
|
||||
|
||||
} AdpcmBDecoderState;
|
||||
|
||||
void adpcmBDecoderInit(AdpcmBDecoderState* decoder);
|
||||
void adpcmBDecode(AdpcmBDecoderState* decoder, const uint8_t* restrict in, int16_t* restrict out, int len);
|
||||
|
||||
#endif//ADPCMB_H
|
||||
Reference in New Issue
Block a user