MCPcopy Create free account
hub / github.com/LabSound/LabSound / calculateTimelineValues

Method calculateTimelineValues

src/core/AudioParam.cpp:165–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void AudioParam::calculateTimelineValues(ContextRenderLock & r,
166 float * values, int numberOfValues)
167{
168 // Calculate values for this render quantum.
169 // Normally numberOfValues will equal AudioNode::ProcessingSizeInFrames
170 // (the render quantum size).
171 double sampleRate = r.context()->sampleRate();
172 double startTime = r.context()->currentTime();
173 double endTime = startTime + numberOfValues / sampleRate;
174
175 // Note we're running control rate at the sample-rate.
176 // Pass in the current value as default value.
177 m_value = m_timeline.valuesForTimeRange(startTime, endTime, static_cast<float>(m_value), values, numberOfValues, sampleRate, sampleRate);
178}
179
180void AudioParam::connect(ContextGraphLock & g, std::shared_ptr<AudioParam> param, std::shared_ptr<AudioNodeOutput> output)
181{

Callers

nothing calls this directly

Calls 4

valuesForTimeRangeMethod · 0.80
sampleRateMethod · 0.45
contextMethod · 0.45
currentTimeMethod · 0.45

Tested by

no test coverage detected