Main Page · Modules · All Classes · Class Hierarchy
MASoundBase.hpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #pragma once
23 
24 #include <boost/shared_ptr.hpp>
25 
26 #include <stdint.h>
27 #include <string>
28 
29 class MASoundBase;
30 
36 namespace MA
37 {
39 typedef boost::shared_ptr<MASoundBase> SoundBaseSPtr;
40 }
41 
46 {
47 public:
48 
56  explicit MASoundBase(const std::string& display_name);
57  virtual ~MASoundBase();
58 
66  virtual int GetSize() const = 0;
67 
75  std::string GetDisplayName() const;
76 
84  bool IsEffect() const;
85 
93  virtual bool IsValid() const = 0;
94 
102  virtual bool IsCached() const = 0;
103 
113  virtual void AddToBuffer(int position, int count, int32_t* buffer) = 0;
114 
115 private:
117  std::string DisplayName;
119  bool Effect;
120 };
121 
bool Effect
Whether the sound is an effect.
Base class for sounds.
Definition: MASoundBase.hpp:45
std::string DisplayName
Display name.