iaudio 0.1.0
Contrat audio chargeable : IAudioModule
Loading...
Searching...
No Matches
ISound.hpp
Go to the documentation of this file.
1
11#ifndef ISOUND_HPP_
12 #define ISOUND_HPP_
13
14 #include "Type.hpp"
15 #include <string>
16
17namespace audio {
18
19 class ISound {
20
21 public:
22
23 virtual ~ISound() = default;
24
25 virtual bool isReady() const = 0;
26
40 virtual void play() = 0;
41
47 virtual void pause() = 0;
48
54 virtual void stop() = 0;
55
61 virtual void setVolume(float volume) = 0;
62
68 virtual float getVolume() const = 0;
69
79 virtual void setPosition(Vector3f position) = 0;
80
86 virtual Vector3f getPosition() const = 0;
87
94 virtual void setVelocity(Vector3f velocity) = 0;
95
101 virtual Vector3f getVelocity() const = 0;
102 };
103
104}
105
108#endif /* !ISOUND_HPP_ */
Definition ISound.hpp:19
virtual void setPosition(Vector3f position)=0
set the 3D position of the sound, for backends that spatialize against a listener....
virtual Vector3f getVelocity() const =0
get the velocity of the sound
virtual void play()=0
Fires the sound from the beginning.
virtual bool isReady() const =0
virtual void setVolume(float volume)=0
set the volume of the sound
virtual void stop()=0
Stops the sound AND rewinds to zero.
virtual ~ISound()=default
virtual void pause()=0
Suspends the sound without touching the position.
virtual Vector3f getPosition() const =0
get the 3D position of the sound
virtual float getVolume() const =0
get the volume of the sound
virtual void setVelocity(Vector3f velocity)=0
set the velocity of the sound, used by backends that apply a doppler effect
Definition IMusic.hpp:17