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

Frame transmitter which transmits frame over a channel. More...

#include <OutputHandler.hpp>

Public Member Functions

 ChannelFrameTransmitter ()
 Construct a ChannelFrameTransmitter. More...
 
 ChannelFrameTransmitter (chanend_t c_frame_out)
 Construct a ChannelFrameTransmitter. More...
 
void SetChannel (chanend_t c_frame_out)
 Set channel used for frame transfers. More...
 
chanend_t GetChannel ()
 Get channel used for frame transfers. More...
 
void OutputFrame (int32_t frame[MIC_COUNT][SAMPLE_COUNT])
 Transmit the specified frame. More...
 

Detailed Description

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
class mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >

Frame transmitter which transmits frame over a channel.

When using this frame transmitter, frames are transmitted over a channel using the frame transfer API in mic_array/frame_transfer.h.

Usually, a call to ma_frame_rx_s32() (with the other end of c_frame_out as argument) should be used to receive the frame on another thread.

Frames can be transmitted between tiles using this class.

Template Parameters
MIC_COUNTNumber of audio channels in each frame.
SAMPLE_COUNTNumber of samples per frame.

Constructor & Destructor Documentation

◆ ChannelFrameTransmitter() [1/2]

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >::ChannelFrameTransmitter ( )
inline

Construct a ChannelFrameTransmitter.

If this constructor is used, SetChannel() must be used to configure the channel over which frames are transmitted prior to any calls to OutputFrame().

◆ ChannelFrameTransmitter() [2/2]

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >::ChannelFrameTransmitter ( chanend_t  c_frame_out)
inline

Construct a ChannelFrameTransmitter.

Parameters
c_frame_outChannel over which frames are transmitted.

Member Function Documentation

◆ GetChannel()

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
chanend_t mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >::GetChannel

Get channel used for frame transfers.

Returns
Channel to be used for frame transfers.

◆ OutputFrame()

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
void mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >::OutputFrame ( int32_t  frame[MIC_COUNT][SAMPLE_COUNT])

Transmit the specified frame.

Parameters
frameFrame to be transmitted.

◆ SetChannel()

template<unsigned MIC_COUNT, unsigned SAMPLE_COUNT>
void mic_array::ChannelFrameTransmitter< MIC_COUNT, SAMPLE_COUNT >::SetChannel ( chanend_t  c_frame_out)

Set channel used for frame transfers.

Parameters
c_frame_outChannel to be used for frame transfers.

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