Ejemplo n.º 1
0
        public override async Task Set(IntermediateCommandInformation information)
        {
            double position = (information.DeviceInformation.PositionFromOriginal / 99.0) * (1.0 - information.Progress) +
                              (information.DeviceInformation.PositionToOriginal / 99.0) * information.Progress;

            double freqMin = 400;
            double freqMax = 4000;

            switch (_parameters.ConversionMode)
            {
            case EstimConversionMode.Volume:
                _stereo.LeftVolume  = (float)position;
                _stereo.RightVolume = (float)position;
                break;

            case EstimConversionMode.Balance:
                _stereo.LeftVolume  = (float)position;
                _stereo.RightVolume = (float)(1.0 - position);
                break;

            case EstimConversionMode.Frequency:
                _stereo.LeftVolume   = 1f;
                _stereo.RightVolume  = 1f;
                _generator.Frequency = freqMin + (freqMax - freqMin) * position;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
 public override Task Set(IntermediateCommandInformation information)
 {
     return(Task.CompletedTask);
 }
Ejemplo n.º 3
0
 public override async Task Set(IntermediateCommandInformation information)
 {
 }