dev129 - SNES: add option to toggle BRR emphasis

This commit is contained in:
tildearrow 2022-12-07 02:57:19 -05:00
parent b149d1b92e
commit 056e67b228
7 changed files with 113 additions and 24 deletions

View file

@ -33,18 +33,20 @@ extern "C" {
* @param out output buffer. shall be at least 9*((15+len)/16) shorts in size (9 more if loopStart is not -1!)
* @param len input length (should be a multiple of 16. if it isn't, the output will be padded).
* @param loopStart beginning of loop area (may be -1 for no loop). this is used to ensure the respective block has no filter in order to loop properly.
* @param emphasis apply filter to compensate for Gaussian interpolation high frequency loss.
* @return number of written samples.
*/
long brrEncode(short* buf, unsigned char* out, long len, long loopStart);
long brrEncode(short* buf, unsigned char* out, long len, long loopStart, unsigned char emphasis);
/**
* read len bytes from buf, decode BRR and output to out.
* @param buf input data.
* @param out output buffer. shall be at least 16*(len/9) shorts in size.
* @param len input length (shall be a multiple of 9).
* @param emphasis apply filter to simulate Gaussian interpolation high frequency loss.
* @return number of written bytes.
*/
long brrDecode(unsigned char* buf, short* out, long len);
long brrDecode(unsigned char* buf, short* out, long len, unsigned char emphasis);
#ifdef __cplusplus
}