OpenShot Audio Library | OpenShotAudio: juce_AudioPlayHead.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_AudioPlayHead.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
38 class JUCE_API AudioPlayHead
39{
40protected:
41 //==============================================================================
42 AudioPlayHead() = default;
43
44public:
45 virtual ~AudioPlayHead() = default;
46
47 //==============================================================================
49 enum FrameRateType
50 {
51 fps23976 = 0,
52 fps24 = 1,
53 fps25 = 2,
54 fps2997 = 3,
55 fps30 = 4,
56 fps2997drop = 5,
57 fps30drop = 6,
58 fps60 = 7,
59 fps60drop = 8,
60 fpsUnknown = 99
61 };
62
63 //==============================================================================
66 struct JUCE_API CurrentPositionInfo
67 {
69 double bpm;
70
72 int timeSigNumerator;
74 int timeSigDenominator;
75
77 int64 timeInSamples;
79 double timeInSeconds;
80
82 double editOriginTime;
83
85 double ppqPosition;
86
95 double ppqPositionOfLastBarStart;
96
98 FrameRateType frameRate;
99
101 bool isPlaying;
102
107 bool isRecording;
108
113 double ppqLoopStart;
114
119 double ppqLoopEnd;
120
122 bool isLooping;
123
124 //==============================================================================
125 bool operator== (const CurrentPositionInfo& other) const noexcept;
126 bool operator!= (const CurrentPositionInfo& other) const noexcept;
127
128 void resetToDefault();
129 };
130
131 //==============================================================================
142 virtual bool getCurrentPosition (CurrentPositionInfo& result) = 0;
143
145 virtual bool canControlTransport() { return false; }
146
148 virtual void transportPlay (bool shouldStartPlaying) { ignoreUnused (shouldStartPlaying); }
149
151 virtual void transportRecord (bool shouldStartRecording) { ignoreUnused (shouldStartRecording); }
152
154 virtual void transportRewind() {}
155};
156
157} // namespace juce
juce::AudioPlayHead
Definition: juce_AudioPlayHead.h:39
juce::AudioPlayHead::canControlTransport
virtual bool canControlTransport()
Definition: juce_AudioPlayHead.h:145
juce::AudioPlayHead::FrameRateType
FrameRateType
Definition: juce_AudioPlayHead.h:50
juce::AudioPlayHead::transportPlay
virtual void transportPlay(bool shouldStartPlaying)
Definition: juce_AudioPlayHead.h:148
juce::AudioPlayHead::transportRecord
virtual void transportRecord(bool shouldStartRecording)
Definition: juce_AudioPlayHead.h:151
juce::AudioPlayHead::getCurrentPosition
virtual bool getCurrentPosition(CurrentPositionInfo &result)=0
juce::AudioPlayHead::transportRewind
virtual void transportRewind()
Definition: juce_AudioPlayHead.h:154
juce::AudioPlayHead::CurrentPositionInfo
Definition: juce_AudioPlayHead.h:67
juce::AudioPlayHead::CurrentPositionInfo::timeSigDenominator
int timeSigDenominator
Definition: juce_AudioPlayHead.h:74
juce::AudioPlayHead::CurrentPositionInfo::ppqPositionOfLastBarStart
double ppqPositionOfLastBarStart
Definition: juce_AudioPlayHead.h:95
juce::AudioPlayHead::CurrentPositionInfo::ppqLoopEnd
double ppqLoopEnd
Definition: juce_AudioPlayHead.h:119
juce::AudioPlayHead::CurrentPositionInfo::timeSigNumerator
int timeSigNumerator
Definition: juce_AudioPlayHead.h:72
juce::AudioPlayHead::CurrentPositionInfo::ppqLoopStart
double ppqLoopStart
Definition: juce_AudioPlayHead.h:113
juce::AudioPlayHead::CurrentPositionInfo::isPlaying
bool isPlaying
Definition: juce_AudioPlayHead.h:101
juce::AudioPlayHead::CurrentPositionInfo::ppqPosition
double ppqPosition
Definition: juce_AudioPlayHead.h:85
juce::AudioPlayHead::CurrentPositionInfo::frameRate
FrameRateType frameRate
Definition: juce_AudioPlayHead.h:98
juce::AudioPlayHead::CurrentPositionInfo::bpm
double bpm
Definition: juce_AudioPlayHead.h:69
juce::AudioPlayHead::CurrentPositionInfo::isLooping
bool isLooping
Definition: juce_AudioPlayHead.h:122
juce::AudioPlayHead::CurrentPositionInfo::timeInSamples
int64 timeInSamples
Definition: juce_AudioPlayHead.h:77
juce::AudioPlayHead::CurrentPositionInfo::editOriginTime
double editOriginTime
Definition: juce_AudioPlayHead.h:82
juce::AudioPlayHead::CurrentPositionInfo::timeInSeconds
double timeInSeconds
Definition: juce_AudioPlayHead.h:79
juce::AudioPlayHead::CurrentPositionInfo::isRecording
bool isRecording
Definition: juce_AudioPlayHead.h:107