Package com.vivoka.vsdk.audio.consumers
Class BufferModuleIn
java.lang.Object
com.vivoka.vsdk.audio.consumers.BufferModuleIn
- All Implemented Interfaces:
IConsumerModule
Represents a module that consumes audio buffers and appends them to a buffer
that can be retrieved for playback or further processing.
-
Constructor Summary
ConstructorsConstructorDescriptionBufferModuleIn(int channelCount, int sampleRate) Constructs a BufferModuleIn with the specified channel count and sample rate. -
Method Summary
-
Constructor Details
-
BufferModuleIn
Constructs a BufferModuleIn with the specified channel count and sample rate. This module will create a Buffer that can hold audio data for the specified number of channels and sample rate.- Parameters:
channelCount- The number of audio channels (e.g., 1 for mono, 2 for stereo).sampleRate- The sample rate of the audio (e.g., 16000 Hz).- Throws:
Exception- If there is an error creating the Buffer object.
-
-
Method Details
-
getBuffer
Retrieves the Buffer that this module is consuming audio into. This buffer can be used to access the audio data that has been appended.- Returns:
- The Buffer containing the audio data.
-
process
Description copied from interface:IConsumerModuleProcesses the given audio buffer.- Specified by:
processin interfaceIConsumerModule- Parameters:
buffer- The audio buffer to process.last- Indicates if this is the last buffer in the stream.- Throws:
Exception- If an error occurs during processing.
-