MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / PlayLine

Method PlayLine

src/video_controller.cpp:151–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void VideoController::PlayLine() {
152 Stop();
153
154 AssDialogue *curline = context->selectionController->GetActiveLine();
155 if (!curline) return;
156
157 context->audioController->PlayRange(TimeRange(curline->Start, curline->End));
158
159 // Round-trip conversion to convert start to exact
160 int startFrame = FrameAtTime(context->selectionController->GetActiveLine()->Start, agi::vfr::START);
161 start_ms = TimeAtFrame(startFrame);
162 end_frame = FrameAtTime(context->selectionController->GetActiveLine()->End, agi::vfr::END) + 1;
163
164 JumpToFrame(startFrame);
165
166 playback_start_time = std::chrono::steady_clock::now();
167 playback.Start(10);
168}
169
170void VideoController::Stop() {
171 if (IsPlaying()) {

Callers 3

OnPlayVideoButtonMethod · 0.80
OnPlayVideoButtonMethod · 0.80
video_play_lineClass · 0.80

Calls 3

GetActiveLineMethod · 0.80
PlayRangeMethod · 0.80
TimeRangeClass · 0.70

Tested by

no test coverage detected