YobeSDK  0.2.0
Yobe::BioListener Struct Referenceabstract

The main class for utilizing the Yobe BioListener functionality. More...

#include <yobe_bio_listener.hpp>

Public Member Functions

 BioListener (const BioListener &)=delete
 
 BioListener (BioListener &&) noexcept=default
 
BioListeneroperator= (const BioListener &)=delete
 
BioListeneroperator= (BioListener &&) noexcept=default
 
virtual Status Init (const char *license)=0
 Initializes the Yobe BioListener algorithm. More...
 
virtual Status Init (const char *license, VoiceTarget voice_target)=0
 Initializes the Yobe BioListener algorithm for a specific voice target. More...
 
virtual Status Deinit ()=0
 Cleans up the internals of the Yobe BioListener algorithm. More...
 
virtual Status GetStatus () const =0
 Gets the current status of the Yobe BioListener algorithm. More...
 
virtual VoiceTarget GetVoiceTarget () const =0
 Gets the voice target status for the Yobe BioListener algorithm. More...
 
virtual Status ProcessBuffer (const int16_t *in_samples, int16_t *out_samples, uint32_t in_sample_count, uint32_t *out_sample_count)=0
 ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio. More...
 
virtual Status ProcessBuffer (const double *in_samples, double *out_samples, uint32_t in_sample_count, uint32_t *out_sample_count)=0
 ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio. More...
 

Detailed Description

The main class for utilizing the Yobe BioListener functionality.

This class provides an interface to use the Yobe BioListener algorithm for processing audio samples. The algorithm analyzes the audio to detect biological signals and can be used to determine the presence of a human voice.

Member Function Documentation

◆ Init() [1/2]

virtual Status Yobe::BioListener::Init ( const char *  license)
pure virtual

Initializes the Yobe BioListener algorithm.

This function initializes the internals of the Yobe BioListener algorithm. It takes a license as a parameter, which must be provided by Yobe. If the initialization fails, the returned status will indicate the cause of failure.

Parameters
[in]licenseA license provided by Yobe.
Returns
The status of the Yobe BioListener algorithm after initialization.

◆ Init() [2/2]

virtual Status Yobe::BioListener::Init ( const char *  license,
VoiceTarget  voice_target 
)
pure virtual

Initializes the Yobe BioListener algorithm for a specific voice target.

This function initializes the internals of the Yobe BioListener algorithm for a specific voice target. It takes a license and a voice target as parameters. If the initialization fails, the returned status will indicate the cause of failure.

Parameters
[in]licenseA license provided by Yobe.
[in]voice_targetThe near or far voice target.
Returns
The status of the Yobe BioListener algorithm after initialization.

◆ Deinit()

virtual Status Yobe::BioListener::Deinit ( )
pure virtual

Cleans up the internals of the Yobe BioListener algorithm.

This function deinitializes the internals of the Yobe BioListener algorithm. If the deinitialization fails, the returned status will indicate the cause of failure.

Returns
The status of the Yobe BioListener algorithm after deinitialization.

◆ GetStatus()

virtual Status Yobe::BioListener::GetStatus ( ) const
pure virtual

Gets the current status of the Yobe BioListener algorithm.

This function returns a status code indicating the current status of the Yobe BioListener algorithm.

Returns
The current status of the Yobe BioListener algorithm.

◆ GetVoiceTarget()

virtual VoiceTarget Yobe::BioListener::GetVoiceTarget ( ) const
pure virtual

Gets the voice target status for the Yobe BioListener algorithm.

This function returns the voice target status for the Yobe BioListener algorithm, depending on the package.

Returns
The voice target status for the Yobe BioListener algorithm.

◆ ProcessBuffer() [1/2]

virtual Status Yobe::BioListener::ProcessBuffer ( const int16_t *  in_samples,
int16_t *  out_samples,
uint32_t  in_sample_count,
uint32_t *  out_sample_count 
)
pure virtual

ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.

This function takes two channel interleaved audio as input and applies processing to the audio. The processed audio is then written to the output buffer in interleaved format. The size of the output buffer should be pre-allocated to hold the processed audio samples.

Parameters
[in]in_samplesA pointer to the buffer containing the interleaved input audio samples.
[out]out_samplesA pre-allocated buffer for the interleaved processed audio samples.
[in]in_sample_countThe number of audio samples in the input buffer.
[in,out]out_sample_countA pointer to the number of audio samples in the output buffer. The actual number of processed audio samples will be written to this variable by the function.
Returns
The status of the Yobe BioListener library after processing the audio buffer.
Note
If the input buffer size is not the correct size, the library will return a NEEDS_MORE_DATA error code.
In case of any error, the value pointed to by out_sample_count will be set to 0.

◆ ProcessBuffer() [2/2]

virtual Status Yobe::BioListener::ProcessBuffer ( const double *  in_samples,
double *  out_samples,
uint32_t  in_sample_count,
uint32_t *  out_sample_count 
)
pure virtual

ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.

This function takes two channel interleaved audio as input and applies processing to the audio. The processed audio is then written to the output buffer in interleaved format. The size of the output buffer should be pre-allocated to hold the processed audio samples.

Parameters
[in]in_samplesA pointer to the buffer containing the interleaved input audio samples.
[out]out_samplesA pre-allocated buffer for the interleaved processed audio samples.
[in]in_sample_countThe number of audio samples in the input buffer.
[in,out]out_sample_countA pointer to the number of audio samples in the output buffer. The actual number of processed audio samples will be written to this variable by the function.
Returns
The status of the Yobe BioListener library after processing the audio buffer.
Note
If the input buffer size is not the correct size, the library will return a NEEDS_MORE_DATA error code.
In case of any error, the value pointed to by out_sample_count will be set to 0.

The documentation for this struct was generated from the following file: