Update api

Christian R. Helmrich
2020-01-28 22:00:57 +00:00
parent b4f4fae039
commit c8bcf9b624

39
api.md

@@ -5,7 +5,7 @@ The following is a description of the public C/C++ functions exported by the exh
ExhaleEncAPI* exhaleCreate() ExhaleEncAPI* exhaleCreate()
----------------------------- ----------------------------
**C declaration** **C declaration**
@@ -13,15 +13,19 @@ ExhaleEncAPI* `exhaleCreate`(int32_t* const inputPcmData, unsigned char* const o
**C++ class declaration** **C++ class declaration**
*none* *none (class constructor)*
**Purpose** **Purpose**
create an *ExhaleEncAPI* object and return a pointer to it create an *ExhaleEncAPI* object and return a pointer to it
**Return value**
the pointer to the newly created *ExhaleEncAPI* object
unsigned exhaleInitEncoder() unsigned exhaleInitEncoder()
----------------------------- ----------------------------
**C declaration** **C declaration**
@@ -33,11 +37,15 @@ unsigned ExhaleEncAPI::`initEncoder`(unsigned char* const audioConfigBuffer, uin
**Purpose** **Purpose**
initialize an *ExhaleEncAPI* object for encoding initialize an *ExhaleEncAPI* object for encoding and allocate necessary object memory
**Return value**
zero (0) upon success, or nonzero (1-255 or 65535) in case of an error or if the *exhaleEnc* pointer is `NULL`
unsigned exhaleEncodeLookahead() unsigned exhaleEncodeLookahead()
--------------------------------- --------------------------------
**C declaration** **C declaration**
@@ -51,9 +59,13 @@ unsigned ExhaleEncAPI::`encodeLookahead`();
encode the first (lookahead) frame with an *ExhaleEncAPI* object encode the first (lookahead) frame with an *ExhaleEncAPI* object
**Return value**
the byte-size (2 < *b* < 65535) of the AU upon success, or nonzero (1, 2 or 65535) in case of an error or if the *exhaleEnc* pointer is `NULL`
unsigned exhaleEncodeFrame() unsigned exhaleEncodeFrame()
----------------------------- ----------------------------
**C declaration** **C declaration**
@@ -65,11 +77,15 @@ unsigned ExhaleEncAPI::`encodeFrame`();
**Purpose** **Purpose**
encode a regular frame with an *ExhaleEncAPI* object encode a regular PCM audio frame with an *ExhaleEncAPI* object
**Return value**
the byte-size (2 < *b* < 65535) of the AU upon success, or nonzero (1, 2 or 65535) in case of an error or if the *exhaleEnc* pointer is `NULL`
unsigned exhaleDelete() unsigned exhaleDelete()
------------------------ -----------------------
**C declaration** **C declaration**
@@ -81,4 +97,9 @@ ExhaleEncAPI::`~ExhaleEncAPI`(); *(class destructor)*
**Purpose** **Purpose**
free all dynamic memory allocated by an *ExhaleEncAPI* object free all dynamic memory allocated by an *ExhaleEncAPI* object. After calling this function, the *exhaleEnc* pointer can be set to `NULL`.
**Return value**
zero (0) upon success, or nonzero (65535) if the *exhaleEnc* pointer is `NULL`