From 70e97e88c0ea0560ef294047a94a12086e20b356 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sat, 6 Aug 2022 20:10:28 -0700 Subject: [PATCH] app/lib: move maximum volume const to lib --- app/viewer/mediapanel.cpp | 2 +- lib/sitypes.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/viewer/mediapanel.cpp b/app/viewer/mediapanel.cpp index ff58230..1196e05 100644 --- a/app/viewer/mediapanel.cpp +++ b/app/viewer/mediapanel.cpp @@ -356,7 +356,7 @@ void MediaPanel::OpenMediaInstance(si::Object *o) m->Open(o->ExtractToMemory()); m->SetStartOffset(float(o->time_offset_) * 0.001f); - m->SetVolume(float(o->volume_) / 79.0f); + m->SetVolume(float(o->volume_) / si::MxOb::MAXIMUM_VOLUME); m->SetVirtualTime(0); m_mediaInstances.push_back(m); diff --git a/lib/sitypes.h b/lib/sitypes.h index 70585bb..c213d6e 100644 --- a/lib/sitypes.h +++ b/lib/sitypes.h @@ -247,6 +247,9 @@ public: // probably be moved LIBWEAVER_EXPORT static const char *GetTypeName(Type type); LIBWEAVER_EXPORT static std::vector GetFlagsName(Flags flags); + + static const int MAXIMUM_VOLUME = 79; + }; }