Example #1
0
        /// <summary>
        /// Start the audio session.
        /// </summary>
        /// <returns>A <see cref="ResultCode"/> reporting an error or a success</returns>
        public ResultCode Start()
        {
            if (_state == AudioDeviceState.Started)
            {
                return(ResultCode.OperationFailed);
            }

            _hardwareDeviceSession.Start();

            _state = AudioDeviceState.Started;

            FlushToHardware();

            _hardwareDeviceSession.SetVolume(_volume);

            return(ResultCode.Success);
        }
Example #2
0
 public void SetVolume(float volume)
 {
     _session.SetVolume(volume);
 }