private void EnsurePolicyConfig() { if (_sharedPolicyConfig == null) { _sharedPolicyConfig = AudioPolicyConfigFactory.Create(); } }
/// <summary> /// Initializes a new instance of the <see cref="AppAudioService"/> class. /// </summary> /// <param name="logger">The logger.</param> public AppAudioService(ILogger <AppAudioService> logger) { try { this.AudioPolicyConfig = AudioPolicyConfigFactory.Create(); } catch (Exception ex) { logger.LogWarning(ex, "Failed to instantiate audio policy config factory."); throw; } }