Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/sound3/src/orxonox/sound/AmbientSound.h @ 6046

Last change on this file since 6046 was 6046, checked in by youngk, 15 years ago

Made a big change to the sound system: Implemented cross-fading for multiple changing sources.
Compiles, however the game doesn't load sounds properly in the main menu and on entering a level.
It can load a sound via DistanceTrigger and fades in/out correctly, but second loading fails.

Please test.

  • Property svn:eol-style set to native
File size: 1.9 KB
RevLine 
[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
[3060]24 *   Co-authors:
25 *      ...
26 *
27 */
[5896]28#ifndef _AmbientSound_H__
29#define _AmbientSound_H__
[3060]30
31#include "OrxonoxPrereqs.h"
32
[5896]33#include "core/BaseObject.h"
34#include "sound/BaseSound.h"
35
[3060]36namespace orxonox
37{
38    /**
[5896]39     * The AmbientSound class is the base class for all sound file loader classes.
[3060]40     * It server as main interface to the OpenAL library.
41     *
42     */
[5896]43    class _OrxonoxExport AmbientSound : public BaseSound, public BaseObject
[3060]44    {
45    public:
[5896]46        AmbientSound(BaseObject* creator);
47        virtual ~AmbientSound();
[3060]48
[5982]49        virtual void play();
[6046]50        void replay();      // Continue playing without re-registering the sound
[5982]51        virtual void stop();
[6046]52        void doStop();
[5982]53
[6031]54        virtual void setSource(const std::string& source);
55
[5896]56        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
57        virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
[5982]58        virtual void changedActivity();
[3060]59
[5982]60
[3060]61    private:
[5896]62    };
63}
[3060]64
[5896]65#endif /* _AmbientSound_H__ */
Note: See TracBrowser for help on using the repository browser.