mirror of https://github.com/odrling/Aegisub
Added a simple audio resync method for video playback
Originally committed to SVN as r84.
This commit is contained in:
parent
62f94c5a6c
commit
37ec3a7058
|
@ -107,12 +107,6 @@ private:
|
||||||
void GetKaraokePos(__int64 &start,__int64 &end,bool cap);
|
void GetKaraokePos(__int64 &start,__int64 &end,bool cap);
|
||||||
void UpdatePosition(int pos,bool IsSample=false);
|
void UpdatePosition(int pos,bool IsSample=false);
|
||||||
|
|
||||||
int GetMSAtX(__int64 x);
|
|
||||||
int GetXAtMS(__int64 ms);
|
|
||||||
int GetMSAtSample(__int64 x);
|
|
||||||
__int64 GetSampleAtMS(__int64 ms);
|
|
||||||
int GetSyllableAtX(int x);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool NeedCommit;
|
bool NeedCommit;
|
||||||
bool loaded;
|
bool loaded;
|
||||||
|
@ -135,9 +129,15 @@ public:
|
||||||
void SetFile(wxString file);
|
void SetFile(wxString file);
|
||||||
void SetFromVideo();
|
void SetFromVideo();
|
||||||
void UpdateScrollbar();
|
void UpdateScrollbar();
|
||||||
|
void SetDialogue(SubtitlesGrid *_grid=NULL,AssDialogue *diag=NULL,int n=-1);
|
||||||
|
|
||||||
__int64 GetSampleAtX(int x);
|
__int64 GetSampleAtX(int x);
|
||||||
int GetXAtSample(__int64 n);
|
int GetXAtSample(__int64 n);
|
||||||
void SetDialogue(SubtitlesGrid *_grid=NULL,AssDialogue *diag=NULL,int n=-1);
|
int GetMSAtX(__int64 x);
|
||||||
|
int GetXAtMS(__int64 ms);
|
||||||
|
int GetMSAtSample(__int64 x);
|
||||||
|
__int64 GetSampleAtMS(__int64 ms);
|
||||||
|
int GetSyllableAtX(int x);
|
||||||
|
|
||||||
void MakeDialogueVisible(bool force=false);
|
void MakeDialogueVisible(bool force=false);
|
||||||
void CommitChanges();
|
void CommitChanges();
|
||||||
|
|
|
@ -32,6 +32,7 @@ Please visit http://aegisub.net to download latest version
|
||||||
- Implemented Redo (AMZ)
|
- Implemented Redo (AMZ)
|
||||||
- Fonts collector will now default collection to same folder as script (Set to "?script" on config.dat) (AMZ)
|
- Fonts collector will now default collection to same folder as script (Set to "?script" on config.dat) (AMZ)
|
||||||
- Alt+Left/Right on the video seek bar will now seek by increments of 10 frames (increment is customizeable in config.dat) (AMZ)
|
- Alt+Left/Right on the video seek bar will now seek by increments of 10 frames (increment is customizeable in config.dat) (AMZ)
|
||||||
|
- Added a simple audio resync method for video playback (AMZ)
|
||||||
|
|
||||||
|
|
||||||
= 1.09 beta - 2006.01.16 ===========================
|
= 1.09 beta - 2006.01.16 ===========================
|
||||||
|
|
|
@ -836,4 +836,11 @@ void VideoDisplay::OnPlayTimer(wxTimerEvent &event) {
|
||||||
// Jump to next frame
|
// Jump to next frame
|
||||||
PlayNextFrame = nextFrame;
|
PlayNextFrame = nextFrame;
|
||||||
JumpToFrame(nextFrame);
|
JumpToFrame(nextFrame);
|
||||||
|
|
||||||
|
// Sync audio
|
||||||
|
if (nextFrame % 25 == 0) {
|
||||||
|
__int64 audPos = audio->GetSampleAtMS(VFR_Output.GetTimeAtFrame(nextFrame));
|
||||||
|
audio->provider->playPos = audPos;
|
||||||
|
audio->provider->realPlayPos = audPos;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue