mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Normalize API rename part 2
This commit is contained in:
parent
b64dcac17e
commit
8c944c08ea
8 changed files with 16 additions and 16 deletions
|
|
@ -406,12 +406,12 @@ ExportDialog::progress_timeout ()
|
|||
case ExportStatus::Normalizing:
|
||||
status_text = string_compose (_("Normalizing '%3' (timespan %1 of %2)"),
|
||||
status->timespan, status->total_timespans, status->timespan_name);
|
||||
progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
|
||||
progress = ((float) status->current_postprocessing_cycle) / status->total_postprocessing_cycles;
|
||||
break;
|
||||
case ExportStatus::Encoding:
|
||||
status_text = string_compose (_("Encoding '%3' (timespan %1 of %2)"),
|
||||
status->timespan, status->total_timespans, status->timespan_name);
|
||||
progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
|
||||
progress = ((float) status->current_postprocessing_cycle) / status->total_postprocessing_cycles;
|
||||
break;
|
||||
case ExportStatus::Tagging:
|
||||
status_text = string_compose (_("Tagging '%3' (timespan %1 of %2)"),
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ ExportVideoDialog::audio_progress_display ()
|
|||
switch (status->active_job) {
|
||||
case ExportStatus::Normalizing:
|
||||
pbar.set_text (_("Normalizing audio"));
|
||||
progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
|
||||
progress = ((float) status->current_postprocessing_cycle) / status->total_postprocessing_cycles;
|
||||
progress = progress / (_twopass ? 4.0 : 3.0) + (_twopass ? .25 : 1.0 / 3.0);
|
||||
break;
|
||||
case ExportStatus::Exporting:
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class LIBARDOUR_API ExportGraphBuilder
|
|||
bool post_process (); // returns true when finished
|
||||
bool need_postprocessing () const { return !intermediates.empty(); }
|
||||
bool realtime() const { return _realtime; }
|
||||
unsigned get_normalize_cycle_count() const;
|
||||
unsigned get_postprocessing_cycle_count() const;
|
||||
|
||||
void reset ();
|
||||
void cleanup (bool remove_out_files = false);
|
||||
|
|
@ -155,7 +155,7 @@ class LIBARDOUR_API ExportGraphBuilder
|
|||
void remove_children (bool remove_out_files);
|
||||
bool operator== (FileSpec const & other_config) const;
|
||||
|
||||
unsigned get_normalize_cycle_count() const;
|
||||
unsigned get_postprocessing_cycle_count() const;
|
||||
|
||||
/// Returns true when finished
|
||||
bool process ();
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ class LIBARDOUR_API ExportStatus {
|
|||
volatile framecnt_t total_frames_current_timespan;
|
||||
volatile framecnt_t processed_frames_current_timespan;
|
||||
|
||||
volatile uint32_t total_normalize_cycles;
|
||||
volatile uint32_t current_normalize_cycle;
|
||||
volatile uint32_t total_postprocessing_cycles;
|
||||
volatile uint32_t current_postprocessing_cycle;
|
||||
|
||||
AnalysisResults result_map;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ ExportGraphBuilder::post_process ()
|
|||
}
|
||||
|
||||
unsigned
|
||||
ExportGraphBuilder::get_normalize_cycle_count() const
|
||||
ExportGraphBuilder::get_postprocessing_cycle_count() const
|
||||
{
|
||||
unsigned max = 0;
|
||||
for (std::list<Intermediate *>::const_iterator it = intermediates.begin(); it != intermediates.end(); ++it) {
|
||||
max = std::max(max, (*it)->get_normalize_cycle_count());
|
||||
max = std::max(max, (*it)->get_postprocessing_cycle_count());
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
|
@ -516,7 +516,7 @@ ExportGraphBuilder::Intermediate::operator== (FileSpec const & other_config) con
|
|||
}
|
||||
|
||||
unsigned
|
||||
ExportGraphBuilder::Intermediate::get_normalize_cycle_count() const
|
||||
ExportGraphBuilder::Intermediate::get_postprocessing_cycle_count() const
|
||||
{
|
||||
return static_cast<unsigned>(std::ceil(static_cast<float>(tmp_file->get_frames_written()) /
|
||||
max_frames_out));
|
||||
|
|
|
|||
|
|
@ -275,8 +275,8 @@ ExportHandler::process_timespan (framecnt_t frames)
|
|||
if (last_cycle) {
|
||||
post_processing = graph_builder->need_postprocessing ();
|
||||
if (post_processing) {
|
||||
export_status->total_normalize_cycles = graph_builder->get_normalize_cycle_count();
|
||||
export_status->current_normalize_cycle = 0;
|
||||
export_status->total_postprocessing_cycles = graph_builder->get_postprocessing_cycle_count();
|
||||
export_status->current_postprocessing_cycle = 0;
|
||||
} else {
|
||||
finish_timespan ();
|
||||
return 0;
|
||||
|
|
@ -300,7 +300,7 @@ ExportHandler::post_process ()
|
|||
}
|
||||
}
|
||||
|
||||
export_status->current_normalize_cycle++;
|
||||
export_status->current_postprocessing_cycle++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ ExportStatus::init ()
|
|||
total_frames_current_timespan = 0;
|
||||
processed_frames_current_timespan = 0;
|
||||
|
||||
total_normalize_cycles = 0;
|
||||
current_normalize_cycle = 0;
|
||||
total_postprocessing_cycles = 0;
|
||||
current_postprocessing_cycle = 0;
|
||||
result_map.clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ static int export_session (Session *session,
|
|||
double progress = 0.0;
|
||||
switch (status->active_job) {
|
||||
case ExportStatus::Normalizing:
|
||||
progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
|
||||
progress = ((float) status->current_postprocessing_cycle) / status->total_postprocessing_cycles;
|
||||
printf ("* Normalizing %.1f%% \r", 100. * progress); fflush (stdout);
|
||||
break;
|
||||
case ExportStatus::Exporting:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue