Commit Graph

62 Commits

Author SHA1 Message Date
Thomas Goyne a99428c49d Extract options and MRU stuff from main.h
Nearly all of the files including main.h are doing so only for OPT_GET
and friends, which are rather unrelated to the main things that main.h
declares.
2013-01-09 16:48:31 -08:00
Thomas Goyne 96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne e77e810bd8 Use emplace_back where applicable 2012-11-30 10:44:09 -08:00
Thomas Goyne 67df64e879 Use range-based for loops in a bunch of places 2012-11-12 18:35:25 -08:00
Thomas Goyne ebd56f2163 Include cstdint rather than stdint.h 2012-11-10 18:05:57 -08:00
Thomas Goyne 0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne 83761d881a Convert AssFile::Line to an intrusive list
Gives O(1) pointer -> iterator conversions, better memory usage, better
performance, and overall slightly simplifies the code using it.
2012-11-10 18:05:56 -08:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne e4a6092b36 Use signals for selection change notifications 2012-10-12 14:54:07 -07:00
Thomas Goyne 44468fbd3d Add "audio/play/line" command 2012-10-04 16:48:35 -07:00
Thomas Goyne 38217c6c59 Implement the timing adjustment commands
Originally committed to SVN as r6933.
2012-07-14 13:35:15 +00:00
Thomas Goyne 60c38bd2e5 Fix potential crash when deleting lines with audio open
Don't assume that the active line is valid in RegenerateInactiveLines,
as it may get called by the commit signal before the selection is
updated when the active line is deleted.

Closes #1502.

Originally committed to SVN as r6932.
2012-07-08 23:22:27 +00:00
Thomas Goyne 7ab4f85211 Stop audio undo coalescing when swtiching between lines
Originally committed to SVN as r6811.
2012-05-16 14:23:10 +00:00
Thomas Goyne 70abaf75d7 Don't cache the selection in the dialogue timing controller, as getting it isn't very expensive and it was used in a stale state when the active line changed
Originally committed to SVN as r6751.
2012-05-05 02:10:57 +00:00
Thomas Goyne 479de87068 Leave the selected range in the audio display unchanged when switching to an untimed line as 2.1.x did
Originally committed to SVN as r6748.
2012-05-04 02:53:03 +00:00
Thomas Goyne b275399fb1 Add option to draw lines at each second in the audio display
Originally committed to SVN as r6721.
2012-04-27 19:07:29 +00:00
Thomas Goyne 99a65974e4 Move the Next Line on Commit logic to the commit command so that other commands can do different things
Originally committed to SVN as r6718.
2012-04-27 19:07:07 +00:00
Thomas Goyne 0da9a4f111 Add option to disable the new behavior where left-click-drag sets the start marker then drags the end marker
Originally committed to SVN as r6694.
2012-04-12 00:04:31 +00:00
Thomas Goyne 6e36a897d0 Don't allow dragging audio markers to negative times
As ASS doesn't support negative times, some of the other code assumes
that times are >= 0, and it's never actually useful to have a negative
start time.

Originally committed to SVN as r6623.
2012-03-27 23:15:20 +00:00
Thomas Goyne 4a151ca995 Set all selected lines on clicks in dialogue mode rather than just the active line
Originally committed to SVN as r6573.
2012-03-12 00:07:33 +00:00
Thomas Goyne dcffc3fd38 Show all selected lines in the audio display in dialogue mode
Originally committed to SVN as r6572.
2012-03-12 00:07:27 +00:00
Thomas Goyne d5577b994c Move lead in/out logic to the timing controllers
This makes adding lead in/out work correctly when autocommit is
disabled, and improves the behavior of adding lead-in when in karaoke
mode.

Originally committed to SVN as r6502.
2012-02-22 22:00:54 +00:00
Thomas Goyne 72ee3efdc3 Rename the audio rendering style enum values to reflect how they're actually used
Originally committed to SVN as r6483.
2012-02-17 00:14:45 +00:00
Thomas Goyne 30e1679a78 Create a new line when committing the last line via the audio display when Next Line on Commit is enabled, as in 2.1.x
Originally committed to SVN as r6462.
2012-02-10 00:04:34 +00:00
Thomas Goyne 47cf5c8629 Support dragging multiple markers at once in the dialogue timing controller
When ctrl is held down and the user clicks on one of the active line's
markers, all markers at the same position as the clicked marker (for
both active and inactive lines) are now moved along with the clicked
marker.

Closes #20.

Originally committed to SVN as r6461.
2012-02-10 00:04:24 +00:00
Thomas Goyne 32c8cc0974 Modify the TimingController interface to support dragging more than one marker at once. Updates #20.
Originally committed to SVN as r6460.
2012-02-10 00:04:13 +00:00
Thomas Goyne 7ca0ad3233 Repaint the entire audio display when style ranges change
In practice, painting audio from the cache isn't all that expensive, so
the limited refreshing was just introducing places for bugs without
improving performance all that much.

