| 190 | } |
| 191 | |
| 192 | void 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 | |
| 217 | static void setMixerEnable(obs_source_t *source, const int mixerIdx, |
| 218 | const bool enable) |
nothing calls this directly
no test coverage detected