DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::OfflineLeveler< T > Class Template Referencefinal

Complete-file automatic upward leveling, with reusable immutable plans. More...

#include <OfflineLeveler.h>

Classes

struct  Options
 Principal amount plus optional expert controls and protected regions. More...
 
class  Plan
 Immutable source-bound linear-amplitude automation, with int64 lookup. More...
 
struct  PlanResult
 Completed plan or explicit failure, never an old/stale plan. More...
 
struct  Report
 Plan range and final render peaks. Silence peaks are -infinity dB. More...
 
struct  Result
 Render result, measurements, and the operation's requested dynamic payload. More...
 

Public Types

enum class  Reason : std::uint8_t {
  Leveled , BoostLimited , RepresentabilityLimited , ZeroAmount ,
  BoostDisabled , NoActivity , AllExcluded , NoCorrection
}
 Why the computed plan changed, limited, or left the source alone. More...
 

Public Member Functions

PlanResult makePlan (const typename OfflineEnergyAnalyzer< T >::Analysis &analysis, const Options &options={}, const OfflineJobOptions &jobOptions={}) const
 Builds/rebuilds a plan from reusable energy features without reading PCM.
 
PlanResult analyze (OfflineAudioSource< T > &source, const Options &options={}, const OfflineJobOptions &job={}) const
 Complete analysis plus planning; only the compact gain plan is retained.
 
Result render (OfflineAudioSource< T > &source, const Plan &plan, OfflineAudioSink< T > &sink, const OfflineJobOptions &options={}) const
 Verifies a source-bound plan, then renders transactionally to a sink.
 
template<int MaxChannels>
Result run (const AudioBuffer< T, MaxChannels > &input, AudioBuffer< T, MaxChannels > &output, double sampleRate, const Options &options={}, const OfflineJobOptions &job={}) const
 Convenience complete-file owning render; input and output may be the same buffer.
 

Detailed Description

template<FloatType T>
class dspark::OfflineLeveler< T >

Complete-file automatic upward leveling, with reusable immutable plans.

Definition at line 55 of file OfflineLeveler.h.

Member Enumeration Documentation

◆ Reason

template<FloatType T>
enum class dspark::OfflineLeveler::Reason : std::uint8_t
strong

Why the computed plan changed, limited, or left the source alone.

Enumerator
Leveled 
BoostLimited 
RepresentabilityLimited 
ZeroAmount 
BoostDisabled 
NoActivity 
AllExcluded 
NoCorrection 

Definition at line 68 of file OfflineLeveler.h.

Member Function Documentation

◆ analyze()

template<FloatType T>
PlanResult dspark::OfflineLeveler< T >::analyze ( OfflineAudioSource< T > &  source,
const Options &  options = {},
const OfflineJobOptions &  job = {} 
) const
inline

Complete analysis plus planning; only the compact gain plan is retained.

Definition at line 432 of file OfflineLeveler.h.

◆ makePlan()

template<FloatType T>
PlanResult dspark::OfflineLeveler< T >::makePlan ( const typename OfflineEnergyAnalyzer< T >::Analysis &  analysis,
const Options &  options = {},
const OfflineJobOptions &  jobOptions = {} 
) const
inline

Builds/rebuilds a plan from reusable energy features without reading PCM.

Definition at line 177 of file OfflineLeveler.h.

◆ render()

template<FloatType T>
Result dspark::OfflineLeveler< T >::render ( OfflineAudioSource< T > &  source,
const Plan &  plan,
OfflineAudioSink< T > &  sink,
const OfflineJobOptions &  options = {} 
) const
inline

Verifies a source-bound plan, then renders transactionally to a sink.

Complete-source product maps serve calibration, measurement and provisional PCM. Every repeated PCM block read is checked against its preflight fingerprint. Output measurement and provisional writes share a pass; failures abort the sink. Progress cancellation is checked before commit; a successful commit is final.

Definition at line 465 of file OfflineLeveler.h.

◆ run()

template<FloatType T>
template<int MaxChannels>
Result dspark::OfflineLeveler< T >::run ( const AudioBuffer< T, MaxChannels > &  input,
AudioBuffer< T, MaxChannels > &  output,
double  sampleRate,
const Options &  options = {},
const OfflineJobOptions &  job = {} 
) const
inline

Convenience complete-file owning render; input and output may be the same buffer.

Output changes only on success. Allocates one candidate output; use the source/plan/sink interface to stage very long renders without resident PCM.

Definition at line 495 of file OfflineLeveler.h.


The documentation for this class was generated from the following file: