Update api

Christian R. Helmrich 2020-01-30 23:01:02 +00:00
parent c8bcf9b624
commit 7e9dccc648
1 changed files with 13 additions and 3 deletions

16
api.md

@ -17,7 +17,17 @@ ExhaleEncAPI* `exhaleCreate`(int32_t* const inputPcmData, unsigned char* const o
**Purpose** **Purpose**
create an *ExhaleEncAPI* object and return a pointer to it create an *ExhaleEncAPI* object and return a pointer to it. The following parameters are available for configuration of the encoder instance:
* *inputPcmData*: pointer to a signed 32-bit integer buffer from which the uncompressed, unpacked, channel-interleaved, 24-bit PCM audio data (sample value range -8388608..8388607, one sample value per integer value) will be read.
* *outputAuData*: pointer to an unsigned 8-bit integer buffer to which the compressed access unit (AU, raw frame-wise encoded audio data) will be written by the encoder. The buffer must be at least (6144/8) * *numChannels* bytes large.
* *sampleRate*: audio input and output sampling rate in Hertz (Hz). Note that not all sampling rates are supported. Recommended rates are 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, and 7350.
* *numChannels*: number of channels in the input PCM audio data. Must be between 1 (mono) and 8 (7.1 surround), or 0 to indicate two-channel input which will be encoded channel-independently in a "dual-mono" two-SCE configuration.
* *frameLength*: number of audio samples per channel and encoded frame. Must equal 1024 for now.
* *indepPeriod*: random-access (also called "tune-in") period for streaming purposes, particulary when the audio is accompanied by video. Recommended values are 45 with 25 or 50-Hz video (Europe) and 50 with 30 or 60-Hz video (USA).
* *varBitRateMode*: the CVBR mode controlling the overall bit-rate. See the [FAQ](https://gitlab.com/ecodis/exhale/-/wikis/faq) for details. Must be between 0 (lowest rate) and 9 (highest rate). Note that mode 0 is **not** recommended.
* *useNoiseFilling*: enable (true) or disable (false) the noise substitution functionality. It is recommended to enable this feature.
* *useEcodisExt*: additional, reserved parameter for future use. Currently ignored, should be set to false.
**Return value** **Return value**
@ -33,11 +43,11 @@ unsigned `exhaleInitEncoder`(ExhaleEncAPI* exhaleEnc, unsigned char* const audio
**C++ class declaration** **C++ class declaration**
unsigned ExhaleEncAPI::`initEncoder`(unsigned char* const audioConfigBuffer, uint32_t* const audioConfigBytes = nullptr); unsigned ExhaleEncAPI::`initEncoder`(unsigned char* const audioConfigBuffer, uint32_t* const audioConfigBytes = `NULL`);
**Purpose** **Purpose**
initialize an *ExhaleEncAPI* object for encoding and allocate necessary object memory initialize an *ExhaleEncAPI* object for encoding and allocate dynamic object memory. Also checks the validity for the parameters of `exhaleCreate()`.
**Return value** **Return value**