OpenBve.Sounds.StopAllSounds C# (CSharp) Метод

StopAllSounds() статический приватный Метод

Stops all sounds.
static private StopAllSounds ( ) : void
Результат void
		internal static void StopAllSounds() {
			for (int i = 0; i < SourceCount; i++) {
				if (Sources[i].State == SoundSourceState.Playing) {
					AL.DeleteSources(1, ref Sources[i].OpenAlSourceName);
					Sources[i].OpenAlSourceName = 0;
				}
				Sources[i].State = SoundSourceState.Stopped;
			}
		}
		

Same methods

Sounds::StopAllSounds ( TrainManager train ) : void

Usage Example

Пример #1
0
 /// <summary>Disposes of the train</summary>
 internal new void Dispose()
 {
     State = TrainState.Disposed;
     foreach (var Car in Cars)
     {
         Car.ChangeCarSection(CarSectionType.NotVisible);
         Car.FrontBogie.ChangeSection(-1);
         Car.RearBogie.ChangeSection(-1);
     }
     Sounds.StopAllSounds(this);
 }
All Usage Examples Of OpenBve.Sounds::StopAllSounds