banks curr working

This commit is contained in:
Glence 2022-09-28 17:25:14 +08:00
parent 7fcac5e0eb
commit bed6a144f8
9 changed files with 15 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Assets/Audio/footsteps.bank Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,6 +15,8 @@
#include <FMOD/fmod_errors.h>
#include <FMOD/fmod.hpp>
#include <FMOD/fmod_studio.hpp>
#include <SDL_keyboard.h>
namespace SHADE
{
SHAudioSystem::SHAudioSystem()
@ -79,18 +81,21 @@ namespace SHADE
LoadBank("../../Assets/Audio/Master.bank");
LoadBank("../../Assets/Audio/Master.strings.bank");
LoadBank("../../Assets/Audio/Music.bank");
LoadBank("../../Assets/Audio/SFX.bank");
//LoadBank("../../Assets/Audio/Music.bank");
LoadBank("../../Assets/Audio/footsteps.bank");
//auto clip = CreateAudioClip("event:/Characters/sfx_footsteps_human");
//clip->Play();
//PlayEventOnce("event:/Characters/sfx_footsteps_human");
PlayEventOnce("event:/SFX/Dawn/Dawn_Attack");
//PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
//PlayEventOnce("event:/SFX/Dawn/Dawn_Attack");
}
void SHADE::SHAudioSystem::Run(float dt)
{
static_cast<void>(dt);
if (GetKeyState(VK_SPACE) & 0x8000)
PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
fmodStudioSystem->update();
if (!denseListener->empty())
{

View File

@ -42,6 +42,11 @@ namespace SHADE
SHEditorWindow::Update();
if (Begin())
{
if(ImGui::Button("AUDIO"))
{
if(auto audioSystem = SHSystemManager::GetSystem<SHADE::SHAudioSystem>())
audioSystem->PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
}
if (!SHEditor::selectedEntities.empty())
{
EntityID const& eid = SHEditor::selectedEntities[0];