Ejemplo n.º 1
0
        async Task IAudioProvider.PlayAsync(byte[] buffer, double volume)
        {
            var index = AudioProviderFactory.GetMysteryIndex(_settings);

            if (index != Null)
            {
                _player = WavePlayer.Play(index, buffer, volume);
                await _player.WaitAsync();

                _player = null;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="window">The main window of the application.</param>
        /// <param name="getGazeClickParameters">The gaze click parameter provider.</param>
        KeyboardApplicationEnvironment(Window window, GazeMouse.GetGazeClickParameters getGazeClickParameters)
        {
            _window = window;
            _getGazeClickParameters = getGazeClickParameters;

            _window.Loaded += OnWindowLoaded;
            _window.Closed += (s, e) =>
            {
                GazeMouse.DetachAll();
                Environment.Exit(0);
            };

            AudioProviderFactory.UpdateSettings();
            TextToAudioProviderFactory.UpdateSettings();
        }