OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loudness.hpp
Go to the documentation of this file.
1 #ifndef GAME_SOUND_LOUDNESS_H
2 #define GAME_SOUND_LOUDNESS_H
3 
4 #include <vector>
5 #include <deque>
6 
7 #include "sound_decoder.hpp"
8 
9 namespace MWSound
10 {
11 
17 
18  // Loudness sample info
19  std::vector<float> mSamples;
20 
21  std::deque<char> mQueue;
22 
23 public:
30  Sound_Loudness(float samplesPerSecond, int sampleRate, ChannelConfig chans, SampleType type)
31  : mSamplesPerSec(samplesPerSecond)
32  , mSampleRate(sampleRate)
33  , mChannelConfig(chans)
34  , mSampleType(type)
35  { }
36 
47  void analyzeLoudness(const std::vector<char>& data);
48 
52  float getLoudnessAtTime(float sec) const;
53 };
54 
55 }
56 
57 #endif /* GAME_SOUND_LOUDNESS_H */
void analyzeLoudness(const std::vector< char > &data)
Definition: loudness.cpp:11
SampleType
Definition: sound_decoder.hpp:14
Sound_Loudness(float samplesPerSecond, int sampleRate, ChannelConfig chans, SampleType type)
Definition: loudness.hpp:30
std::vector< float > mSamples
Definition: loudness.hpp:19
std::deque< char > mQueue
Definition: loudness.hpp:21
int mSampleRate
Definition: loudness.hpp:14
ChannelConfig mChannelConfig
Definition: loudness.hpp:15
SampleType mSampleType
Definition: loudness.hpp:16
float getLoudnessAtTime(float sec) const
Definition: loudness.cpp:61
float mSamplesPerSec
Definition: loudness.hpp:13
Definition: loudness.hpp:12
ChannelConfig
Definition: sound_decoder.hpp:21