OpenShot Library | libopenshot 0.3.3
Loading...
Searching...
No Matches
Echo.h
Go to the documentation of this file.
1
9// Copyright (c) 2008-2019 OpenShot Studios, LLC
10//
11// SPDX-License-Identifier: LGPL-3.0-or-later
12
13#ifndef OPENSHOT_ECHO_AUDIO_EFFECT_H
14#define OPENSHOT_ECHO_AUDIO_EFFECT_H
15
16#include "EffectBase.h"
17
18#include "Json.h"
19#include "KeyFrame.h"
20
21#include <memory>
22#include <string>
23
24#include <AppConfig.h>
25#include <juce_audio_basics/juce_audio_basics.h>
26
27namespace openshot
28{
29 class Frame;
30
35 class Echo : public EffectBase
36 {
37 private:
39 void init_effect_details();
40
41 public:
45
51
53 Echo();
54
57
58 std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override {
59 return GetFrame(std::make_shared<openshot::Frame>(), frame_number);
60 }
61
62 void setup(std::shared_ptr<openshot::Frame> frame);
63
64 std::shared_ptr<openshot::Frame>
65 GetFrame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number) override;
66
67 // Get and Set JSON methods
68 std::string Json() const override;
69 void SetJson(const std::string value) override;
70 Json::Value JsonValue() const override;
71 void SetJsonValue(const Json::Value root) override;
72
73 std::string PropertiesJSON(int64_t requested_frame) const override;
74 };
75
76}
77
78#endif
Header file for EffectBase class.
Header file for JSON class.
Header file for the Keyframe class.
This class adds a echo into the audio.
Definition Echo.h:36
Keyframe mix
Definition Echo.h:44
void SetJson(const std::string value) override
Load JSON string into this object.
Definition Echo.cpp:129
int echo_buffer_channels
Definition Echo.h:48
Keyframe echo_time
Definition Echo.h:42
std::string Json() const override
Generate JSON string of this object.
Definition Echo.cpp:108
int echo_write_position
Definition Echo.h:49
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition Echo.cpp:146
juce::AudioBuffer< float > echo_buffer
Definition Echo.h:46
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
Definition Echo.h:58
bool initialized
Definition Echo.h:50
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition Echo.cpp:115
Echo()
Default constructor.
Definition Echo.cpp:19
int echo_buffer_samples
Definition Echo.h:47
std::string PropertiesJSON(int64_t requested_frame) const override
Definition Echo.cpp:161
void setup(std::shared_ptr< openshot::Frame > frame)
Definition Echo.cpp:43
Keyframe feedback
Definition Echo.h:43
This abstract class is the base class, used by all effects in libopenshot.
Definition EffectBase.h:54
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition KeyFrame.h:53
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29