Exemplo n.º 1
0
        public FSCPlayer PlayFSC(string path)
        {
            var dir    = Path.GetDirectoryName(path) + "/";
            FSC fsc    = new FSC(path);
            var player = new FSCPlayer(fsc, dir);

            FSCPlayers.Add(player);

            return(player);
        }
Exemplo n.º 2
0
        public AmbiencePlayer(Ambience amb)
        {
            if (amb.Loop)
            {
                byte[] data = new XAFile(FSO.Content.Content.Get().GetPath(amb.Path)).DecompressedData;
                var stream = new MemoryStream(data);
                sfx = SoundEffect.FromStream(stream);
                stream.Close();

                inst = sfx.CreateInstance();
                inst.IsLooped = true;
                inst.Play();
                fscMode = false;
            }
            else
            {
                fsc = HITVM.Get().PlayFSC(FSO.Content.Content.Get().GetPath(amb.Path));
                fsc.SetVolume(0.33f); //may need tweaking
                fscMode = true;
            }
        }
Exemplo n.º 3
0
        public AmbiencePlayer(Ambience amb)
        {
            if (amb.Loop)
            {
                byte[] data   = new XAFile(FSO.Content.Content.Get().GetPath(amb.Path)).DecompressedData;
                var    stream = new MemoryStream(data);
                sfx = SoundEffect.FromStream(stream);
                stream.Close();

                inst          = sfx.CreateInstance();
                inst.IsLooped = true;
                inst.Play();
                fscMode = false;
            }
            else
            {
                fsc = HITVM.Get().PlayFSC(FSO.Content.Content.Get().GetPath(amb.Path));
                fsc.SetVolume(0.33f); //may need tweaking
                fscMode = true;
            }
        }
Exemplo n.º 4
0
 public void StopFSC(FSCPlayer input)
 {
     FSCPlayers.Remove(input);
 }
Exemplo n.º 5
0
        public FSCPlayer PlayFSC(string path)
        {
            var dir = Path.GetDirectoryName(path)+"/";
            FSC fsc = new FSC(path);
            var player = new FSCPlayer(fsc, dir);
            FSCPlayers.Add(player);

            return player;
        }
Exemplo n.º 6
0
 public void StopFSC(FSCPlayer input)
 {
     FSCPlayers.Remove(input);
 }