Amuse
AudioGroup.hpp
1 #ifndef __AMUSE_AUDIOGROUP_HPP__
2 #define __AMUSE_AUDIOGROUP_HPP__
3 
4 #include "AudioGroupPool.hpp"
5 #include "AudioGroupProject.hpp"
6 #include "AudioGroupSampleDirectory.hpp"
7 
8 namespace amuse
9 {
10 class AudioGroupData;
11 
12 using Sample = std::pair<AudioGroupSampleDirectory::Entry,
13  AudioGroupSampleDirectory::ADPCMParms>;
14 
17 {
18  AudioGroupProject m_proj;
19  AudioGroupPool m_pool;
21  const unsigned char* m_samp;
22  bool m_valid;
23 public:
24  operator bool() const {return m_valid;}
25  AudioGroup(const AudioGroupData& data);
26 
27  const Sample* getSample(int sfxId) const;
28  const unsigned char* getSampleData(uint32_t offset) const;
29  const AudioGroupProject& getProj() const {return m_proj;}
30  const AudioGroupPool& getPool() const {return m_pool;}
31 };
32 
33 }
34 
35 #endif // __AMUSE_AUDIOGROUP_HPP__