began new infrastructure

Yep, this is another one of my "famous" sweeping rewrites. Expect things to break.

Goals for this are:
- Greatly simplify node connections (particularly with arrays) so the code requires less maintenance/is more stable
- Redesign node structure to address issues where UI would stall for lengthy periods of time
- Less reliance on shared ptrs/greater reliance on QObject system for inheritance/memory management
- General code cleanup and improvements
This commit is contained in:
itsmattkc
2021-01-05 11:20:38 +11:00
parent 19eabf2830
commit 181235f6ce
152 changed files with 3932 additions and 8166 deletions
+5 -7
View File
@@ -24,14 +24,12 @@ namespace olive {
VolumeNode::VolumeNode()
{
samples_input_ = new NodeInput(QStringLiteral("samples_in"), NodeParam::kSamples);
samples_input_->set_is_keyframable(false);
AddInput(samples_input_);
samples_input_ = new NodeInput(this, QStringLiteral("samples_in"), NodeValue::kSamples);
samples_input_->SetKeyframable(false);
volume_input_ = new NodeInput(QStringLiteral("volume_in"), NodeParam::kFloat, 1.0);
volume_input_ = new NodeInput(this, QStringLiteral("volume_in"), NodeValue::kFloat, 1.0);
volume_input_->setProperty("min", 0.0);
volume_input_->setProperty("view", QStringLiteral("db"));
AddInput(volume_input_);
}
Node *VolumeNode::copy() const
@@ -65,9 +63,9 @@ NodeValueTable VolumeNode::Value(NodeValueDatabase &value) const
kOpMultiply,
kPairSampleNumber,
samples_input_,
value[samples_input_].TakeWithMeta(NodeParam::kSamples),
value[samples_input_].TakeWithMeta(NodeValue::kSamples),
volume_input_,
value[volume_input_].TakeWithMeta(NodeParam::kFloat));
value[volume_input_].TakeWithMeta(NodeValue::kFloat));
}
void VolumeNode::ProcessSamples(NodeValueDatabase &values, const SampleBufferPtr input, SampleBufferPtr output, int index) const