AudioPanel::gain_calculate_button_clicked ()
{
GainCalculatorDialog* d = new GainCalculatorDialog (this);
- d->ShowModal ();
+ int const r = d->ShowModal ();
- if (d->wanted_fader() == 0 || d->actual_fader() == 0) {
+ if (r == wxID_CANCEL || d->wanted_fader() == 0 || d->actual_fader() == 0) {
d->Destroy ();
return;
}
return;
}
- shared_ptr<AudioContent> acs = ac.front ();
- if (acs->audio_frame_rate() != acs->resampled_audio_frame_rate ()) {
- _description->SetLabel (wxString::Format (
- _("Audio will be resampled from %.3fkHz to %.3fkHz."),
- acs->audio_frame_rate() / 1000.0,
- acs->resampled_audio_frame_rate() / 1000.0
- ));
- } else {
- _description->SetLabel (_("Audio will not be resampled."));
- }
+ _description->SetLabel (std_to_wx (ac.front()->processing_description ()));
}
void