MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / changeVolume

Function changeVolume

TheForceEngine/TFE_Audio/midiPlayer.cpp:370–383  ·  view source on GitHub ↗

///////////////////////////////////////////// Internal /////////////////////////////////////////////

Source from the content-addressed store, hash-verified

368 // Internal
369 //////////////////////////////////////////////////
370 void changeVolume()
371 {
372 if (s_midiDevice && s_midiDevice->hasGlobalVolumeCtrl())
373 {
374 s_midiDevice->setVolume(s_masterVolumeScaled);
375 }
376 else if (s_midiDevice)
377 {
378 for (u32 i = 0; i < MIDI_CHANNEL_COUNT; i++)
379 {
380 s_midiDevice->message(MID_CONTROL_CHANGE + i, MID_VOLUME_MSB, u8(s_channelSrcVolume[i] * s_masterVolumeScaled));
381 }
382 }
383 }
384
385 void stopAllNotes()
386 {

Callers 2

midiSetCallbackFunction · 0.85
midiUpdateFuncFunction · 0.85

Calls 3

hasGlobalVolumeCtrlMethod · 0.45
setVolumeMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected