MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / StartFade

Method StartFade

plugins/base/macro-action-audio.cpp:192–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void MacroActionAudio::StartFade() const
193{
194 if (_action == Action::SOURCE_VOLUME && !_audioSource.GetSource()) {
195 return;
196 }
197
198 if (FadeActive() && !_abortActiveFade) {
199 blog(LOG_WARNING,
200 "Audio fade for volume of %s already active! New fade request will be ignored!",
201 (_action == Action::SOURCE_VOLUME)
202 ? _audioSource.ToString(true).c_str()
203 : "master volume");
204 return;
205 }
206 SetFadeActive(true);
207
208 if (_wait) {
209 FadeVolume();
210 } else {
211 AddMacroHelperThread(GetMacro(),
212 std::thread(&MacroActionAudio::FadeVolume,
213 this));
214 }
215}
216
217static void setMixerEnable(obs_source_t *source, const int mixerIdx,
218 const bool enable)

Callers

nothing calls this directly

Calls 5

AddMacroHelperThreadFunction · 0.85
GetMacroFunction · 0.85
GetSourceMethod · 0.45
c_strMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected