[3060] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
[5896] | 23 | * Reto Grieder |
---|
[6069] | 24 | * Kevin Young |
---|
[3060] | 25 | * Co-authors: |
---|
| 26 | * ... |
---|
| 27 | * |
---|
| 28 | */ |
---|
[6069] | 29 | |
---|
[5896] | 30 | #ifndef _AmbientSound_H__ |
---|
| 31 | #define _AmbientSound_H__ |
---|
[3060] | 32 | |
---|
| 33 | #include "OrxonoxPrereqs.h" |
---|
| 34 | |
---|
[5896] | 35 | #include "core/BaseObject.h" |
---|
| 36 | #include "sound/BaseSound.h" |
---|
| 37 | |
---|
[3060] | 38 | namespace orxonox |
---|
| 39 | { |
---|
| 40 | /** |
---|
[5896] | 41 | * The AmbientSound class is the base class for all sound file loader classes. |
---|
[3060] | 42 | * It server as main interface to the OpenAL library. |
---|
| 43 | * |
---|
| 44 | */ |
---|
[5896] | 45 | class _OrxonoxExport AmbientSound : public BaseSound, public BaseObject |
---|
[3060] | 46 | { |
---|
[6069] | 47 | friend class SoundManager; |
---|
| 48 | |
---|
[3060] | 49 | public: |
---|
[5896] | 50 | AmbientSound(BaseObject* creator); |
---|
| 51 | virtual ~AmbientSound(); |
---|
[3060] | 52 | |
---|
[6069] | 53 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
| 54 | virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); |
---|
| 55 | virtual void changedActivity(); |
---|
| 56 | |
---|
[5982] | 57 | virtual void play(); |
---|
| 58 | virtual void stop(); |
---|
[6069] | 59 | virtual void pause(); |
---|
[5982] | 60 | |
---|
[6071] | 61 | virtual void setAmbientSource(const std::string& source); |
---|
| 62 | const std::string& getAmbientSource() const { return this->ambientSource_; } |
---|
[6031] | 63 | |
---|
[3060] | 64 | private: |
---|
[6071] | 65 | void doPlay(); |
---|
[6069] | 66 | void doStop(); |
---|
| 67 | void doPause(); |
---|
[6071] | 68 | |
---|
| 69 | std::string ambientSource_; //!< Analogous to source_, but mood independent |
---|
[5896] | 70 | }; |
---|
| 71 | } |
---|
[3060] | 72 | |
---|
[5896] | 73 | #endif /* _AmbientSound_H__ */ |
---|