Voxeloop  0.1.0
Musical Loop Generation in Voxel World
Audio.hpp
Go to the documentation of this file.
1 #ifndef VOXELOOP_AUDIO_HPP
2 #define VOXELOOP_AUDIO_HPP
3 
4 #include "../assets/audio/Bindings.hpp"
5 #include "Tree.hpp"
6 
7 #include <miniaudio.h>
8 
9 #include <iostream>
10 #include <map>
11 #include <sstream>
12 #include <string>
13 #include <unistd.h>
14 
15 class Audio {
16 public:
17  Audio();
18  ~Audio();
19 
20  void setAudio(char s, std::string path);
21  void play(char s);
22 
23  void addAudio(char key, float mvmt);
24  void updateList();
25  void traverseList(float mvmt);
26 
27 private:
28  ma_engine engine;
29  ma_result result;
30  std::map<char, ma_sound> sounds;
31 
33 
35 };
36 
37 #endif // VOXELOOP_AUDIO_HPP
Definition: Audio.hpp:15
TreeNode * currentSound
Definition: Audio.hpp:34
ma_engine engine
Definition: Audio.hpp:28
void addAudio(char key, float mvmt)
Definition: Audio.cpp:63
ma_result result
Definition: Audio.hpp:29
void setAudio(char s, std::string path)
Definition: Audio.cpp:48
Audio()
Definition: Audio.cpp:3
void updateList()
Definition: Audio.cpp:68
void play(char s)
Definition: Audio.cpp:43
std::map< char, ma_sound > sounds
Definition: Audio.hpp:30
Tree * tree
Definition: Audio.hpp:32
~Audio()
Definition: Audio.cpp:38
void traverseList(float mvmt)
Definition: Audio.cpp:73
Definition: Tree.hpp:18
Definition: Tree.hpp:11