8 #include "cAudioDefines.h" 9 #include "EAudioFormats.h" 10 #include "IAudioEffects.h" 11 #include "IDataSourceFactory.h" 12 #include "IManagerEventHandler.h" 19 class IAudioDecoderFactory;
20 class AudioCaptureBuffer;
36 virtual bool initialize(
const char* deviceName = 0x0,
int outputFrequency = -1,
int eaxEffectSlots = 4) = 0;
72 bool playLooped =
false,
73 bool startPaused =
false) = 0;
85 bool playLooped =
false,
86 bool startPaused =
false) = 0;
116 virtual IAudioSource*
create(
const char* name,
const char* filename,
bool stream =
false) = 0;
240 #if CAUDIO_EFX_ENABLED == 1 241 virtual IAudioEffects* getEffects() = 0;
virtual void setSpeedOfSound(float speed)=0
Set Speed of Sound (for doppler computations)
virtual bool registerDataSource(IDataSourceFactory *factory, const char *name, int priority)=0
Registers a data source with this manager.
virtual bool isAudioDecoderRegistered(const char *extension)=0
Returns whether an audio decoder is currently registered for this file type.
virtual IAudioSource * getSoundByName(const char *name)=0
Returns an Audio Source by its "name" and NULL if the name is not found.
virtual IAudioSource * createFromMemory(const char *name, const char *data, size_t length, const char *extension)=0
Creates an Audio Source from a memory buffer using a specific audio codec.
virtual bool isDataSourceRegistered(const char *name)=0
Returns whether a data source is currently registered under a certain name.
virtual void unRegisterAllDataSources()=0
Removes all previously registered data sources.
Interface for the playback capabilities of cAudio.
virtual IAudioBuffer * createBuffer(const char *filename)=0
Creates a Audio Sample using the highest priority data source that has the referenced filename...
virtual float getDopplerFactor() const =0
Get Doppler Factor.
virtual bool isUpdateThreadRunning()=0
Returns if the thread used to update all Audio Managers is running.
virtual IAudioSource * createStatic(IAudioBuffer *buffer)=0
Creates an Audio Source from an Audio Buffer object (see createAudioBuffer())
virtual void unRegisterDataSource(const char *name)=0
Removes a previously registered data source.
virtual float getSpeedOfSound() const =0
Get Speed of Sound (for doppler computations)
virtual void unRegisterAudioDecoder(const char *extension)=0
Unregister a previously registered Audio Decoder.
virtual void unRegisterAllEventHandlers()=0
Unregisters all previously registered event handlers from the manager.
virtual IAudioDecoderFactory * getAudioDecoderFactory(const char *extension)=0
Returns a registered audio decoder factory.
Interface for event handlers for playback manager events.
Interface for factories that create Audio Decoders for cAudio.
Interface for a single audio source, which allow you to manipulate sound sources (speakers) in 2D or ...
virtual float getMasterVolume() const =0
Get the master volume.
Interface for the listener in cAudio. This class provides abilities to move and orient where your cam...
virtual IAudioSource * createFromRaw(const char *name, const char *data, size_t length, unsigned int frequency, AudioFormats format)=0
Creates an Audio Source from raw audio data in a memory buffer.
virtual bool registerAudioDecoder(IAudioDecoderFactory *factory, const char *extension)=0
Register an Audio Decoder.
virtual IAudioSource * create(const char *name, const char *filename, bool stream=false)=0
Creates an Audio Source object using the highest priority data source that has the referenced filenam...
Class for manipulating vectors in 3D space.
virtual IDataSourceFactory * getDataSourceFactory(const char *name)=0
Returns a previously registered data source factory.
virtual void releaseAllSources()=0
Releases ALL Audio Sources (but does not shutdown the manager)
virtual bool initialize(const char *deviceName=0x0, int outputFrequency=-1, int eaxEffectSlots=4)=0
Initializes the manager.
virtual IAudioSource * play3D(const char *filename, cVector3 position, bool playLooped=false, bool startPaused=false)=0
Creates an Audio Source object using the highest priority data source that has the referenced filenam...
virtual void update()=0
If threading is disabled, you must call this function every frame to update the playback buffers of a...
virtual void unRegisterEventHandler(IManagerEventHandler *handler)=0
Unregisters a previously registered event handler from the manager.
virtual void release(IAudioSource *source)=0
Releases a single Audio Source, removing it from the manager.
virtual void setDopplerFactor(float factor) const =0
Set Doppler Factor.
Interface for creating data sources for use with the engine.
virtual void stopAllSounds()=0
Stops all playing sounds.
virtual void unRegisterAllAudioDecoders()=0
Unregisters all attached Audio Decoders.
virtual IListener * getListener()=0
Returns the interface for the listener.
interface for a sample (audio buffer): completely loaded into memory, shareable across sources ...
virtual void setMasterVolume(float vol)=0
Sets master volume. (valid range [0 - 1.0])
virtual void shutDown()=0
Shuts the manager down, cleaning up audio sources in the process. Does not clean up decoders...
virtual IAudioSource * play2D(const char *filename, bool playLooped=false, bool startPaused=false)=0
Creates an Audio Source object using the highest priority data source that has the referenced filenam...
AudioFormats
Enumeration of audio formats supported by the engine.
virtual void registerEventHandler(IManagerEventHandler *handler)=0
Registers a new event handler with the manager.
Main namespace for the entire cAudio library.
virtual IAudioSource * createFromAudioBuffer(const char *name, AudioCaptureBuffer *pBiffer, unsigned int frequency, AudioFormats format)=0
Creates an Audio Source from AudioCaptureBuffer in a memory buffer.