Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Audio;
- using Microsoft.Xna.Framework.Content;
- using Microsoft.Xna.Framework.GamerServices;
- using Microsoft.Xna.Framework.Graphics;
- using Microsoft.Xna.Framework.Input;
- using Microsoft.Xna.Framework.Media;
- namespace wtfGame
- {
- public class SoundManager : Microsoft.Xna.Framework.DrawableGameComponent
- {
- SoundManager soundManager;
- AudioEngine audioEngine;
- WaveBank waveBank;
- SoundBank soundBank;
- Cue trackCue;
- public SoundManager(Game game)
- : base(game)
- {
- // TODO: Construct any child components here
- }
- public override void Initialize()
- {
- // TODO: Add your initialization code here
- base.Initialize();
- }
- protected override void LoadContent()
- {
- audioEngine = new AudioEngine(@"Content\Audio\GameAudio.xgs");
- waveBank = new WaveBank(audioEngine, @"Content\Audio\wave Bank.xwb");
- soundBank = new SoundBank(audioEngine, @"Content\Audio\Sound Bank.xsb");
- trackCue = soundBank.GetCue("DST-Azum");
- trackCue.Play();
- soundBank.PlayCue("DST-Azum");
- }
- public override void Update(GameTime gameTime)
- {
- // TODO: Add your update code here
- audioEngine.Update();
- base.Update(gameTime);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment