// Returns a registry and audio related services it is populated with.
Returns a registry and audio related services it is populated with.
Returns a registry and audio related services it is populated with .
async fn create_services() -> (Arc<Mutex<ServiceRegistry>>, FakeServices) {
    let service_registry = ServiceRegistry::create();
    // Used for some functions inside the audio_controller and other dependencies.
    let audio_core_service_handle = Arc::new(Mutex::new(AudioCoreService::new()));
    service_registry.lock().await.register_service(audio_core_service_handle.clone());
    let input_device_registry_service_handle =
        Arc::new(Mutex::new(InputDeviceRegistryService::new()));
    service_registry.lock().await.register_service(input_device_registry_service_handle.clone());
    let sound_player_service_handle = Arc::new(Mutex::new(SoundPlayerService::new()));
    service_registry.lock().await.register_service(sound_player_service_handle.clone());
    let usage_reporter_service_handle = Arc::new(Mutex::new(UsageReporterService::new()));
    service_registry.lock().await.register_service(usage_reporter_service_handle.clone());
    (
        service_registry,
        FakeServices {
            input_device_registry: input_device_registry_service_handle,
            sound_player: sound_player_service_handle,
            usage_reporter: usage_reporter_service_handle,
        },
    )
}
async fn create_services ( ) -> ( Arc < Mutex < ServiceRegistry > > , FakeServices ) { let service_registry = ServiceRegistry :: create ( ) ; // Used for some functions inside the audio_controller and other dependencies. let audio_core_service_handle = Arc :: new ( Mutex :: new ( AudioCoreService :: new ( ) ) ) ; service_registry . lock ( ) . await . register_service ( audio_core_service_handle . clone ( ) ) ; let input_device_registry_service_handle = Arc :: new ( Mutex :: new ( InputDeviceRegistryService :: new ( ) ) ) ; service_registry . lock ( ) . await . register_service ( input_device_registry_service_handle . clone ( ) ) ; let sound_player_service_handle = Arc :: new ( Mutex :: new ( SoundPlayerService :: new ( ) ) ) ; service_registry . lock ( ) . await . register_service ( sound_player_service_handle . clone ( ) ) ; let usage_reporter_service_handle = Arc :: new ( Mutex :: new ( UsageReporterService :: new ( ) ) ) ; service_registry . lock ( ) . await . register_service ( usage_reporter_service_handle . clone ( ) ) ; ( service_registry , FakeServices { input_device_registry : input_device_registry_service_handle , sound_player : sound_player_service_handle , usage_reporter : usage_reporter_service_handle , } , ) }
Returns a registry and audio related services it is populated with.
Returns a registry and audio related services it is populated with .