TriEngine  v0.0.16
General-purpose engine in C#/OpenGL
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
TriDevs.TriEngine.Audio.Sound Class Reference

Sound class that can be used with the AudioManager. More...

Inheritance diagram for TriDevs.TriEngine.Audio.Sound:
[legend]
Collaboration diagram for TriDevs.TriEngine.Audio.Sound:
[legend]

Public Member Functions

void Play ()
 Plays the sound. More...
 
void Stop ()
 Stops the sound. More...
 
void Dispose ()
 

Properties

string Name [get]
 
string File [get]
 
- Properties inherited from TriDevs.TriEngine.Audio.ISound
string File [get]
 Gets the file this sound was created from. More...
 
- Properties inherited from TriDevs.TriEngine.Resources.IResource
string Name [get]
 Gets the name associated with this resource. More...
 

Detailed Description

Sound class that can be used with the AudioManager.

Member Function Documentation

void TriDevs.TriEngine.Audio.Sound.Dispose ( )
187  {
188  Stop();
189  AL.DeleteSources(_sources);
190  AL.DeleteBuffer(_buffer);
191  }
void TriDevs.TriEngine.Audio.Sound.Play ( )

Plays the sound.

Implements TriDevs.TriEngine.Audio.ISound.

169  {
170  for (var i = 0; i < SourceCount; i++)
171  {
172  if (GetSourceState(_sources[i]) != ALSourceState.Playing)
173  {
174  AL.SourcePlay(_sources[i]);
175  return;
176  }
177  }
178  }
void TriDevs.TriEngine.Audio.Sound.Stop ( )

Stops the sound.

Implements TriDevs.TriEngine.Audio.ISound.

181  {
182  for (var i = 0; i < SourceCount; i++)
183  AL.SourceStop(_sources[i]);
184  }

Property Documentation

string TriDevs.TriEngine.Audio.Sound.File
get
string TriDevs.TriEngine.Audio.Sound.Name
get

The documentation for this class was generated from the following file: