MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / Spkr_SetActive

Function Spkr_SetActive

source/Speaker.cpp:826–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824static bool g_bSpkrRecentlyActive = false;
825
826static void Spkr_SetActive(bool bActive)
827{
828 if(!SpeakerVoice.bActive)
829 return;
830
831 if(bActive)
832 {
833 // Called by SpkrToggle() or SpkrReset()
834 g_bSpkrRecentlyActive = true;
835 SpeakerVoice.bRecentlyActive = true;
836 }
837 else
838 {
839 // Called by SpkrUpdate() after 0.2s of speaker inactivity
840 g_bSpkrRecentlyActive = false;
841 SpeakerVoice.bRecentlyActive = false;
842 g_bQuieterSpeaker = 0; // undo any muting (for 8 bit DAC)
843 }
844}
845
846bool Spkr_IsActive()
847{

Callers 3

SpkrResetFunction · 0.85
SpkrToggleFunction · 0.85
SpkrUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected