From cc0e73a2e6f0162adaca60ce62f1b0f32f6848cc Mon Sep 17 00:00:00 2001 From: Danilo Date: Tue, 4 Jun 2024 17:08:04 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20em=20Audio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 9 ++++++--- framework/CMakeLists.txt | 2 +- framework/platform-dx/soundeffect.cpp | 6 +----- inc/xna/audio/soundeffect.hpp | 2 -- inc/xna/enums.hpp | 6 ++++++ 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db84c9c..f6c8884 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,17 @@ if (POLICY CMP0141) set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$,$>,$<$:EditAndContinue>,$<$:ProgramDatabase>>") endif() -# CMAKE_TOOLCHAIN_FILE +# VCPKG source directory set(PROJECT_VCPKG_DIRECTORY "C:/vcpkg") -set(PROJECT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/inc") +# Includes directory +set(PROJECT_INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/inc") +# CMAKE_TOOLCHAIN_FILE include("${PROJECT_VCPKG_DIRECTORY}/scripts/buildsystems/vcpkg.cmake") + project ("xna") # Include sub-projects. -include_directories(${PROJECT_INCLUDE_DIR}) +include_directories(${PROJECT_INCLUDES_DIR}) add_subdirectory ("framework") add_subdirectory ("samples") diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt index 7adedfe..f762ab0 100644 --- a/framework/CMakeLists.txt +++ b/framework/CMakeLists.txt @@ -53,5 +53,5 @@ find_package(directxtk CONFIG REQUIRED) target_link_libraries( Xn65 D3d11.lib dxgi.lib dxguid.lib d3dcompiler.lib Microsoft::DirectXTK - "${PROJECT_INCLUDE_DIR}/libmspack/mspack.lib" + "${PROJECT_INCLUDES_DIR}/libmspack/mspack.lib" ) diff --git a/framework/platform-dx/soundeffect.cpp b/framework/platform-dx/soundeffect.cpp index b5cb1b4..2c83731 100644 --- a/framework/platform-dx/soundeffect.cpp +++ b/framework/platform-dx/soundeffect.cpp @@ -10,11 +10,7 @@ namespace xna { SoundEffectInstance::~SoundEffectInstance() { impl = nullptr; - } - - //Remover posteriormente - SoundEffect::SoundEffect() { - } + } SoundEffect::SoundEffect(String const& fileName) { if (!AudioEngine::impl || !AudioEngine::impl->_dxAudioEngine) diff --git a/inc/xna/audio/soundeffect.hpp b/inc/xna/audio/soundeffect.hpp index b68d7b4..cdc9a39 100644 --- a/inc/xna/audio/soundeffect.hpp +++ b/inc/xna/audio/soundeffect.hpp @@ -25,8 +25,6 @@ namespace xna { class SoundEffect { public: - //Remover posteriormente ou implementar funções de carregamento dos dados - SoundEffect(); SoundEffect(String const& fileName); SoundEffect( std::vector const& format, diff --git a/inc/xna/enums.hpp b/inc/xna/enums.hpp index d7e92f0..83d09f9 100644 --- a/inc/xna/enums.hpp +++ b/inc/xna/enums.hpp @@ -2,6 +2,12 @@ #define XNA_ENUMS_HPP namespace xna { + enum class AudioChannels + { + Mono = 1, + Stereo = 2, + }; + enum class AudioReverb { Off, Default,