Inherits IAudioFilterBase.
Inherited by IAudioFilterV2.
The IAudioFilter
class.
This class is the intermediate node for audio, which reads audio frames from the underlying pipeline and writes audio frames back after adaptation.
◆ ~IAudioFilter()
◆ setEnabled()
virtual void setEnabled |
( |
bool |
enable | ) |
|
|
pure virtual |
Enables or disables the audio filter.
- Parameters
-
enable | Whether to enable the audio filter:
true : Enable the audio filter.
false : Do not enable the audio filter.
|
◆ isEnabled()
virtual bool isEnabled |
( |
| ) |
const |
|
pure virtual |
Checks whether the audio filter is enabled.
- Returns
true
: The audio filter is enabled.
false
: The audio filter is not enabled.
◆ setProperty()
virtual int setProperty |
( |
const char * |
key, |
|
|
const void * |
buf, |
|
|
int |
buf_size |
|
) |
| |
|
pure virtual |
Sets a private property in the IAudioFilter
class.
- Parameters
-
key | The pointer to the property name. |
buf | The pointer to the buffer of this private property. |
buf_size | The buffer size of this private property. |
- Returns
- The actual size of the private property, if the method call succeeds.
- -1, if the method call fails.
◆ getProperty()
virtual int getProperty |
( |
const char * |
key, |
|
|
void * |
buf, |
|
|
int |
buf_size |
|
) |
| const |
|
pure virtual |
Gets a private property in the IAudioFilter
class.
- Parameters
-
name | The pointer to the property name. |
buf | The pointer to the buffer of this private property. |
buf_size | The buffer size of this private property. |
- Returns
- The actual size of the private property, if the method call succeeds.
- -1, if the method call fails.
◆ getName()
virtual const char* getName |
( |
| ) |
const |
|
pure virtual |
Gets the name of the IAudioFilter
class.
- Returns
- The name of the audio filter, if the method call succeeds.
- An empty string, if the method call fails.
◆ getPreferredSampleRate()
virtual int getPreferredSampleRate |
( |
| ) |
|
|
inlinevirtual |
Get the sample rate supported by the audio filter, the framework will resample the audio data and then pass it to the audio filter. If the user does not overwrite, resampling will not be done by default.
- Returns
- 0: Audio data will not be resampled.
- > 0: Audio data will be resampled to this sample rate.
Implements IAudioFilterBase.
◆ getPreferredChannelNumbers()
virtual int getPreferredChannelNumbers |
( |
| ) |
|
|
inlinevirtual |
Get the channel number supported by the audio filter, the framework will resample the audio data and then pass it to the audio filter. If the user does not overwrite, resampling will not be done by default.
- Returns
- 0: Audio data will not be resampled.
- > 0: Audio data will be resampled to this sample rate.
Implements IAudioFilterBase.
◆ adaptAudioFrame()
Adapts the audio frame.
- Parameters
-
inAudioFrame | The reference to the audio frame that you want to adapt. |
adaptedFrame | The reference to the adapted audio frame. |
- Returns
true
: Success.
false
: Failure. For example, the IAudiofilter object drops the audio frame.
◆ AddRef()
virtual void AddRef |
( |
| ) |
const |
|
pure virtualinherited |
◆ Release()
◆ HasOneRef()
virtual bool HasOneRef |
( |
| ) |
const |
|
pure virtualinherited |