Resourcing working on sounds. Added class Sound resource.

This commit is contained in:
Stiffly
2015-09-17 17:50:00 +02:00
parent 587b712f49
commit 2a4c7c8b1a
4 changed files with 135 additions and 184 deletions
+36
View File
@@ -0,0 +1,36 @@
#ifndef SOUND_H__
#define SOUND_H__
#include "AL/al.h"
#include "AL/alc.h"
#include "Core/ResourceManager.h"
namespace dd
{
class Sound : public Resource
{
friend class ResourceManager;
public:
ALuint Buffer() { return m_Buffer; };
private:
Sound(std::string path);
//File-info
char m_Type[4];
unsigned long m_Size, m_ChunkSize;
short m_FormatType, m_Channels;
unsigned long m_SampleRate, m_AvgBytesPerSec;
short m_BytesPerSample, m_BitsPerSample;
unsigned long m_DataSize;
std::map<std::string, ALuint> m_BufferCache;
ALuint LoadFile(std::string path);
ALuint m_Buffer;
};
}
#endif