| 779 | } |
| 780 | |
| 781 | void Processor::updateLatencyBuffers(int newLatency) { |
| 782 | traceScope(); |
| 783 | if (m_lastKnownLatency != newLatency) { |
| 784 | m_lastKnownLatency = newLatency; |
| 785 | |
| 786 | int channels = getTotalNumOutputChannels(); |
| 787 | logln("updating latency buffers of " << getName() << " to " << m_lastKnownLatency << " samples and " << channels |
| 788 | << " channels"); |
| 789 | m_bypassBufferF.resize(channels, m_lastKnownLatency * 2); |
| 790 | m_bypassBufferF.clear(); |
| 791 | m_bypassBufferF.setReadOffset(m_lastKnownLatency); |
| 792 | m_bypassBufferD.resize(channels, m_lastKnownLatency * 2); |
| 793 | m_bypassBufferD.clear(); |
| 794 | m_bypassBufferD.setReadOffset(m_lastKnownLatency); |
| 795 | |
| 796 | if (m_channels > 1) { |
| 797 | for (int ch = 0; ch < m_channels; ch++) { |
| 798 | if (auto& b = m_multiMonoBypassBuffersF[(size_t)ch]) { |
| 799 | b->resize(1, m_lastKnownLatency * 2); |
| 800 | b->clear(); |
| 801 | b->setReadOffset(m_lastKnownLatency); |
| 802 | } |
| 803 | if (auto& b = m_multiMonoBypassBuffersD[(size_t)ch]) { |
| 804 | b->resize(1, m_lastKnownLatency * 2); |
| 805 | b->clear(); |
| 806 | b->setReadOffset(m_lastKnownLatency); |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | void Processor::enableAllBuses() { |
| 814 | traceScope(); |
nothing calls this directly
no test coverage detected