more crash avoidance in sfdb UI if there's no auditioner
This commit is contained in:
parent
ad53c31e50
commit
a7dbf57afa
|
@ -997,10 +997,11 @@ SoundFileBrowser::add_gain_meter ()
|
||||||
{
|
{
|
||||||
delete gm;
|
delete gm;
|
||||||
|
|
||||||
gm = new GainMeter (_session, 250);
|
|
||||||
|
|
||||||
std::shared_ptr<Route> r = _session->the_auditioner ();
|
std::shared_ptr<Route> r = _session->the_auditioner ();
|
||||||
|
|
||||||
|
if (r) {
|
||||||
|
gm = new GainMeter (_session, 250);
|
||||||
|
|
||||||
gm->set_controls (r, r->shared_peak_meter(), r->amp(), r->gain_control());
|
gm->set_controls (r, r->shared_peak_meter(), r->amp(), r->gain_control());
|
||||||
gm->set_fader_name (X_("GainFader"));
|
gm->set_fader_name (X_("GainFader"));
|
||||||
|
|
||||||
|
@ -1010,6 +1011,7 @@ SoundFileBrowser::add_gain_meter ()
|
||||||
meter_packer.show_all ();
|
meter_packer.show_all ();
|
||||||
start_metering ();
|
start_metering ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SoundFileBrowser::remove_gain_meter ()
|
SoundFileBrowser::remove_gain_meter ()
|
||||||
|
@ -2132,8 +2134,10 @@ SoundFileOmega::where_combo_changed()
|
||||||
void
|
void
|
||||||
SoundFileOmega::instrument_combo_changed()
|
SoundFileOmega::instrument_combo_changed()
|
||||||
{
|
{
|
||||||
|
if (_session->the_auditioner()) {
|
||||||
_session->the_auditioner()->set_audition_synth_info( instrument_combo.selected_instrument() );
|
_session->the_auditioner()->set_audition_synth_info( instrument_combo.selected_instrument() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MidiTrackNameSource
|
MidiTrackNameSource
|
||||||
SoundFileOmega::get_midi_track_name_source () const
|
SoundFileOmega::get_midi_track_name_source () const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user