123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- /*!
- * \file include/SoundNull.h
- * \brief This is the null audio manager Header
- *
- * \author xythobuz
- */
-
- #ifndef _SOUND_NULL_H_
- #define _SOUND_NULL_H_
-
- #include "Sound.h"
-
- /*!
- * \brief This is the null audio manager
- */
- class SoundNull : public Sound {
- public:
-
- /*!
- * \brief Constructs an object of SoundNull
- */
- SoundNull();
-
- /*!
- * \brief Deconstructs an object of SoundNull
- */
- virtual ~SoundNull();
-
- /*!
- * \brief Initialize sound system
- * \returns 0 on success or < 0 error flags
- */
- virtual int initialize();
-
- virtual void setEnabled(bool on);
-
- virtual bool getEnabled() { return false; }
-
- /*!
- * \brief Set the volume
- * \param vol new source gain
- */
- virtual void setVolume(float vol);
-
- virtual float getVolume() { return 0.0f; }
-
- /*!
- * \brief Get number of registered sources
- * \returns number of registered sources
- */
- virtual unsigned long registeredSources();
-
- /*!
- * \brief Remove all loaded sounds
- */
- virtual void clear();
-
- /*!
- * \brief Move listener and repositions them
- * \param pos New position for listener
- * \param angle New orientation for listener
- */
- virtual void listenAt(float pos[3], float angle[3]);
-
- /*!
- * \brief Move sound source to position
- * \param source valid source id
- * \param pos new position for source
- */
- virtual void sourceAt(unsigned long source, float pos[3]);
-
- /*!
- * \brief Load wav file from disk
- * \param filename not NULL!
- * \param source not NULL! Returns new source ID or -1 on error.
- * \param flags set options. Use SoundFlags enum bitwise OR-ed
- * \returns 0 for no error or < 0 error flag
- */
- virtual int addFile(const char* filename, unsigned long* source, unsigned int flags);
-
- /*!
- * \brief Load wav file from buffer
- * \param wav not NULL! Is a valid waveform buffer!
- * \param length length of wav buffer
- * \param source not NULL! Returns new source ID or -1 on error.
- * \param flags set options. Use SoundFlags enum bitwise OR-ed
- * \returns 0 for no error or < 0 error flag
- */
- virtual int addWave(unsigned char* wav, unsigned int length, unsigned long* source,
- unsigned int flags);
-
- /*!
- * \brief Play sound source
- * \param source sound source to play
- */
- virtual void play(unsigned long source);
-
- /*!
- * \brief Stop playing sound source
- * \param source sound source to stop
- */
- virtual void stop(unsigned long source);
-
- private:
- unsigned long sources;
- };
-
- #endif
|