Restore SEBPatch
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents.Contracts.Audio.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the volume of the system audio component has changed.
|
||||
/// </summary>
|
||||
public delegate void VolumeChangedEventHandler(double volume, bool muted);
|
||||
}
|
63
SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs
Normal file
63
SafeExamBrowser.SystemComponents.Contracts/Audio/IAudio.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using SafeExamBrowser.SystemComponents.Contracts.Audio.Events;
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents.Contracts.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the functionality of the audio system component.
|
||||
/// </summary>
|
||||
public interface IAudio : ISystemComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// The full name of the audio device, or an empty string if not available.
|
||||
/// </summary>
|
||||
string DeviceFullName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The short audio device name, or an empty string if not available.
|
||||
/// </summary>
|
||||
string DeviceShortName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether an audio output device is available.
|
||||
/// </summary>
|
||||
bool HasOutputDevice { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the audio output is currently muted.
|
||||
/// </summary>
|
||||
bool OutputMuted { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The current audio output volume.
|
||||
/// </summary>
|
||||
double OutputVolume { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Fired when the volume of the audio device has changed.
|
||||
/// </summary>
|
||||
event VolumeChangedEventHandler VolumeChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Mutes the currently active audio device.
|
||||
/// </summary>
|
||||
void Mute();
|
||||
|
||||
/// <summary>
|
||||
/// Unmutes the currently active audio device.
|
||||
/// </summary>
|
||||
void Unmute();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the volume of the currently active audio device to the given value.
|
||||
/// </summary>
|
||||
void SetVolume(double value);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user