Hi,

I've ported Codec2 to Android to work as library. This is different than Joel's 
port in that the encoding and decoding work as Java API in android. The 
developer would have to get the PCM buffer in java and pass it to the library. 
You wouldn't need to write C or C++ code to use this.

You can access the code here:
https://github.com/AhmedObaidi/codec2-android


It is very simple to use it within the Java Android

// con here work as pointer 
long con = Codec2.create(Codec2.CODEC2_MODE_1200);
int bitsSize = Codec2.getBitsSize(con);
int samples = Codec2.getSamplesPerFrame(con) * 2;
char[] bits = new char[bitsSize];

Codec2.encode(con,buff, bits);
Codec2.decode(con,buff, bits);

Codec2.destroy(con);

The buffer should be 16 bit PCM with 16000 sample per second.

Cheers,

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to