OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Echo.h
Go to the documentation of this file.
1
8
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
27
namespace
openshot
28
{
29
class
Frame
;
30
35
class
Echo
:
public
EffectBase
36
{
37
private
:
39
void
init_effect_details();
40
41
public
:
42
Keyframe
echo_time
;
43
Keyframe
feedback
;
44
Keyframe
mix
;
45
46
juce::AudioBuffer<float>
echo_buffer
;
47
int
echo_buffer_samples
;
48
int
echo_buffer_channels
;
49
int
echo_write_position
;
50
bool
initialized
;
51
53
Echo
();
54
56
Echo
(
Keyframe
echo_time
,
Keyframe
feedback
,
Keyframe
mix
);
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
EffectBase.h
Header file for EffectBase class.
Json.h
Header file for JSON class.
KeyFrame.h
Header file for the Keyframe class.
juce::AudioBuffer
Definition
Frame.h:37
openshot::Echo::mix
Keyframe mix
Definition
Echo.h:44
openshot::Echo::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Echo.cpp:129
openshot::Echo::echo_buffer_channels
int echo_buffer_channels
Definition
Echo.h:48
openshot::Echo::echo_time
Keyframe echo_time
Definition
Echo.h:42
openshot::Echo::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Echo.cpp:108
openshot::Echo::echo_write_position
int echo_write_position
Definition
Echo.h:49
openshot::Echo::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Echo.cpp:146
openshot::Echo::echo_buffer
juce::AudioBuffer< float > echo_buffer
Definition
Echo.h:46
openshot::Echo::GetFrame
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
openshot::Echo::initialized
bool initialized
Definition
Echo.h:50
openshot::Echo::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Echo.cpp:115
openshot::Echo::Echo
Echo()
Default constructor.
Definition
Echo.cpp:19
openshot::Echo::echo_buffer_samples
int echo_buffer_samples
Definition
Echo.h:47
openshot::Echo::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Echo.cpp:161
openshot::Echo::setup
void setup(std::shared_ptr< openshot::Frame > frame)
Definition
Echo.cpp:43
openshot::Echo::feedback
Keyframe feedback
Definition
Echo.h:43
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition
EffectBase.h:57
openshot::Frame
This class represents a single frame of video (i.e. image & audio data).
Definition
Frame.h:90
openshot::Keyframe
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
Definition
KeyFrame.h:53
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
audio_effects
Echo.h
Generated by
1.17.0