Arduino A2DP
Public Member Functions | List of all members
OneChannelSoundData Class Reference

1 Channel data is provided as int16 values More...

#include <SoundData.h>

Inheritance diagram for OneChannelSoundData:
SoundData

Public Member Functions

 OneChannelSoundData (bool loop=false, ChannelInfo channelInfo=Both)
 
 OneChannelSoundData (int16_t *data, int32_t len, bool loop=false, ChannelInfo channelInfo=Both)
 
bool doLoop ()
 
int32_t get2ChannelData (int32_t pos, int32_t len, uint8_t *data)
 
int32_t getData (int32_t pos, Frame &frame)
 
int32_t getData (int32_t pos, int32_t len, int16_t *data)
 
void setData (int16_t *data, int32_t len)
 
void setDataRaw (uint8_t *data, int32_t len)
 
void setLoop (bool loop)
 

Detailed Description

1 Channel data is provided as int16 values

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ OneChannelSoundData()

OneChannelSoundData::OneChannelSoundData ( int16_t *  data,
int32_t  len,
bool  loop = false,
ChannelInfo  channelInfo = Both 
)

Constructor for data conisting only of one Channel

Member Function Documentation

◆ doLoop()

bool SoundData::doLoop ( )
inherited

Automatic restart playing on end

◆ get2ChannelData()

int32_t OneChannelSoundData::get2ChannelData ( int32_t  pos,
int32_t  len,
uint8_t *  data 
)
virtual

Data is stored in one channel with int16_t data. However we need to provide 2 channels. pos, len and result are in bytes.

Implements SoundData.


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