18#ifndef PLAYBACKMANAGER_H
19#define PLAYBACKMANAGER_H
21#include "basemanager.h"
41 bool isLooping() {
return mIsLooping; }
42 void setCheckForSoundsHalfway(
bool newCheck) { mCheckForSoundsHalfway = newCheck; }
47 void playFlipInBetween();
48 void playScrub(
int frame);
49 void setSoundScrubMsec(
int mSec) { mMsecSoundScrub = mSec; }
50 int getSoundScrubMsec() {
return mMsecSoundScrub; }
51 void setSoundScrubActive(
bool b) { mSoundScrub = b; }
52 bool getSoundScrubActive() {
return mSoundScrub; }
54 int fps() {
return mFps; }
55 int startFrame() {
return mStartFrame; }
56 int endFrame() {
return mEndFrame; }
58 bool isRangedPlaybackOn() {
return mIsRangedPlayback; }
59 int markInFrame() {
return mMarkInFrame; }
60 int markOutFrame() {
return mMarkOutFrame; }
63 void setLooping(
bool isLoop);
64 void enableRangedPlayback(
bool b);
65 void setRangedStartFrame(
int frame);
66 void setRangedEndFrame(
int frame);
67 void enableSound(
bool b);
72 void stopScrubPlayback();
75 void fpsChanged(
int fps);
76 void loopStateChanged(
bool b);
77 void rangedPlaybackStateChanged(
bool b);
78 void playStateChanged(
bool isPlaying);
83 void playSounds(
int frame);
89 void updateStartFrame();
90 void updateEndFrame();
92 bool mIsLooping =
false;
93 bool mIsPlaySound =
true;
95 bool mIsRangedPlayback =
false;
97 int mMarkOutFrame = 10;
98 int mActiveSoundFrame = 0;
102 int mFlipRollInterval = 100;
103 int mFlipInbetweenInterval = 100;
104 int mFlipRollMax = 5;
105 int mMsecSoundScrub = 100;
106 bool mSoundScrub =
false;
109 QTimer* mFlipTimer =
nullptr;
110 QTimer* mScrubTimer =
nullptr;
112 int mPlayingFrameCounter = 0;
114 bool mCheckForSoundsHalfway =
false;
bool skipFrame()
PlaybackManager::skipFrame() Small errors accumulate while playing animation If the error is greater ...