| 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)) |