From 5f72a0fc2a0758f5b2abde76b127c9505e614099 Mon Sep 17 00:00:00 2001 From: apistol78 Date: Thu, 29 Feb 2024 16:56:52 +0100 Subject: [PATCH] Traktor: SoundComponent setParameter using string as id. --- code/Spray/SoundComponent.cpp | 4 ++-- code/Spray/SoundComponent.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Spray/SoundComponent.cpp b/code/Spray/SoundComponent.cpp index be21c6f208..f31d3ed9be 100644 --- a/code/Spray/SoundComponent.cpp +++ b/code/Spray/SoundComponent.cpp @@ -77,10 +77,10 @@ void SoundComponent::setPitch(float pitch) m_handle->setPitch(pitch); } -void SoundComponent::setParameter(int32_t id, float parameter) +void SoundComponent::setParameter(const std::wstring& id, float parameter) { if (m_handle != nullptr) - m_handle->setParameter(id, parameter); + m_handle->setParameter(sound::getParameterHandle(id), parameter); } } diff --git a/code/Spray/SoundComponent.h b/code/Spray/SoundComponent.h index 17f25ecaaa..d50fa15dbd 100644 --- a/code/Spray/SoundComponent.h +++ b/code/Spray/SoundComponent.h @@ -59,7 +59,7 @@ class T_DLLCLASS SoundComponent : public world::IEntityComponent void setPitch(float pitch); - void setParameter(int32_t id, float parameter); + void setParameter(const std::wstring& id, float parameter); private: Ref< sound::ISoundPlayer > m_soundPlayer;