diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-03 17:20:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-03 17:20:35 +0200 |
commit | 4870d0c148eb49ffeb5482ae55d9cc4c9cc89786 (patch) | |
tree | 0009fbe559e7e38b1cb30b7095930cfce267a83c /src/faad_decoder.hpp | |
parent | 777ef8b852aab3e95859b9042ddffb09818b28d2 (diff) | |
download | etisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.tar.gz etisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.tar.bz2 etisnoop-4870d0c148eb49ffeb5482ae55d9cc4c9cc89786.zip |
Measure audio levels, add ensemble database WIP
Diffstat (limited to 'src/faad_decoder.hpp')
-rw-r--r-- | src/faad_decoder.hpp | 19 |
1 files changed, 17 insertions, 2 deletions
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<std::vector<uint8_t> > 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; |