The new rendering pipeline strives to simplify the nodes themselves as much as possible and move much of the logic to an external rendering engine. This change removes all of the responsibilities that no longer belong to the nodes themselves and will soon be folded into the renderer.
48 lines
906 B
C++
48 lines
906 B
C++
#include "audio.h"
|
|
|
|
AudioInput::AudioInput()
|
|
{
|
|
samples_output_ = new NodeOutput("samples_out");
|
|
AddParameter(samples_output_);
|
|
}
|
|
|
|
QString AudioInput::Name()
|
|
{
|
|
return tr("Audio Input");
|
|
}
|
|
|
|
QString AudioInput::id()
|
|
{
|
|
return "org.olivevideoeditor.Olive.audioinput";
|
|
}
|
|
|
|
QString AudioInput::Category()
|
|
{
|
|
return tr("Input");
|
|
}
|
|
|
|
QString AudioInput::Description()
|
|
{
|
|
return tr("Import an audio footage stream.");
|
|
}
|
|
|
|
QVariant AudioInput::Value(NodeOutput *)
|
|
{
|
|
/*if (output == samples_output_) {
|
|
// Make sure decoder is set up
|
|
if (!SetupDecoder()) {
|
|
return 0;
|
|
}
|
|
|
|
// Retrieve audio samples from decoder
|
|
frame_ = decoder_->Retrieve(in, out - in);
|
|
|
|
QByteArray samples;
|
|
samples.resize(frame_->audio_params().samples_to_bytes(frame_->sample_count()));
|
|
memcpy(samples.data(), frame_->data(), static_cast<size_t>(samples.size()));
|
|
return samples;
|
|
}*/
|
|
|
|
return 0;
|
|
}
|