// TODO - This should be reading the IO state from disk on startup.
This should be reading the IO state from disk on startup.
This should be reading the IO state from disk on startup .
pub fn new(audio_io_service: Addr<AudioIOService>) -> (Self, Command<Message>) {
        let audio_driver_state = Self::build_audio_driver_dropdown_state();
        let input_device_state =
            Self::build_input_device_dropdown_state(Some(AudioIOService::default_host()))
                .unwrap_or_default();
        let output_device_state =
            Self::build_output_device_dropdown_state(Some(AudioIOService::default_host()))
                .unwrap_or_default();
        let sample_rate_state =
            Self::build_sample_rate_dropdown_state(AudioIOService::default_host())
                .unwrap_or_default();
        let view = view::View::new(view::Model {
            audio_driver_state,
            input_device_state,
            output_device_state,
            sample_rate_state,
            buffer_size_state: DropdownModel {
                selected_option: None,
                options: vec![],
            },
        });
        let command = Controller::on_init(audio_io_service.clone());
        (
            Self {
                audio_io_service,
                view,
            },
            command,
        )
    }
pub fn new ( audio_io_service : Addr < AudioIOService > ) -> ( Self , Command < Message > ) { let audio_driver_state = Self :: build_audio_driver_dropdown_state ( ) ; let input_device_state = Self :: build_input_device_dropdown_state ( Some ( AudioIOService :: default_host ( ) ) ) . unwrap_or_default ( ) ; let output_device_state = Self :: build_output_device_dropdown_state ( Some ( AudioIOService :: default_host ( ) ) ) . unwrap_or_default ( ) ; let sample_rate_state = Self :: build_sample_rate_dropdown_state ( AudioIOService :: default_host ( ) ) . unwrap_or_default ( ) ; let view = view :: View :: new ( view :: Model { audio_driver_state , input_device_state , output_device_state , sample_rate_state , buffer_size_state : DropdownModel { selected_option : None , options : vec ! [ ] , } , } ) ; let command = Controller :: on_init ( audio_io_service . clone ( ) ) ; ( Self { audio_io_service , view , } , command , ) }
TODO - This should be reading the IO state from disk on startup.
TODO - This should be reading the IO state from disk on startup .
audio_io_service
Addr<AudioIOService>