SOUNDEMITTER COMPLETE!?!?!?

This commit is contained in:
Adam
2014-03-10 02:36:02 +01:00
parent 0bdabe3855
commit b35ad2732b
4 changed files with 49 additions and 28 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ public:
void UpdateEntity(double dt, EntityID entity, EntityID parent) override;
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);
ALuint LoadFile(std::string fileName);
ALuint CreateSource();
private:
@@ -39,10 +39,10 @@ private:
DWORD sampleRate, avgBytesPerSec;
short bytesPerSample, bitsPerSample;
DWORD dataSize;
unsigned char* buf;
std::map<Component*, ALuint> source;
std::map<std::string, ALuint> buffer; // string = fileName
std::map<std::string, ALuint> m_BufferCache; // string = fileName
};
}