protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); spriteFont = Content.Load<SpriteFont>("Data\\SpriteFont1"); root = new Core.RootDisposable(Content); AudioTypes audioType; audio = Audio.Init(AudioTypes.XNA | AudioTypes.Dumby, out audioType, root); sound = SoundAPI.New(audio, "Data/Explo2.wav", 1, false, null); while (true) { var e = Core.Loader.UpdateLoad(); if (e != null) throw e; if (Core.Loader.ItemsRemainingToLoad == 0) break; } }
public MainWindow() { InitializeComponent(); root = new Core.RootDisposable(); AudioTypes audioType; audio = Audio.Init(AudioTypes.XAudio | AudioTypes.Dumby, out audioType, root); sound = SoundAPI.New(audio, "Data/Explo2.wav", 1, false, null); while (true) { var e = Core.Loader.UpdateLoad(); if (e != null) throw e; if (Core.Loader.ItemsRemainingToLoad == 0) break; } System.Windows.Media.CompositionTarget.Rendering += render; }