Hi everyone,
I am trying to use sound effects in my program but i am getting following error when in use SoundEffect members.
Error: The type or namespace name 'SoundEffect' could not be found (are you missing a using directive or an assembly reference?)
I am using Microsoft.Xna.Framework.Audio namespace in the program. I dont know what to do. Can anyone help me?
here is the code where am getting error....if it help in solving the issue:
#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
#endregion
namespace WindowsGame
{
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
ContentManager content;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
content = new ContentManager(Services);
}
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
// Set the 3D model to draw.
Model myModel;
//Set the sound effects to use
SoundEffect soundEngine;
bool soundEnginePlaying = false;
SoundEffectInstance soundEngineInstance;
SoundEffect soundHyperspaceActivation;
// The aspect ratio determines how to scale 3d to 2d projection.
float aspectRatio;
}
}
Thanks