From 4870d0c148eb49ffeb5482ae55d9cc4c9cc89786 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 3 Jul 2017 17:20:35 +0200 Subject: Measure audio levels, add ensemble database WIP --- src/faad_decoder.hpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/faad_decoder.hpp') diff --git a/src/faad_decoder.hpp b/src/faad_decoder.hpp index 470f905..e154619 100644 --- a/src/faad_decoder.hpp +++ b/src/faad_decoder.hpp @@ -61,24 +61,39 @@ class FaadHandle NeAACDecHandle decoder; }; +struct audio_statistics_t { + int16_t average_level_left; + int16_t average_level_right; + + int16_t peak_level_left; + int16_t peak_level_right; +}; + class FaadDecoder { public: FaadDecoder(); + ~FaadDecoder(); + FaadDecoder& operator=(FaadDecoder&& other); + FaadDecoder(FaadDecoder&& other); + FaadDecoder(const FaadDecoder&) = delete; + FaadDecoder& operator=(const FaadDecoder&) = delete; void open(std::string filename, bool ps_flag, bool aac_channel_mode, bool dac_rate, bool sbr_flag, int mpeg_surround_config); - void close(void); - bool decode(std::vector > aus); bool is_initialised(void) { return m_initialised; } + audio_statistics_t get_audio_statistics(void) const; + private: int get_aac_channel_configuration(); size_t m_data_len; + audio_statistics_t m_stats; + std::string m_filename; FILE* m_fd; -- cgit v1.2.3