Resourcing working on sounds. Added class Sound resource.
This commit is contained in:
@@ -1,21 +1,3 @@
|
||||
/*
|
||||
This file is part of Daydream Engine.
|
||||
Copyright 2014 Adam Byléhn, Tobias Dahl, Simon Holmberg, Viktor Ljung
|
||||
|
||||
Daydream Engine is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Daydream Engine is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with Daydream Engine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DAYDREAM_SOUND_H
|
||||
#define DAYDREAM_SOUND_H
|
||||
|
||||
@@ -24,7 +6,7 @@
|
||||
#include "AL/alc.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/World.h"
|
||||
#include "Core/EKeyDown.h"
|
||||
#include "Sound.h"
|
||||
#include "Sound/EPlaySFX.h"
|
||||
#include "Physics/EContact.h"
|
||||
#include "Core/EventBroker.h"
|
||||
@@ -32,6 +14,7 @@
|
||||
#include "Game/CBrick.h"
|
||||
#include "Game/CPad.h"
|
||||
#include "Sound/CCollisionSound.h"
|
||||
#include "Core/ResourceManager.h"
|
||||
|
||||
|
||||
namespace dd
|
||||
@@ -58,28 +41,15 @@ public:
|
||||
|
||||
private:
|
||||
//Events
|
||||
dd::EventRelay<SoundSystem, dd::Events::KeyDown> m_EKeyDown;
|
||||
dd::EventRelay<SoundSystem, dd::Events::PlaySFX> m_EPlaySFX;
|
||||
dd::EventRelay<SoundSystem, dd::Events::Contact> m_EContact;
|
||||
|
||||
bool OnKeyDown(const dd::Events::KeyDown &event);
|
||||
bool OnPlaySFX(const dd::Events::PlaySFX &event);
|
||||
bool OnContact(const dd::Events::Contact &event);
|
||||
|
||||
ALuint LoadFile(std::string fileName);
|
||||
ALuint CreateSource();
|
||||
|
||||
//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<Component*, ALuint> m_Sources;
|
||||
std::map<std::string, ALuint> m_BufferCache;
|
||||
|
||||
|
||||
//Temp
|
||||
|
||||
Reference in New Issue
Block a user