remove useless functions for previous audio sync

This commit is contained in:
sirius 2019-11-02 18:32:48 +08:00
parent e910fe404f
commit 4cc03af9a9
3 changed files with 0 additions and 10 deletions

View file

@ -71,8 +71,6 @@ public:
static void Init() { av_log_set_level(AV_LOG_DEBUG); avcodec_register_all(); av_register_all(); }
bool GetSync() { if(m_Recording) return (double)(m_vframe/m_FPS) <= m_AudioStream.enc->frame_number*m_AudioStream.enc->frame_size/m_AudioStream.enc->sample_rate; }
private:
void fill_video_frame();
void read_rgb_from_gl();

View file

@ -932,10 +932,6 @@ int CDemoPlayer::Update(bool RealTime)
break;
// do one more tick
#if defined(CONF_VIDEORECORDER)
if(IVideo::Current())
IVideo::Current()->SetBreak((double)m_Info.m_Info.m_Speed);
#endif
DoTick();
if(m_Info.m_Info.m_Paused)

View file

@ -17,7 +17,6 @@ public:
virtual void nextAudioFrame(void (*Mix)(short *pFinalOut, unsigned Frames)) = 0;
virtual void nextAudioFrame_timeline() = 0;
virtual bool GetSync() = 0;
static IVideo* Current() { return ms_pCurrentVideo; }
@ -27,9 +26,6 @@ public:
static void SetLocalStartTime(int64 LocalStartTime) { ms_LocalStartTime = LocalStartTime; }
static void SetFPS(int fps) { ms_TickTime = time_freq() / fps; }
void SetBreak(double Speed) { m_Break += 4.0/Speed; } // I think this 4 is related to `Len/2/2` in `Mix` function of /expand/teeworlds/demo/video_3/src/engine/client/sound.cpp
double GetBreak() { return m_Break; }
protected:
static IVideo* ms_pCurrentVideo;
static int64 ms_Time;