Closes #1432.

Originally committed to SVN as r6439.
2012-02-02 22:57:53 +00:00
Thomas Goyne 3d6e5e7d39 Fix incorrect styling of overlapping inactive lines
Originally committed to SVN as r6428.
2012-02-01 23:59:23 +00:00
Thomas Goyne aaf7285a6e Remove UI-related responsibilities from AudioController
Keeping track of audio markers and labels to be shown in the audio
display is not particularly related to AudioController's primary
responsiblity of controlling the playback of audio.

Originally committed to SVN as r6427.
2012-02-01 23:59:12 +00:00
Thomas Goyne 01b92aa4e3 Change AudioController's public API from samples to milliseconds
The sample rate of the currently open audio is not something that things
which do not interact with the raw audio data should have to care about,
or even know about.

Originally committed to SVN as r6426.
2012-02-01 23:58:58 +00:00
Thomas Goyne 3ec9514636 Fix bogus inactive line markers for the previous line when the first dialogue line is active
Originally committed to SVN as r6291.
2012-01-13 20:59:48 +00:00
Thomas Goyne 695559d403 Add missing parentheses that resulted in repainting issues in the audio display with inactive lines disabled
Originally committed to SVN as r6281.
2012-01-12 22:32:28 +00:00
Thomas Goyne 237193a4bb Add option to only show non-comment inactive dialogue lines in the audio display. Closes #1386.
Originally committed to SVN as r6264.
2012-01-10 20:03:31 +00:00
Thomas Goyne d451cf3e9c Add option to show the previous and next inactive lines in the audio display in addition to previous, all or none. Updates #1386.
Originally committed to SVN as r6260.
2012-01-10 01:16:39 +00:00
Thomas Goyne f4c8bf429b Remove AudioTimingController::HasLabels as the rewritten audio display doesn't need it
Originally committed to SVN as r6253.
2012-01-08 01:37:12 +00:00
Thomas Goyne 6f7836c11e Paint keyframe markers on top of line markers so that they don't vanish when lines are scenetimed
Originally committed to SVN as r6239.
2012-01-08 01:35:25 +00:00
Thomas Goyne 58c7bbd78a Sort inactive markers so that lower_bound will actually work when lines are out of order or overlapping
Originally committed to SVN as r6238.
2012-01-08 01:35:18 +00:00
Thomas Goyne c84275d6fa Snap to markers in the audio display on click in addition to on drag
Originally committed to SVN as r6237.
2012-01-08 01:35:11 +00:00
Thomas Goyne 4dcb6240d4 Move audio marker snapping logic from the audio display to the dialogue timing controller
Originally committed to SVN as r6236.
2012-01-08 01:35:04 +00:00
Thomas Goyne 532072218f Allow snapping to the inactive line markers in the audio display
Originally committed to SVN as r6172.
2011-12-27 18:46:20 +00:00
Thomas Goyne 5cbd35e749 Simplify some AssTime-using code
Originally committed to SVN as r6124.
2011-12-22 21:29:09 +00:00
Thomas Goyne 71345af81a Overload operator int() on AssTime and remove GetMS/SetMS
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +00:00
Thomas Goyne 70fcece459 Don't create the audio timing controller until audio is actually opened
Originally committed to SVN as r5888.
2011-11-18 22:58:22 +00:00
Thomas Goyne 92e10c80a2 Add markers and styling ranges in the audio display for inactive lines. Closes #1327.
Originally committed to SVN as r5887.
2011-11-18 22:58:12 +00:00
Thomas Goyne 8d28b44773 Get audio styling ranges from the timing controller. Based on a patch by jfs.
Originally committed to SVN as r5878.
2011-11-18 22:56:45 +00:00
Thomas Goyne de03dfd8a8 Add an option to disable keyframes in the audio display only in karaoke mode. Closes #644.
Originally committed to SVN as r5860.
2011-11-16 19:56:09 +00:00
Thomas Goyne 91a62836a5 Move the keyframe marker provider from the audio controller to the timing controllers
Originally committed to SVN as r5859.
2011-11-16 19:56:00 +00:00
Thomas Goyne d4e17dde2e Factor out the idea of a pen bound to options to a utility class
Originally committed to SVN as r5759.
2011-10-19 04:19:01 +00:00
Thomas Goyne d5c4a9bec6 Get line start and end marker colors in dialogue mode from options
Originally committed to SVN as r5687.
2011-09-30 20:40:44 +00:00
Thomas Goyne 156885b56d Make AudioTimingControllerDialogue operate on a project context
Originally committed to SVN as r5616.
2011-09-28 19:44:44 +00:00