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; + }; }