MCPcopy Create free account
hub / github.com/audacity/audacity / UpdateSliderControl

Method UpdateSliderControl

src/widgets/MeterPanel.cpp:411–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void MeterPanel::UpdateSliderControl()
412{
413#if USE_PORTMIXER
414 float inputVolume;
415 float playbackVolume;
416 int inputSource;
417
418 // Show or hide the input slider based on whether it works
419 auto gAudioIO = AudioIO::Get();
420 if (mIsInput && mSlider)
421 mSlider->SetEnabled(mEnabled && gAudioIO->InputMixerWorks());
422
423 gAudioIO->GetMixer(&inputSource, &inputVolume, &playbackVolume);
424
425 const auto volume = mIsInput ? inputVolume : playbackVolume;
426
427 if (mSlider && (mSlider->Get() != volume))
428 mSlider->Set(volume);
429
430#endif // USE_PORTMIXER
431}
432
433void MeterPanel::OnErase(wxEraseEvent & WXUNUSED(event))
434{

Callers 5

UpdateControlsMethod · 0.80
ShowOutputGainDialogMethod · 0.80
ShowInputGainDialogMethod · 0.80
AdjustOutputGainMethod · 0.80
AdjustInputGainMethod · 0.80

Calls 6

GetFunction · 0.85
InputMixerWorksMethod · 0.80
GetMixerMethod · 0.80
SetEnabledMethod · 0.45
GetMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected