XCORE SDK
XCORE Software Development Kit
Public Member Functions | List of all members
mic_array::ChannelSampleTransmitter< MIC_COUNT > Class Template Reference

OutputHandler which transmits samples over a channel. More...

#include <OutputHandler.hpp>

Public Member Functions

 ChannelSampleTransmitter ()
 Construct a ChannelSampleTransmitter.
 
 ChannelSampleTransmitter (chanend_t c_sample_out)
 Construct a ChannelSampleTransmitter. More...
 
void SetChannel (chanend_t c_sample_out)
 Set the channel used for sending samples. More...
 
void ProcessSample (int32_t sample[MIC_COUNT])
 Transmit the specified sample. More...
 

Detailed Description

template<unsigned MIC_COUNT>
class mic_array::ChannelSampleTransmitter< MIC_COUNT >

OutputHandler which transmits samples over a channel.

This class is intended to be used as an OutputHandler with the MicArray class.

With this class, each call to ProcessSample() attempts to send the sample over a channel. The receiver must know how many channels to expect and should waiting to receive the sample before ProcessSample() is called on this object.

A sample is a vector quantity which corresponds to a single time step and containing one element per audio channel.

Template Parameters
MIC_COUNTNumber of channels in a sample.

Constructor & Destructor Documentation

◆ ChannelSampleTransmitter()

template<unsigned MIC_COUNT>
mic_array::ChannelSampleTransmitter< MIC_COUNT >::ChannelSampleTransmitter ( chanend_t  c_sample_out)
inline

Construct a ChannelSampleTransmitter.

Parameters
c_sample_outChannel for sending samples.

Member Function Documentation

◆ ProcessSample()

template<unsigned MIC_COUNT>
void mic_array::ChannelSampleTransmitter< MIC_COUNT >::ProcessSample ( int32_t  sample[MIC_COUNT])

Transmit the specified sample.

Parameters
sampleSample to be transmitted.

◆ SetChannel()

template<unsigned MIC_COUNT>
void mic_array::ChannelSampleTransmitter< MIC_COUNT >::SetChannel ( chanend_t  c_sample_out)

Set the channel used for sending samples.

Parameters
c_sample_outChannel for sending samples.

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