#include <bcg729/encoder.h>

int main(void) {
	const int16_t frame1[80] = { 679, -1351, -1996, -578, 1248,
		1560, -153, -1834, -1585, 240, 1658, 1014, -953, -1999,
		-932, 1053, 1688, 289, -1579, -1906, -220, 1466, 1268,
		-668, -2128, -1495, 523, 1556, 512, -1519, -2100, -747,
		1143, 1392, -289, -2004, -1753, 103, 1554, 908, -1122,
		-2168, -1134, 756, 1454, 58, -1814, -2076, -429, 1298,
		1035, -868, -2234, -1599, 385, 1451, 375, -1625, -2270,
		-884, 973, 1225, -459, -2173, -1923, -65, 1323, 674,
		-1355, -2400, -1366, 650, 1285, -145, -1983, -2244,
		-559, 1127, 930, -949 };
	const int16_t frame2[80] = { -2339, -1705, 282, 1380, 237,
		-1730, -2439, -1022, 805, 1056, -651, -2341, -2156,
		-306, 1089, 442, -1556, -2665, -1567, 418, 1052, -313,
		-2151, -2413, -721, 959, 698, -1118, -2508, -1872, 81,
		1210, 69, -1899, -2544, -1189, 637, 887, -796, -2510,
		-2260, -433, 985, 339, -1659, -2736, -1704, 315, 949,
		-481, -2320, -2582, -920, 792, 594, -1340, -2740,
		-2106, -118, 947, -132, -2130, -2774, -1388, 469, 719,
		-963, -2676, -2426, -600, 818, 172, -1827, -2904,
		-1838, 148, 781, -618, -2488, -2748 };
	const int16_t frame3[80] = { -1055, 624, 363, -1477, -2905,
		-2271, -287, 780, -298, -2296, -2942, -1589, 302, 552,
		-1162, -2844, -2594, -769, 650, 4, -1993, -3072, -2006,
		-20, 613, -752, -2654, -2917, -1215, 454, 194, -1644,
		-3073, -2440, -453, 613, -467, -2464, -3111, -1756,
		134, 384, -1322, -3012, -2762, -936, 482, -165, -2161,
		-3240, -2174, -188, 446, -950, -2821, -3083, -1406,
		289, 25, -1810, -3241, -2608, -623, 443, -633, -2632,
		-3279, -1891, -35, 218, -1473, -3180, -2930, -1103,
		314, -331, -2329, -3408, -2340, -356 };

	bcg729EncoderChannelContextStruct *e = initBcg729EncoderChannel(0);

	uint8_t o[10];
	uint8_t l;

	bcg729Encoder(e, frame1, o, &l);
	bcg729Encoder(e, frame2, o, &l);
	bcg729Encoder(e, frame3, o, &l);

	closeBcg729EncoderChannel(e);

	return 0;
}
