C# Класс VideoPlayerController.AudioManager

Controls audio using the Windows CoreAudio API from: http://stackoverflow.com/questions/14306048/controling-volume-mixer and: http://netcoreaudio.codeplex.com/
Показать файл Открыть проект

Открытые методы

Метод Описание
GetApplicationMute ( int pid ) : bool?
GetApplicationVolume ( int pid ) : float?
GetMasterVolume ( ) : float

Gets the current master volume in scalar values (percentage)

GetMasterVolumeMute ( ) : bool

Gets the mute state of the master volume. While the volume can be muted the GetMasterVolume will still return the pre-muted volume value.

SetApplicationMute ( int pid, bool mute ) : void
SetApplicationVolume ( int pid, float level ) : void
SetMasterVolume ( float newLevel ) : void

Sets the master volume to a specific level

SetMasterVolumeMute ( bool isMuted ) : void

Mute or unmute the master volume

StepMasterVolume ( float stepAmount ) : float

Increments or decrements the current volume level by the stepAmount.

ToggleMasterVolumeMute ( ) : bool

Switches between the master volume mute states depending on the current state

Приватные методы

Метод Описание
GetMasterVolumeObject ( ) : IAudioEndpointVolume
GetVolumeObject ( int pid ) : ISimpleAudioVolume

Описание методов

GetApplicationMute() публичный статический Метод

public static GetApplicationMute ( int pid ) : bool?
pid int
Результат bool?

GetApplicationVolume() публичный статический Метод

public static GetApplicationVolume ( int pid ) : float?
pid int
Результат float?

GetMasterVolume() публичный статический Метод

Gets the current master volume in scalar values (percentage)
public static GetMasterVolume ( ) : float
Результат float

GetMasterVolumeMute() публичный статический Метод

Gets the mute state of the master volume. While the volume can be muted the GetMasterVolume will still return the pre-muted volume value.
public static GetMasterVolumeMute ( ) : bool
Результат bool

SetApplicationMute() публичный статический Метод

public static SetApplicationMute ( int pid, bool mute ) : void
pid int
mute bool
Результат void

SetApplicationVolume() публичный статический Метод

public static SetApplicationVolume ( int pid, float level ) : void
pid int
level float
Результат void

SetMasterVolume() публичный статический Метод

Sets the master volume to a specific level
public static SetMasterVolume ( float newLevel ) : void
newLevel float Value between 0 and 100 indicating the desired scalar value of the volume
Результат void

SetMasterVolumeMute() публичный статический Метод

Mute or unmute the master volume
public static SetMasterVolumeMute ( bool isMuted ) : void
isMuted bool true to mute the master volume, false to unmute
Результат void

StepMasterVolume() публичный статический Метод

Increments or decrements the current volume level by the stepAmount.
public static StepMasterVolume ( float stepAmount ) : float
stepAmount float Value between -100 and 100 indicating the desired step amount. Use negative numbers to decrease /// the volume and positive numbers to increase it.
Результат float

ToggleMasterVolumeMute() публичный статический Метод

Switches between the master volume mute states depending on the current state
public static ToggleMasterVolumeMute ( ) : bool
Результат bool