C# Class VideoPlayerController.AudioManager

Controls audio using the Windows CoreAudio API from: http://stackoverflow.com/questions/14306048/controling-volume-mixer and: http://netcoreaudio.codeplex.com/
Afficher le fichier Open project: sverrirs/XboxBigButton

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
GetMasterVolumeObject ( ) : IAudioEndpointVolume
GetVolumeObject ( int pid ) : ISimpleAudioVolume

Method Details

GetApplicationMute() public static méthode

public static GetApplicationMute ( int pid ) : bool?
pid int
Résultat bool?

GetApplicationVolume() public static méthode

public static GetApplicationVolume ( int pid ) : float?
pid int
Résultat float?

GetMasterVolume() public static méthode

Gets the current master volume in scalar values (percentage)
public static GetMasterVolume ( ) : float
Résultat float

GetMasterVolumeMute() public static méthode

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
Résultat bool

SetApplicationMute() public static méthode

public static SetApplicationMute ( int pid, bool mute ) : void
pid int
mute bool
Résultat void

SetApplicationVolume() public static méthode

public static SetApplicationVolume ( int pid, float level ) : void
pid int
level float
Résultat void

SetMasterVolume() public static méthode

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
Résultat void

SetMasterVolumeMute() public static méthode

Mute or unmute the master volume
public static SetMasterVolumeMute ( bool isMuted ) : void
isMuted bool true to mute the master volume, false to unmute
Résultat void

StepMasterVolume() public static méthode

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.
Résultat float

ToggleMasterVolumeMute() public static méthode

Switches between the master volume mute states depending on the current state
public static ToggleMasterVolumeMute ( ) : bool
Résultat bool