Soundsystem ALMOST DONE
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
#include "AL/alc.h"
|
||||
|
||||
#include "System.h"
|
||||
#include "Components/Transform.h"
|
||||
#include "Components/SoundEmitter.h"
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include <windows.h>
|
||||
#include <vector>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
|
||||
namespace Systems
|
||||
{
|
||||
@@ -24,20 +27,22 @@ public:
|
||||
void OnComponentCreated(std::string type, std::shared_ptr<Component> component) override;
|
||||
void PlaySound(std::shared_ptr<Components::SoundEmitter> emitter, std::string fileName);
|
||||
void LoadFile(const char* fileName);
|
||||
void CreateSource(int ID, float pos[3], ALboolean looping);
|
||||
ALuint CreateSource();
|
||||
|
||||
private:
|
||||
ALCcontext* context;
|
||||
|
||||
//File-info
|
||||
char type[4];
|
||||
DWORD size, chunkSize;
|
||||
short formatType, channels;
|
||||
DWORD sampleRate, avgBytesPerSec;
|
||||
short bytesPerSample, bitsPerSample;
|
||||
DWORD dataSize;
|
||||
|
||||
unsigned char* buf;
|
||||
|
||||
std::vector<ALuint> source;
|
||||
|
||||
std::map<Component*, ALuint> source;
|
||||
std::map<std::string, ALuint> buffer; // string = fileName
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user