GlistEngine
Loading...
Searching...
No Matches
gBaseSound.h
Go to the documentation of this file.
1/*
2 * gBaseSound.h
3 *
4 * Created on: 18 Kas 2020
5 * Author: Noyan Culum
6 */
7
8#ifndef MEDIA_GBASESOUND_H_
9#define MEDIA_GBASESOUND_H_
10
11#include <string>
12#include "gObject.h"
13
14// gBaseSound is an abstract interface class for all sounds.
15class gBaseSound : public gObject {
16public:
22
23 virtual int load(const std::string& fullPath) = 0;
24 virtual int loadSound(const std::string& soundPath) = 0;
25 virtual void play() = 0;
26 virtual bool isLoaded() = 0;
27 virtual bool isPlaying() = 0;
28 virtual void setPaused(bool isPaused) = 0;
29 virtual bool isPaused() = 0;
30 virtual void stop() = 0;
31 virtual void close() = 0;
32
33 virtual int getDuration() = 0;
34 virtual void setPosition(int position) = 0;
35 virtual int getPosition() = 0;
36
37 virtual void setLoopType(LoopType loopType) = 0;
38 virtual LoopType getLoopType() = 0;
39
40 virtual void setVolume(float volume) = 0;
41 virtual float getVolume() = 0;
42
43 virtual const std::string& getPath() = 0;
44
45};
46
47#endif /* MEDIA_GBASESOUND_H_ */
Definition gBaseSound.h:15
virtual LoopType getLoopType()=0
virtual void setPosition(int position)=0
virtual void play()=0
virtual bool isPaused()=0
virtual void close()=0
virtual void stop()=0
virtual void setPaused(bool isPaused)=0
virtual const std::string & getPath()=0
virtual bool isPlaying()=0
LoopType
Definition gBaseSound.h:17
@ LOOPTYPE_NORMAL
Definition gBaseSound.h:20
@ LOOPTYPE_NONE
Definition gBaseSound.h:19
@ LOOPTYPE_DEFAULT
Definition gBaseSound.h:18
virtual int getDuration()=0
virtual int load(const std::string &fullPath)=0
virtual int loadSound(const std::string &soundPath)=0
virtual bool isLoaded()=0
virtual void setLoopType(LoopType loopType)=0
virtual int getPosition()=0
virtual float getVolume()=0
virtual void setVolume(float volume)=0
Definition gObject.h:33