* added subdir bladeenc
[swftools.git] / lib / bladeenc / i.c
1 #include "codec.h"
2
3 int main()
4 {
5     CodecInitOut * init;
6     CodecInitIn params;
7     char buf[1024];
8     short data[1024];
9     int len = 0;
10
11     memset(&params, 0, sizeof(params));
12     params.frequency = 32000;  //48000, 44100 or 32000
13     params.mode = 0;      //0 = Stereo, 2 = Dual Channel, 3 = Mono
14     params.emphasis = 0;  //0 = None, 1 = 50/15 microsec, 3 = CCITT J.17
15     params.bitrate = 128;         //default is 128 (64 for mono)
16
17     init = codecInit(&params);
18
19     len = codecEncodeChunk(20, data, buf);
20     len += codecFlush (&buf[len]);
21     len += codecExit(&buf[len]);
22
23     printf("data is %d bytes\n", len);
24 }