OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Delay.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_DELAY_AUDIO_EFFECT_H
14
#define OPENSHOT_DELAY_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
Delay
:
public
EffectBase
36
{
37
private
:
39
void
init_effect_details();
40
41
public
:
42
Keyframe
delay_time
;
43
44
juce::AudioBuffer<float>
delay_buffer
;
45
int
delay_buffer_samples
;
46
int
delay_buffer_channels
;
47
int
delay_write_position
;
48
bool
initialized
;
49
51
Delay
();
52
54
Delay
(
Keyframe
new_delay_time);
55
56
std::shared_ptr<openshot::Frame>
GetFrame
(int64_t frame_number)
override
{
57
return
GetFrame
(std::make_shared<openshot::Frame>(), frame_number);
58
}
59
60
void
setup
(std::shared_ptr<openshot::Frame> frame);
61
62
std::shared_ptr<openshot::Frame>
63
GetFrame
(std::shared_ptr<openshot::Frame> frame, int64_t frame_number)
override
;
64
65
// Get and Set JSON methods
66
std::string
Json
()
const override
;
67
void
SetJson
(
const
std::string value)
override
;
68
Json::Value
JsonValue
()
const override
;
69
void
SetJsonValue
(
const
Json::Value root)
override
;
70
71
std::string
PropertiesJSON
(int64_t requested_frame)
const override
;
72
};
73
74
}
75
76
#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::Delay::delay_buffer
juce::AudioBuffer< float > delay_buffer
Definition
Delay.h:44
openshot::Delay::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Delay.cpp:141
openshot::Delay::delay_time
Keyframe delay_time
Definition
Delay.h:42
openshot::Delay::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
Delay.h:56
openshot::Delay::Delay
Delay()
Default constructor.
Definition
Delay.cpp:19
openshot::Delay::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Delay.cpp:124
openshot::Delay::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Delay.cpp:112
openshot::Delay::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Delay.cpp:105
openshot::Delay::delay_write_position
int delay_write_position
Definition
Delay.h:47
openshot::Delay::delay_buffer_samples
int delay_buffer_samples
Definition
Delay.h:45
openshot::Delay::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Delay.cpp:152
openshot::Delay::initialized
bool initialized
Definition
Delay.h:48
openshot::Delay::delay_buffer_channels
int delay_buffer_channels
Definition
Delay.h:46
openshot::Delay::setup
void setup(std::shared_ptr< openshot::Frame > frame)
Definition
Delay.cpp:41
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
Delay.h
Generated by
1.17.0