using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System;
using System.Collections.Generic;
namespace Game
{
public class SongMgr : FourTest
{
public SongMgr(object[] song)
{
bpm = (int)song[0];
notes = (int[])song[1];
nextIndex = (int)song[2];
songName = (string)song[3];
}
AudioEngine audioEngine;
SoundBank soundBank;
WaveBank songCollection;
Cue song;
protected override void LoadContent()
{
audioEngine = new AudioEngine("xact.xgs");
soundBank = new SoundBank(audioEngine, "mus.xsb");
songCollection = new WaveBank(audioEngine, "mus.xwb");
song = soundBank.GetCue(songName);
}
}
}
Debuger says
System.ArgumentOutOfRangeException: “Stream length must be non-negative and less than 2^31 - 1 - origin. Arg_ParamName_Name” on this line:
soundBank = new SoundBank(audioEngine, "mus.xsb");
Help me pls