C# Class OpenBve.Sounds

Datei anzeigen Open project: leezer3/OpenBVE Class Usage Examples

Private Methods

Method Description
Deinitialize ( ) : void

Deinitializes audio.

GetDuration ( SoundBuffer buffer ) : double

Gets the duration of the specified sound buffer in seconds.

GetMonoMix ( Sound sound ) : byte[]

Mixes all channels into a single channel.

GetNormalizedMonoMix ( float samples ) : float[]
GetNumberOfLoadedBuffers ( ) : int

Gets the number of loaded sound buffers.

GetNumberOfPlayingSources ( ) : int

Gets the number of playing sound sources.

GetNumberOfRegisteredBuffers ( ) : int

Gets the number of registered sound buffers.

GetNumberOfRegisteredSources ( ) : int

Gets the number of registered sound sources.

Initialize ( ) : bool

Initializes audio. A call to Deinitialize must be made when terminating the program.

IsPlaying ( SoundSource source ) : bool

Checks whether the specified sound is playing or supposed to be playing.

IsStopped ( SoundSource source ) : bool

Checks whether the specified sound is stopped or supposed to be stopped.

LoadAllBuffers ( ) : void

Loads all sound buffers immediately.

LoadBuffer ( SoundBuffer buffer ) : bool

Loads the specified sound buffer.

PlaySound ( SoundBuffer buffer, double pitch, double volume, OpenBveApi position, TrainManager train, int car, bool looped ) : SoundSource

Plays a sound.

PlaySound ( SoundBuffer buffer, double pitch, double volume, OpenBveApi position, bool looped ) : SoundSource

Plays a sound.

RegisterBuffer ( OpenBveApi data, double radius ) : SoundBuffer

Registers a sound buffer and returns a handle to the buffer.

RegisterBuffer ( string path, double radius ) : SoundBuffer

Registers a sound buffer and returns a handle to the buffer.

StopAllSounds ( ) : void

Stops all sounds.

StopAllSounds ( TrainManager train ) : void

Stops all sounds that are attached to the specified train.

StopSound ( SoundSource source ) : void

Stops the specified sound source.

UnloadAllBuffers ( ) : void

Unloads all sound buffers immediately.

UnloadBuffer ( SoundBuffer buffer ) : void

Unloads the specified sound buffer.