Many changes were made throughout the codebase to support audio, these are most of the small changes necessary. The audio support still is not perfect. I still need to write in resampling support. After that it should work correctly with all audio types.
43 lines
699 B
C++
43 lines
699 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.");
|
|
}
|
|
|
|
NodeOutput *AudioInput::samples_output()
|
|
{
|
|
return samples_output_;
|
|
}
|
|
|
|
QVariant AudioInput::Value(NodeOutput *output)
|
|
{
|
|
if (output == samples_output_) {
|
|
// Simple passthrough from footage input
|
|
return footage_input_->value();
|
|
}
|
|
|
|
return MediaInput::Value(output);
|
|
}
|