3
0

MiniAudioPlaybackComponentConfig.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "MiniAudioPlaybackComponentConfig.h"
  9. #include <AzCore/Asset/AssetSerializer.h>
  10. namespace MiniAudio
  11. {
  12. void MiniAudioPlaybackComponentConfig::Reflect(AZ::ReflectContext* context)
  13. {
  14. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  15. {
  16. serializeContext->Class<MiniAudioPlaybackComponentConfig>()
  17. ->Version(4)
  18. ->Field("Autoplay", &MiniAudioPlaybackComponentConfig::m_autoplayOnActivate)
  19. ->Field("Sound", &MiniAudioPlaybackComponentConfig::m_sound)
  20. ->Field("Volume", &MiniAudioPlaybackComponentConfig::m_volume)
  21. ->Field("Auto-follow", &MiniAudioPlaybackComponentConfig::m_autoFollowEntity)
  22. ->Field("Loop", &MiniAudioPlaybackComponentConfig::m_loop)
  23. ->Field("Spatialization", &MiniAudioPlaybackComponentConfig::m_enableSpatialization)
  24. ->Field("Attenuation Model", &MiniAudioPlaybackComponentConfig::m_attenuationModel)
  25. ->Field("Min Distance", &MiniAudioPlaybackComponentConfig::m_minimumDistance)
  26. ->Field("Max Distance", &MiniAudioPlaybackComponentConfig::m_maximumDistance)
  27. ;
  28. }
  29. }
  30. } // namespace MiniAudio