caudio/include/IAudio.h

60 lines
2.1 KiB
C
Raw Normal View History

2009-06-21 05:24:30 +02:00
#ifndef IAUDIO_H
#define IAUDIO_H
#include "IAudioDecoder.h"
namespace cAudio
{
class IAudio
{
public:
IAudio() {}
virtual ~IAudio() {}
//! play with defualts / the last set values
2009-06-21 19:21:38 +02:00
virtual bool play() = 0;
2009-06-21 05:24:30 +02:00
//!plays the audio file 2d no distance.
2009-06-21 19:21:38 +02:00
virtual void play2d(bool loop = false) = 0;
2009-06-21 05:24:30 +02:00
//!plays the audio file and sets it to 3d
virtual void play3d(bool loop = false, float x = 0.0, float y = 0.0, float z = 0.0, float soundstr = 1.0) = 0;
2009-06-21 19:21:38 +02:00
//!allows us to set the position or reset the position
virtual void setPosition(float posx,float posy,float posz) = 0;
2009-06-21 05:24:30 +02:00
//!allows you to set the audio objects velocity
2009-06-21 19:21:38 +02:00
virtual void setVelocity(float velx,float vely,float velz) = 0;
2009-06-21 05:24:30 +02:00
//!allows us to set the direction the audio should play in / move
2009-06-21 19:21:38 +02:00
virtual void setDirection(float dirx,float diry,float dirz) = 0;
2009-06-21 05:24:30 +02:00
//! Sets the audios pitch level
2009-06-21 19:21:38 +02:00
virtual void setPitch(float pitch) = 0;
2009-06-21 05:24:30 +02:00
//!allows us to set and reset the sound strength
2009-06-21 19:21:38 +02:00
virtual void setStrength(float soundstrength) = 0;
2009-06-21 05:24:30 +02:00
//! Set the volume
2009-06-21 19:21:38 +02:00
virtual void setVolume(float volume) = 0;
2009-06-21 05:24:30 +02:00
//!Set the doppler strength
2009-06-21 19:21:38 +02:00
virtual void setDopplerStrength(float doop) = 0;
2009-06-21 05:24:30 +02:00
//!Set the doppler velocity
2009-06-21 19:21:38 +02:00
virtual void setDopplerVelocity(float doopx,float doopy,float doopz) = 0;
//!Seek through the audio stream
2009-06-21 05:24:30 +02:00
virtual void seek(float secs) = 0;
2009-06-21 19:21:38 +02:00
2009-06-21 05:24:30 +02:00
//!release the file handle
2009-06-21 19:21:38 +02:00
virtual void release() = 0;
2009-06-21 05:24:30 +02:00
//!pauses the audio file
2009-06-21 19:21:38 +02:00
virtual void pause() = 0;
2009-06-21 05:24:30 +02:00
//!controls altering of the looping to make it loop or not to.
virtual void loop(bool loop) = 0;
2009-06-21 19:21:38 +02:00
//!stops the audio file from playing
2009-06-21 05:24:30 +02:00
virtual void stop() = 0;
2009-06-21 19:21:38 +02:00
2009-06-21 05:24:30 +02:00
//!play file
2009-06-21 19:21:38 +02:00
virtual bool playback() = 0;
2009-06-21 05:24:30 +02:00
//!check if source is playing
2009-06-21 19:21:38 +02:00
virtual bool playing() = 0;
2009-06-21 05:24:30 +02:00
//!update the stream
2009-06-21 19:21:38 +02:00
virtual bool update() = 0;
2009-06-21 05:24:30 +02:00
//!checks to make sure everything is ready to go
virtual bool isvalid() = 0;
protected:
private:
};
}
#endif //! IAUDIO_H