Sample-exact models: improve

- Remove the redundant hasSampleExactData() function. Instead, signal lack of s.ex.data by returning a NULL in valueBuffer()
- Cache s.ex.buffers and only update them once per period
- Make valueBuffer() in AutomatableModel threadsafe so that it can be used for NPH's sharing the same model
- Add sample-exactness to instrumenttrack's vol & pan knobs
This commit is contained in:
Vesa
2014-06-30 01:59:18 +03:00
parent 71217c0d85
commit 23433a70b5
7 changed files with 97 additions and 78 deletions

View File

@@ -75,21 +75,10 @@ bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
const float d = dryLevel();
const float w = wetLevel();
ValueBuffer * volBuf = m_ampControls.m_volumeModel.hasSampleExactData()
? m_ampControls.m_volumeModel.valueBuffer()
: NULL;
ValueBuffer * panBuf = m_ampControls.m_panModel.hasSampleExactData()
? m_ampControls.m_panModel.valueBuffer()
: NULL;
ValueBuffer * leftBuf = m_ampControls.m_leftModel.hasSampleExactData()
? m_ampControls.m_leftModel.valueBuffer()
: NULL;
ValueBuffer * rightBuf = m_ampControls.m_rightModel.hasSampleExactData()
? m_ampControls.m_rightModel.valueBuffer()
: NULL;
ValueBuffer * volBuf = m_ampControls.m_volumeModel.valueBuffer();
ValueBuffer * panBuf = m_ampControls.m_panModel.valueBuffer();
ValueBuffer * leftBuf = m_ampControls.m_leftModel.valueBuffer();
ValueBuffer * rightBuf = m_ampControls.m_rightModel.valueBuffer();
for( fpp_t f = 0; f < frames; ++f )
{