Added Engine and Sound with basic controls
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
#include "ChargeAudio.hpp"
|
|
||||||
|
|
||||||
int placeHolder() { return 0; }
|
|
@@ -1 +1,33 @@
|
|||||||
int placeHolder();
|
#include "../lib/miniaudio/miniaudio.c"
|
||||||
|
#include "../lib/miniaudio/miniaudio.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace ChargeAudio {
|
||||||
|
class Sound {
|
||||||
|
public:
|
||||||
|
~Sound();
|
||||||
|
void Play();
|
||||||
|
void Pause();
|
||||||
|
void Reset();
|
||||||
|
void SetVolume(float value);
|
||||||
|
float GetVolume();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Sound();
|
||||||
|
class Engine *baseEngine;
|
||||||
|
ma_sound maSound;
|
||||||
|
friend class Engine;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Engine {
|
||||||
|
public:
|
||||||
|
Engine();
|
||||||
|
Sound CreateSound(std::string filepath);
|
||||||
|
void SetVolume(float value);
|
||||||
|
float GetVolume();
|
||||||
|
|
||||||
|
private:
|
||||||
|
ma_engine maEngine;
|
||||||
|
ma_result maResponse;
|
||||||
|
};
|
||||||
|
} // namespace ChargeAudio
|
||||||
|
Reference in New Issue
Block a user