ME3Explorer.Unreal.Classes.WwiseStream.Play C# (CSharp) Method

Play() public method

public Play ( string pathtoafc = "" ) : void
pathtoafc string
return void
        public void Play(string pathtoafc = "")
        {
            if (FileName == "")
                return;
            if (FileName == null)
            {
                PlayWave(pathtoafc);
            }
            else if (pathtoafc != "")
            {
                if (File.Exists(pathtoafc + FileName + ".afc"))
                    PlayWave(pathtoafc + FileName + ".afc");
                else
                {
                    OpenFileDialog d = new OpenFileDialog();
                    d.Filter = FileName + ".afc|" + FileName + ".afc";
                    if (d.ShowDialog() == DialogResult.OK)
                        PlayWave(d.FileName);
                }
            }
            else
            {
                OpenFileDialog d = new OpenFileDialog();
                d.Filter = FileName + ".afc|" + FileName + ".afc";
                if (d.ShowDialog() == DialogResult.OK)
                    PlayWave(d.FileName);
            }
        }

Usage Example

示例#1
0
 public void PlaySound()
 {
     if (listView1.SelectedItems.Count != 1 || pcc == null)
         return;
     ListViewItem item = listView1.SelectedItems[0];
     int index = Convert.ToInt32(item.Name);
     if (pcc.Exports[index].ClassName == "WwiseStream")
     {
         w = new WwiseStream(pcc, pcc.Exports[index].Data);
         w.Play(pathCooked);
     }
 }
All Usage Examples Of ME3Explorer.Unreal.Classes.WwiseStream::Play