Added tons of documentation headers to functions in source files.
This commit is contained in:
parent
0f04e056b2
commit
4eb2080933
43 changed files with 3953 additions and 43 deletions
|
|
@ -9,6 +9,17 @@ struct xtc_native {
|
|||
uint64_t next_position;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Checks that a native descriptor is compatible and complete.
|
||||
*
|
||||
* Validates the ABI version and structure size, the kind, the presence of all
|
||||
* callbacks, and that the identifier is a nonempty printable ASCII string.
|
||||
*
|
||||
* @param d Descriptor to validate; must not be NULL.
|
||||
* @return XTC_OK if the descriptor is usable, XTC_ERR_INVALID_ARGUMENT for a
|
||||
* missing descriptor or invalid fields, or XTC_ERR_UNSUPPORTED for an
|
||||
* ABI version or structure-size mismatch.
|
||||
*/
|
||||
xtc_result xtc_native_validate(const xtc_native_descriptor *d)
|
||||
{
|
||||
size_t i;
|
||||
|
|
@ -29,6 +40,16 @@ xtc_result xtc_native_validate(const xtc_native_descriptor *d)
|
|||
return XTC_ERR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copies a native descriptor and prepares a processor instance on the control thread.
|
||||
*
|
||||
* @param d Native processor descriptor.
|
||||
* @param rate Sample rate in hertz.
|
||||
* @param frames Number of audio frames.
|
||||
* @param value Value to encode, write, or apply.
|
||||
* @param out Receives the newly allocated object; caller owns it on success.
|
||||
* @return XTC_OK on success, or an error code describing the failure.
|
||||
*/
|
||||
xtc_result xtc_native_create(const xtc_native_descriptor *d, double rate, size_t frames, float value, xtc_native **out)
|
||||
{
|
||||
xtc_native *p;
|
||||
|
|
@ -57,6 +78,11 @@ xtc_result xtc_native_create(const xtc_native_descriptor *d, double rate, size_t
|
|||
return XTC_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Destroys native state and releases the host wrapper; accepts NULL.
|
||||
*
|
||||
* @param p Native processor instance.
|
||||
*/
|
||||
void xtc_native_destroy(xtc_native *p)
|
||||
{
|
||||
if (p) {
|
||||
|
|
@ -65,6 +91,11 @@ void xtc_native_destroy(xtc_native *p)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resets native state and transport continuity; accepts NULL.
|
||||
*
|
||||
* @param p Native processor instance.
|
||||
*/
|
||||
void xtc_native_reset(xtc_native *p)
|
||||
{
|
||||
if (p) {
|
||||
|
|
@ -73,6 +104,13 @@ void xtc_native_reset(xtc_native *p)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Processes a bounded native block, resetting on discontinuity and silencing callback failures.
|
||||
*
|
||||
* @param p Native processor instance.
|
||||
* @param b Borrowed processing buffers and block metadata.
|
||||
* @return XTC_OK on success, or an error code describing the failure.
|
||||
*/
|
||||
xtc_result xtc_native_process(xtc_native *p, const xtc_native_block *b)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue