Use std::chrono since it's a nicer API. Use a separate lock for playback
position so that the GUI thread isn't blocked for hundreds of ms while
snd_pcm_drain is waiting, and update the playback position after
decoding audio rather than before to avoid it being significantly wrong
when not using a cache.
If video was previously open and the user chooses to resample the script
for the new video, VideoController would try to update the subs for the
now-deleted old provider.
Fixes errors when trying to automatically open audio from dummy video
and improves UX a little by disabling the Open Audio From Video menu
item when there are no audio tracks.
Most of the dialogs in Aegisub have a public interface consisting of a
single function, so there's really no need to expose the actual dialog
classes to the rest of the program. Add dialogs.h with the declarations
of all of those functions (most of which are just ShowFooDialog()), and
kill a million other headers.
Remove it from the script info section and put it in its own section
that isn't tracked by undo and make it not stringly typed. Removes the
need for the gross hack where changes are slipped in just before saving
to circumvent the undo system, cuts down on the uses of string literals
to identify fields, and probably improves performance a little.
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
It is off by default on Windows due to that it breaks if a wx-using
library is loaded with LoadLibrary on XP, but that is not a use-case we
care about.
The shift from margins should be applied only to the line's position,
not to each point in the drawing, and the scale needs to compensate for
that the scale on the style is being changed as well.