修订版 | 89cacb6e50963fc83955146fcae43ea90dd7d9bf (tree) |
---|---|
时间 | 2021-09-26 23:59:19 |
作者 | yyagi <yyagi.dtxmania@gmai...> |
Commiter | yyagi |
#XXXXX 動画再生開始時のカクツキ軽減
@@ -6,6 +6,7 @@ using SharpDX; | ||
6 | 6 | using SharpDX.Direct3D9; |
7 | 7 | using FDK; |
8 | 8 | using System.Diagnostics; |
9 | +using System.Threading.Tasks; | |
9 | 10 | |
10 | 11 | namespace DTXMania |
11 | 12 | { |
@@ -149,6 +150,7 @@ namespace DTXMania | ||
149 | 150 | } |
150 | 151 | } |
151 | 152 | |
153 | + | |
152 | 154 | public void Start(EChannel nチャンネル番号, CDTX.CAVI rAVI, int n開始サイズW, int n開始サイズH, int n終了サイズW, int n終了サイズH, int n画像側開始位置X, int n画像側開始位置Y, int n画像側終了位置X, int n画像側終了位置Y, int n表示側開始位置X, int n表示側開始位置Y, int n表示側終了位置X, int n表示側終了位置Y, int n総移動時間ms, int n移動開始時刻ms, bool bPlayFromBeginning = false) |
153 | 155 | { |
154 | 156 | if (nチャンネル番号 == EChannel.Movie || nチャンネル番号 == EChannel.MovieFull) |
@@ -169,11 +171,14 @@ namespace DTXMania | ||
169 | 171 | this.n総移動時間ms = n総移動時間ms; |
170 | 172 | this.PrepareProperSizeTexture((int)this.rAVI.avi.nフレーム幅, (int)this.rAVI.avi.nフレーム高さ); |
171 | 173 | this.n移動開始時刻ms = (n移動開始時刻ms != -1) ? n移動開始時刻ms : CSound管理.rc演奏用タイマ.n現在時刻; |
172 | - if (bPlayFromBeginning) // DTXCで途中から再生した後、最初から再生すると、動画が最初から再生されず最初の途中再生の続きから再生されてしまう問題の修正 | |
174 | + Task.Run(() => // 再生開始時のカクツキ回避 | |
173 | 175 | { |
174 | - this.rAVI.avi.Seek(0); | |
175 | - } | |
176 | - this.rAVI.avi.Run(); | |
176 | + if (bPlayFromBeginning) // DTXCで途中から再生した後、最初から再生すると、動画が最初から再生されず最初の途中再生の続きから再生されてしまう問題の修正 | |
177 | + { | |
178 | + this.rAVI.avi.Seek(0); | |
179 | + } | |
180 | + this.rAVI.avi.Run(); | |
181 | + }); | |
177 | 182 | } |
178 | 183 | } |
179 | 184 | public void SkipStart(int n移動開始時刻ms) |