Display modal error when RecordView experiences an error.

This commit is contained in:
Jared Boone 2016-05-12 22:00:40 -07:00
parent 9dc12fca3c
commit 8de12ff570
2 changed files with 7 additions and 0 deletions

View File

@ -139,6 +139,10 @@ AnalogAudioView::AnalogAudioView(
this->on_headphone_volume_changed(v);
};
record_view.on_error = [&nav](std::string message) {
nav.push<ModalMessageView>(message);
};
audio::output::start();
update_modulation(static_cast<ReceiverModel::Mode>(modulation));

View File

@ -70,6 +70,9 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
receiver_model.enable();
record_view.set_sampling_rate(sampling_rate / 8);
record_view.on_error = [&nav](std::string message) {
nav.push<ModalMessageView>(message);
};
}
CaptureAppView::~CaptureAppView() {