C# Class LitDev.LDSound

Afficher le fichier Open project: litdev1/LitDev Class Usage Examples

Méthodes publiques

Méthode Description
Asterisk ( ) : void

Play system Asterisk sound.

Beep ( ) : void

Play system Beep sound.

Exclamation ( ) : void

Play system Exclamation sound.

Hand ( ) : void

Play system Hand sound.

MusicPlayTime ( Primitive fileName ) : Primitive

Gets the play time for a music file.

Pause ( ) : void

Pause a recording.

Question ( ) : void

Play system Question sound.

Resume ( ) : void

Resume a paused recording.

Start ( ) : void

Start recording sound.

Stop ( Primitive wavFile ) : Primitive

Stop and save current sound recording.

Tone ( Primitive frequency, Primitive duration ) : void

Play a system tone sound with frequency and duration. Uses the motherboard speaker (not the sound card) and may be low quality or not available.

Private Methods

Méthode Description
Beep ( uint dwFreq, uint dwDuration ) : bool
mciSendString ( string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback ) : int

Method Details

Asterisk() public static méthode

Play system Asterisk sound.
public static Asterisk ( ) : void
Résultat void

Beep() public static méthode

Play system Beep sound.
public static Beep ( ) : void
Résultat void

Exclamation() public static méthode

Play system Exclamation sound.
public static Exclamation ( ) : void
Résultat void

Hand() public static méthode

Play system Hand sound.
public static Hand ( ) : void
Résultat void

MusicPlayTime() public static méthode

Gets the play time for a music file.
public static MusicPlayTime ( Primitive fileName ) : Primitive
fileName Primitive /// The full path of the music file e.g. "C:\Users\Public\Music\song.mp3". ///
Résultat Primitive

Pause() public static méthode

Pause a recording.
public static Pause ( ) : void
Résultat void

Question() public static méthode

Play system Question sound.
public static Question ( ) : void
Résultat void

Resume() public static méthode

Resume a paused recording.
public static Resume ( ) : void
Résultat void

Start() public static méthode

Start recording sound.
public static Start ( ) : void
Résultat void

Stop() public static méthode

Stop and save current sound recording.
public static Stop ( Primitive wavFile ) : Primitive
wavFile Primitive The full path to a wav file to save the recording. /// The extension will be set to ".wav" if it is not already.
Résultat Primitive

Tone() public static méthode

Play a system tone sound with frequency and duration. Uses the motherboard speaker (not the sound card) and may be low quality or not available.
public static Tone ( Primitive frequency, Primitive duration ) : void
frequency Primitive The tone frequency (from 37 to 32767 Hz).
duration Primitive The tone duration in ms.
Résultat void