Compare commits

..

No commits in common. "audio-reload" and "master" have entirely different histories.

4 changed files with 4 additions and 22 deletions

View File

@ -352,12 +352,5 @@ fn on_alsa_event(
self::AudioUser::Unknown,
);
}
AlsaEvent::AlsaCardReload => {
invoke_handlers(
handlers,
self::AudioSignal::CardReload,
self::AudioUser::Unknown,
);
}
}
}

View File

@ -32,8 +32,6 @@ pub enum AlsaEvent {
AlsaCardDiconnected,
/// The values of the mixer changed, including mute state.
AlsaCardValuesChanged,
/// Alsa needs to be reloaded due to recoverable error.
AlsaCardReload,
}
@ -238,9 +236,8 @@ extern "C" fn watch_cb(
continue;
}
glib_sys::G_IO_STATUS_NORMAL => {
// BUG: https://github.com/nicklan/pnmixer/issues/182
warn!("Alsa failed to clear the channel");
cb(AlsaEvent::AlsaCardReload);
error!("Alsa failed to clear the channel");
cb(AlsaEvent::AlsaCardError);
}
glib_sys::G_IO_STATUS_ERROR => (),
glib_sys::G_IO_STATUS_EOF => {

View File

@ -49,7 +49,6 @@ pub enum AudioSignal {
CardDisconnected,
CardError,
ValuesChanged,
CardReload,
}

View File

@ -72,7 +72,7 @@ where
&apps.prefs.borrow(),
AudioUser::Unknown,
));
},
}
(AudioSignal::CardError, _) => {
if run_audio_error_dialog(
&apps.gui.popup_menu.menu_window,
@ -84,14 +84,7 @@ where
AudioUser::Unknown,
));
}
},
(AudioSignal::CardReload, _) => {
try_w!(audio_reload(
apps.audio.as_ref(),
&apps.prefs.borrow(),
AudioUser::Unknown,
));
},
}
_ => (),
}),
);