/// <summary> /// Finishes the speaker configuration step by returning the recorded channel volumes. /// </summary> /// <param name="currentConfiguration">Current configuration.</param> /// <returns>Current configuration with recorded channel volumes.</returns> public PointConfiguration Finish(PointConfiguration currentConfiguration) { MMDevice outputAudioDevice = workerThread.GetOutputAudioDevice(); for (int i = 0; i < outputAudioDevice.AudioEndpointVolume.Channels.Count; i++) { outputAudioDevice.AudioEndpointVolume.Channels[i].VolumeLevelScalar = originalChannelVolume[i]; } currentConfiguration.Volumes = volumes; return(currentConfiguration); }
/// <summary> /// Finishes the camera configuration step by returning the calculated coordiantes. /// </summary> /// <param name="currentConfiguration">Current configuration.</param> /// <returns>Current configuration with coordinates set.</returns> public PointConfiguration Finish(PointConfiguration currentConfiguration) { int x = 0; int y = 0; foreach (Point coordinate in coordinates) { x += coordinate.X; y += coordinate.Y; } currentConfiguration.Coordinates = new Point(x / coordinates.Count, y / coordinates.Count); return(currentConfiguration); }