public override void InitializeTexture() { try { audio = new AudioPlayer(Owner.Owner.WorkingDirectory + filename); audio.PlaybackComplete += new EventHandler(audio_Ending); } catch { } }
public override void CleanUp() { base.CleanUp(); if (audio != null) { audio.Stop(); audio.PlaybackComplete -= new EventHandler(audio_Ending); audio.Dispose(); audio = null; } }