MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetVolume

Method SetVolume

stream_audio/streamaudio.cpp:330–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 return m_loopcount + 1;
329}
330void AudioStream::SetVolume(float vol) {
331 m_volume = vol;
332 if (m_ll_sndsys) {
333 if (m_llshandle < 0)
334 return;
335 m_ll_sndsys->AdjustSound(m_llshandle, vol, 0.0f, m_playinfo.samples_per_22khz_sample * 22050);
336 }
337}
338float AudioStream::GetVolume() { return m_volume; }
339// flags specify what type of stream it is.
340bool AudioStream::Open(const char *filename, int open_flags) {

Callers 2

StreamVolumeFunction · 0.45
StreamPlayFunction · 0.45

Calls 1

AdjustSoundMethod · 0.80

Tested by

no test coverage detected