C# 클래스 BrightIdeasSoftware.Audio

Instances of this class allow sound to be played at specified points within a animation.

This class uses the SoundPlayer class internally, and thus can only handle system sounds and WAV sound files.

A sound that is already playing cannot be paused.

상속: BrightIdeasSoftware.Animateable
파일 보기 프로젝트 열기: ennerperez/ObjectListView 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
FileName string
Player SoundPlayer
ResourceName string
SystemSound SystemSound

공개 메소드들

메소드 설명
Audio ( ) : System

Create an empty Audio object

Audio ( SystemSound sound ) : System

Creates an Audio object that will play the given system sound

Audio ( string fileName ) : System

Creates an Audio object that will play the given "wav" file

FromResource ( string resourceName ) : Audio

Load a sound from a named resource.

To embed a wav file, simple add it to the project, and change "Build Action" to "Embedded Resource".

Start ( ) : void

Start the sound playing

Stop ( ) : void

Stop the sound

Tick ( long elapsed ) : bool

Advance the audio and return if it is done.

메소드 상세

Audio() 공개 메소드

Create an empty Audio object
public Audio ( ) : System
리턴 System

Audio() 공개 메소드

Creates an Audio object that will play the given system sound
public Audio ( SystemSound sound ) : System
sound SystemSound
리턴 System

Audio() 공개 메소드

Creates an Audio object that will play the given "wav" file
public Audio ( string fileName ) : System
fileName string
리턴 System

FromResource() 공개 정적인 메소드

Load a sound from a named resource.
To embed a wav file, simple add it to the project, and change "Build Action" to "Embedded Resource".
public static FromResource ( string resourceName ) : Audio
resourceName string The name of the resource including the trailing ".wav"
리턴 Audio

Start() 공개 메소드

Start the sound playing
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stop the sound
public Stop ( ) : void
리턴 void

Tick() 공개 메소드

Advance the audio and return if it is done.
public Tick ( long elapsed ) : bool
elapsed long
리턴 bool

프로퍼티 상세

FileName 보호되어 있는 프로퍼티

Gets or sets the name of the audio file that will be played.
protected string FileName
리턴 string

Player 보호되어 있는 프로퍼티

protected SoundPlayer Player
리턴 SoundPlayer

ResourceName 보호되어 있는 프로퍼티

protected string ResourceName
리턴 string

SystemSound 보호되어 있는 프로퍼티

protected SystemSound SystemSound
리턴 SystemSound