Fixed a type with readAdvance16()

master
Steve Lascos 7 years ago
parent d3aa6667ce
commit 7124306700
  1. 3
      src/AudioEffectAnalogDelay.cpp
  2. 4
      src/LibBasicFunctions.cpp
  3. 2
      src/LibMemoryManagement.cpp

@ -261,6 +261,7 @@ void AudioEffectAnalogDelay::m_preProcessing(audio_block_t *out, audio_block_t *
{
if ( out && dry && wet) {
alphaBlend(out, dry, wet, m_feedback);
m_iir->process(out->data, out->data, AUDIO_BLOCK_SAMPLES);
} else if (dry) {
memcpy(out->data, dry->data, sizeof(int16_t) * AUDIO_BLOCK_SAMPLES);
}
@ -270,7 +271,7 @@ void AudioEffectAnalogDelay::m_postProcessing(audio_block_t *out, audio_block_t
{
if ( out && dry && wet) {
// Simulate the LPF IIR nature of the analog systems
m_iir->process(wet->data, wet->data, AUDIO_BLOCK_SAMPLES);
//m_iir->process(wet->data, wet->data, AUDIO_BLOCK_SAMPLES);
alphaBlend(out, dry, wet, m_mix);
} else if (dry) {
memcpy(out->data, dry->data, sizeof(int16_t) * AUDIO_BLOCK_SAMPLES);

@ -119,6 +119,7 @@ audio_block_t* AudioDelay::addBlock(audio_block_t *block)
// srcPtr--;
// }
// this causes pops
m_slot->writeAdvance16(block->data, AUDIO_BLOCK_SAMPLES);
// Code below worked
@ -213,9 +214,10 @@ bool AudioDelay::getSamples(audio_block_t *dest, size_t offset, size_t numSample
// destPtr--;
// }
// This causes pops
m_slot->readAdvance16(dest->data, AUDIO_BLOCK_SAMPLES);
// // Code below worked
// Code below worked
// int16_t *destPtr = dest->data;
// for (int i=0; i<AUDIO_BLOCK_SAMPLES; i++) {
// *destPtr = m_slot->readAdvance16();

@ -115,7 +115,7 @@ bool ExtMemSlot::readAdvance16(int16_t *dest, size_t numWords)
if (m_currentRdPosition + numBytes-1 <= m_end) {
// entire block fits in memory slot without wrapping
m_spi->read16(m_currentWrPosition, reinterpret_cast<uint16_t*>(dest), numWords); // cast audio data to uint.
m_spi->read16(m_currentRdPosition, reinterpret_cast<uint16_t*>(dest), numWords); // cast audio data to uint.
m_currentRdPosition += numBytes;
} else {

Loading…
Cancel
Save