forked from mia/Aegisub
Rename the audio rendering style enum values to reflect how they're actually used
Originally committed to SVN as r6483.
This commit is contained in:
parent
57b6a1f03a
commit
72ee3efdc3
8 changed files with 16 additions and 15 deletions
|
@ -57,8 +57,8 @@ AudioColorScheme::AudioColorScheme(int prec, std::string const& scheme_name, int
|
|||
{
|
||||
case AudioStyle_Normal: opt_base += "Normal/"; break;
|
||||
case AudioStyle_Inactive: opt_base += "Inactive/"; break;
|
||||
case AudioStyle_Active: opt_base += "Active/"; break;
|
||||
case AudioStyle_Selected: opt_base += "Selected/"; break;
|
||||
case AudioStyle_Selected: opt_base += "Active/"; break;
|
||||
case AudioStyle_Primary: opt_base += "Selected/"; break;
|
||||
default: throw agi::InternalError("Unknown audio rendering styling", 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
|
||||
AudioSpectrumRenderer::AudioSpectrumRenderer(std::string const& color_scheme_name)
|
||||
: colors_normal(new AudioColorScheme(12, color_scheme_name, AudioStyle_Normal))
|
||||
, colors_selected(new AudioColorScheme(12, color_scheme_name, AudioStyle_Selected))
|
||||
, colors_primary(new AudioColorScheme(12, color_scheme_name, AudioStyle_Primary))
|
||||
, colors_inactive(new AudioColorScheme(12, color_scheme_name, AudioStyle_Inactive))
|
||||
, derivation_size(8)
|
||||
, derivation_dist(8)
|
||||
|
@ -330,7 +330,7 @@ const AudioColorScheme *AudioSpectrumRenderer::GetColorScheme(AudioRenderingStyl
|
|||
{
|
||||
switch (style)
|
||||
{
|
||||
case AudioStyle_Selected: return colors_selected.get();
|
||||
case AudioStyle_Primary: return colors_primary.get();
|
||||
case AudioStyle_Inactive: return colors_inactive.get();
|
||||
default: return colors_normal.get();
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ class AudioSpectrumRenderer : public AudioRendererBitmapProvider {
|
|||
agi::scoped_ptr<AudioColorScheme> colors_normal;
|
||||
|
||||
/// Colour table used for rendering the audio selection
|
||||
agi::scoped_ptr<AudioColorScheme> colors_selected;
|
||||
agi::scoped_ptr<AudioColorScheme> colors_primary;
|
||||
|
||||
/// Colour table used for rendering inactive lines
|
||||
agi::scoped_ptr<AudioColorScheme> colors_inactive;
|
||||
|
|
|
@ -60,7 +60,7 @@ enum {
|
|||
|
||||
AudioWaveformRenderer::AudioWaveformRenderer(std::string const& color_scheme_name)
|
||||
: colors_normal(new AudioColorScheme(6, color_scheme_name, AudioStyle_Normal))
|
||||
, colors_selected(new AudioColorScheme(6, color_scheme_name, AudioStyle_Selected))
|
||||
, colors_primary(new AudioColorScheme(6, color_scheme_name, AudioStyle_Primary))
|
||||
, colors_inactive(new AudioColorScheme(6, color_scheme_name, AudioStyle_Inactive))
|
||||
, audio_buffer(0)
|
||||
, render_averages(OPT_GET("Audio/Display/Waveform Style")->GetInt() == Waveform_MaxAvg)
|
||||
|
@ -186,7 +186,7 @@ const AudioColorScheme *AudioWaveformRenderer::GetColorScheme(AudioRenderingStyl
|
|||
{
|
||||
switch (style)
|
||||
{
|
||||
case AudioStyle_Selected: return colors_selected.get();
|
||||
case AudioStyle_Primary: return colors_primary.get();
|
||||
case AudioStyle_Inactive: return colors_inactive.get();
|
||||
default: return colors_normal.get();
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class AudioWaveformRenderer : public AudioRendererBitmapProvider {
|
|||
agi::scoped_ptr<AudioColorScheme> colors_normal;
|
||||
|
||||
/// Colour table used for rendering the audio selection
|
||||
agi::scoped_ptr<AudioColorScheme> colors_selected;
|
||||
agi::scoped_ptr<AudioColorScheme> colors_primary;
|
||||
|
||||
/// Colour table used for rendering inactive lines
|
||||
agi::scoped_ptr<AudioColorScheme> colors_inactive;
|
||||
|
|
|
@ -32,17 +32,18 @@
|
|||
/// @brief Styles audio may be rendered in
|
||||
///
|
||||
/// The constants are ordered by priority:
|
||||
/// Selected has highest priority and should overlap active, which should
|
||||
/// Primary has highest priority and should overlap selected, which should
|
||||
/// overlap inactive, which should overlap normal regions.
|
||||
enum AudioRenderingStyle {
|
||||
/// Regular audio with no special properties
|
||||
AudioStyle_Normal,
|
||||
/// Audio belonging to objects that can not be manipulated currently
|
||||
/// Audio belonging to objects that are not part of the current selection
|
||||
AudioStyle_Inactive,
|
||||
/// Audio that may be manipulated indirectly, usually part of selected lines
|
||||
AudioStyle_Active,
|
||||
/// Primary selection for work, usually coinciding with the primary playback range
|
||||
/// Audio belonging to objects that are part of the current selection,
|
||||
/// but not the primary work rage
|
||||
AudioStyle_Selected,
|
||||
/// Primary selection for work, usually coinciding with the primary playback range
|
||||
AudioStyle_Primary,
|
||||
/// Number of audio styles
|
||||
AudioStyle_MAX
|
||||
};
|
||||
|
|
|
@ -393,7 +393,7 @@ AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
|
|||
: style_left("Colour/Audio Display/Line boundary Start", "Audio/Line Boundaries Thickness")
|
||||
, style_right("Colour/Audio Display/Line boundary End", "Audio/Line Boundaries Thickness")
|
||||
, style_inactive("Colour/Audio Display/Line Boundary Inactive Line", "Audio/Line Boundaries Thickness")
|
||||
, active_line(AudioStyle_Selected, &style_left, &style_right)
|
||||
, active_line(AudioStyle_Primary, &style_left, &style_right)
|
||||
, keyframes_provider(c, "Audio/Display/Draw/Keyframes in Dialogue Mode")
|
||||
, video_position_provider(c)
|
||||
, commit_id(-1)
|
||||
|
|
|
@ -213,7 +213,7 @@ void AudioTimingControllerKaraoke::Prev() {
|
|||
void AudioTimingControllerKaraoke::GetRenderingStyles(AudioRenderingStyleRanges &ranges) const
|
||||
{
|
||||
TimeRange sr = GetPrimaryPlaybackRange();
|
||||
ranges.AddRange(sr.begin(), sr.end(), AudioStyle_Selected);
|
||||
ranges.AddRange(sr.begin(), sr.end(), AudioStyle_Primary);
|
||||
}
|
||||
|
||||
TimeRange AudioTimingControllerKaraoke::GetPrimaryPlaybackRange() const {
|
||||
|
|
Loading…
Reference in a new issue