foobar2000 SDK  2015-08-03
replaygain_scanner.h
Go to the documentation of this file.
1 class replaygain_result : public service_base {
4 public:
6  virtual float get_gain() = 0;
8  virtual float get_peak() = 0;
11  virtual replaygain_result::ptr merge(replaygain_result::ptr other) = 0;
12 
14  replaygain_info ret = replaygain_info_invalid; ret.m_track_gain = this->get_gain(); ret.m_track_peak = this->get_peak(); return ret;
15  }
16 };
17 
23 public:
26  virtual void process_chunk(const audio_chunk & chunk) = 0;
29  virtual replaygain_result::ptr finalize() = 0;
30 };
31 
32 
37  FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(replaygain_scanner_entry);
38 public:
40  virtual replaygain_scanner::ptr instantiate() = 0;
41 };
virtual float get_peak()=0
Retrieves the peak value, normalized to 0..1 range (audio_sample value).
float m_track_gain
Definition: file_info.h:4
Interface to container of a chunk of audio data. See audio_chunk_impl for an implementation.
Definition: audio_chunk.h:5
virtual float get_gain()=0
Retrieves the gain value, in dB.
Instance of a ReplayGain scanner. Use static_api_ptr_t<replaygain_scanner_entry>()->instantiate() to...
static const replaygain_info replaygain_info_invalid
Definition: file_info.h:69
Structure containing ReplayGain scan results from some playable object, also providing various helper...
Definition: file_info.h:2
virtual replaygain_result::ptr merge(replaygain_result::ptr other)=0
Merges ReplayGain scan results from different tracks. Merge results from all tracks in an album to ge...
Entrypoint class for instantiating replaygain_scanner objects. Use static_api_ptr_t<replaygain_scanne...
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Definition: service.h:333
FB2K_MAKE_SERVICE_INTERFACE(replaygain_result, service_base)
replaygain_info make_track_info()
Container of ReplayGain scan results from one or more tracks.
float m_track_peak
Definition: file_info.h:5