MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetSampleTotalTime

Method GetSampleTotalTime

src/engine/client/sound.cpp:700–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700float CSound::GetSampleTotalTime(int SampleId)
701{
702 dbg_assert(SampleId >= 0 && SampleId < NUM_SAMPLES, "SampleId invalid");
703
704 const CLockScope LockScope(m_SoundLock);
705 dbg_assert(m_aSamples[SampleId].IsLoaded(), "Sample not loaded");
706 return m_aSamples[SampleId].TotalTime();
707}
708
709float CSound::GetSampleCurrentTime(int SampleId)
710{

Callers 1

DoAudioPreviewMethod · 0.80

Calls 2

TotalTimeMethod · 0.80
IsLoadedMethod · 0.45

Tested by

no test coverage detected