mirror of https://github.com/g4klx/MMDVM.git
commit
fa9f89700f
1
FM.cpp
1
FM.cpp
|
@ -695,6 +695,7 @@ uint8_t CFM::getSpace() const
|
|||
uint8_t CFM::writeData(const uint8_t* data, uint8_t length)
|
||||
{
|
||||
m_inputExtRB.addData(data, length);
|
||||
return 0U;//maybe return an error if overflowing ?
|
||||
}
|
||||
|
||||
void CFM::insertDelay(uint16_t ms)
|
||||
|
|
|
@ -28,7 +28,7 @@ m_samplePackPointer(NULL),
|
|||
m_packIndex(0U),
|
||||
m_downSampleIndex(0U)
|
||||
{
|
||||
m_samplePackPointer = &m_samplePack;
|
||||
m_samplePackPointer = (uint8_t*)&m_samplePack;
|
||||
}
|
||||
|
||||
void CFMDownsampler::addSample(q15_t sample)
|
||||
|
@ -40,14 +40,14 @@ void CFMDownsampler::addSample(q15_t sample)
|
|||
m_samplePack = uint32_t(sample) << 12;
|
||||
break;
|
||||
case 1:{
|
||||
m_samplePack |= uint32_t(sample);
|
||||
|
||||
//we did not use MSB; skip it
|
||||
TSamplePairPack pair{m_samplePackPointer[1U], m_samplePackPointer[2U], m_samplePackPointer[3U]};
|
||||
m_samplePack |= uint32_t(sample);
|
||||
|
||||
//we did not use MSB; skip it
|
||||
TSamplePairPack pair{m_samplePackPointer[1U], m_samplePackPointer[2U], m_samplePackPointer[3U]};
|
||||
|
||||
m_ringBuffer.put(pair);
|
||||
m_ringBuffer.put(pair);
|
||||
|
||||
m_samplePack = 0;//reset the sample pack
|
||||
m_samplePack = 0;//reset the sample pack
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -36,7 +36,7 @@ private:
|
|||
CRingBuffer<TSamplePairPack> m_ringBuffer;
|
||||
|
||||
uint32_t m_samplePack;
|
||||
uint32_t *m_samplePackPointer;
|
||||
uint8_t *m_samplePackPointer;
|
||||
|
||||
uint8_t m_packIndex;
|
||||
uint8_t m_downSampleIndex;
|
||||
|
|
Loading…
Reference in New Issue