MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getDuration

Method getDuration

src/Core/Audio/Sound.cpp:22–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 m_handle = m_manager.play(*m_source, m_source->mVolume, 0, true);
21 }
22 double Sound::getDuration() const
23 {
24 if (auto source = dynamic_cast<SoLoud::WavStream*>(m_source.get()); source)
25 {
26 return source->getLength();
27 }
28 else
29 {
30 return dynamic_cast<SoLoud::Wav*>(m_source.get())->getLength();
31 }
32 }
33 void Sound::play()
34 {
35 if (m_manager.isValidVoiceHandle(m_handle))

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
getLengthMethod · 0.45

Tested by

no test coverage detected