How can I find the song position of a song being played with XACT?
- by DJ SymBiotiX
So I'm making a game in XNA and I need to use XACT for my songs (rather than media player). I need to use XACT because each song will have multiple layers that combine when played at the same time (bass, lead, drums) etc. I cant use the media player because the media player can only play one song at a time.
Anyways, so lets say I have a song playing with XACT in my project with the following code
public SongController()
{
audioEngine = new AudioEngine(@"Content\Song1\Song1.xgs");
waveBank = new WaveBank(audioEngine, @"Content\Song1\Layers.xwb");
soundBank = new SoundBank(audioEngine, @"Content\Song1\SongLayers.xsb");
songTime = new PlayTime();
Vox = soundBank.GetCue("Vox");
BG = soundBank.GetCue("BG");
Bass = soundBank.GetCue("Bass");
Lead = soundBank.GetCue("Lead");
Other = soundBank.GetCue("Other");
Vox.SetVariable("CueVolume", 100.0f);
BG.SetVariable("CueVolume", 100.0f);
Bass.SetVariable("CueVolume", 100.0f);
Lead.SetVariable("CueVolume", 100.0f);
Other.SetVariable("CueVolume", 100.0f);
_bassVol = 100.0f;
_voxVol = 100.0f;
_leadVol = 100.0f;
_otherVol = 100.0f;
Vox.Play();
BG.Play();
Bass.Play();
Lead.Play();
Other.Play(); }
So when I look at the variables in Vox, or BG (they are Cue's btw) I cant seem to find any play position in them.
So I guess the question is: Is there a variable I can query to find that data, or do I need to make my own class that starts counting up from the time I start the song?
Thanks