Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 34 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // Type definitions for imaadpcm 5.0 |
||
2 | // Project: https://github.com/rochars/imaadpcm |
||
3 | // Definitions by: Rafael S. Rocha <https://github.com/rochars> |
||
4 | // Definitions: https://github.com/rochars/imaadpcm |
||
5 | |||
6 | /** |
||
7 | * Encode 16-bit PCM samples into 4-bit IMA ADPCM samples. |
||
8 | * @param {!Int16Array} samples A array of samples. |
||
9 | * @return {!Uint8Array} |
||
10 | */ |
||
11 | export function encode(samples: Int16Array): Uint8Array; |
||
12 | |||
13 | /** |
||
14 | * Decode IMA ADPCM samples into 16-bit PCM samples. |
||
15 | * @param {!Uint8Array} adpcmSamples A array of ADPCM samples. |
||
16 | * @param {number} blockAlign The block size. |
||
17 | * @return {!Int16Array} |
||
18 | */ |
||
19 | export function decode(samples: Uint8Array, blockAlign?: number): Int16Array; |
||
20 | |||
21 | /** |
||
22 | * Encode a block of 505 16-bit samples as 4-bit ADPCM samples. |
||
23 | * @param {!Array<number>} block A sample block of 505 samples. |
||
24 | * @return {!Array<number>} |
||
25 | */ |
||
26 | export function encodeBlock(block: Array<number>): Array<number>; |
||
27 | |||
28 | /** |
||
29 | * Decode a block of ADPCM samples into 16-bit PCM samples. |
||
30 | * @param {!Array<number>} block A adpcm sample block. |
||
31 | * @return {!Array<number>} |
||
32 | */ |
||
33 | export function decodeBlock(block: Array<number>): Array<number>; |
||
34 |