iaudio 0.1.0
Contrat audio chargeable : IAudioModule
Loading...
Searching...
No Matches
IMusic.hpp
Go to the documentation of this file.
1
11#ifndef IMUSIC_HPP_
12 #define IMUSIC_HPP_
13
14 #include "Type.hpp"
15 #include <string>
16
17namespace audio {
18
19 class IMusic {
20
21 public:
22
23 virtual ~IMusic() = default;
24
25 virtual bool isReady() const = 0;
26
42 virtual void play() = 0;
43
49 virtual void pause() = 0;
50
56 virtual void stop() = 0;
57
68 virtual void update() = 0;
69
75 virtual void setVolume(float volume) = 0;
76
82 virtual float getVolume() const = 0;
83
89 virtual void setLoop(bool loop) = 0;
90
97 virtual bool getLoop() const = 0;
98
109 virtual void setTime(float position) = 0;
110
116 virtual float getTime() const = 0;
117
123 virtual float getLength() const = 0;
124
134 virtual void setPosition(Vector3f position) = 0;
135
141 virtual Vector3f getPosition() const = 0;
142
149 virtual void setVelocity(Vector3f velocity) = 0;
150
156 virtual Vector3f getVelocity() const = 0;
157 };
158
159}
160
163#endif /* !IMUSIC_HPP_ */
Definition IMusic.hpp:19
virtual Vector3f getVelocity() const =0
get the velocity of the music
virtual void setVolume(float volume)=0
set the volume of the music
virtual void pause()=0
Suspends playback without touching the position.
virtual float getVolume() const =0
get the volume of the music
virtual void setTime(float position)=0
Set the time of the music in seconds.
virtual bool getLoop() const =0
get if the music is looping or not
virtual ~IMusic()=default
virtual void setVelocity(Vector3f velocity)=0
set the velocity of the music, used by backends that apply a doppler effect
virtual float getLength() const =0
Get the Length of the music.
virtual void setLoop(bool loop)=0
set the music to loop or not
virtual float getTime() const =0
Get the current time of the music in seconds.
virtual void stop()=0
Stops playback AND rewinds to zero.
virtual bool isReady() const =0
virtual void update()=0
Must be called every frame.
virtual void setPosition(Vector3f position)=0
set the 3D position of the music, for backends that spatialize against a listener....
virtual Vector3f getPosition() const =0
get the 3D position of the music
virtual void play()=0
Starts playback.
Definition IMusic.hpp:17