Sets the master volume
| 1377 | } |
| 1378 | // Sets the master volume |
| 1379 | void hlsSystem::SetMasterVolume(float volume) { |
| 1380 | extern void StreamVolume(float master_volume); |
| 1381 | ASSERT(volume >= 0.0 && volume <= 1.0); |
| 1382 | |
| 1383 | if (volume == 0) { |
| 1384 | StopAllSounds(); |
| 1385 | CloseVoices(); |
| 1386 | KillSoundLib(true); |
| 1387 | m_master_volume = 0; |
| 1388 | } else { |
| 1389 | if (m_master_volume == 0) { |
| 1390 | InitSoundLib(Descent, Sound_mixer, Sound_quality, false); |
| 1391 | InitVoices(); |
| 1392 | } |
| 1393 | } |
| 1394 | m_master_volume = volume; |
| 1395 | StreamVolume(m_master_volume); |
| 1396 | } |
| 1397 | |
| 1398 | // Gets the master volume |
| 1399 | float hlsSystem::GetMasterVolume(void) { return m_master_volume; } |
no test coverage detected