예제 #1
0
        public SoundControl(SoundBase sb, IPluginHost pluginHost)
        {
            InitializeComponent();

            this.soundBase = sb;
            this.pluginHost = pluginHost;

            this.wav_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
            soundBase.Save_WAV(wav_file, false);
            if (soundBase.CanLoop)
            {
                wav_loop_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
                soundBase.Save_WAV(wav_loop_file, true);
            }

            checkLoop.Enabled = soundBase.CanLoop;
            btnImport.Enabled = soundBase.CanEdit;

            ReadLanguage();
            Information();
        }
예제 #2
0
파일: Main.cs 프로젝트: MetLob/tinke
        void bw_DoWorkRead(object sender, DoWorkEventArgs e)
        {
            // Get params
            string file = ((string[])e.Argument)[0];
            int id = Convert.ToInt32(((string[])e.Argument)[1]);

            BinaryReader br = new BinaryReader(File.OpenRead(file));
            string header = new String(br.ReadChars(4));
            br.Close();

            // Process
            SoundBase sb = null;
            if (header == "sadl")
                sb = new SADL(pluginHost.Get_Language(), file, id);
            else if (file.ToUpper().EndsWith(".ADX"))
                sb = new ADX(file, id);

            sb.Initialize();
            e.Result = sb;
        }
예제 #3
0
파일: Main.cs 프로젝트: MetLob/tinke
 void bw_RunWorkerCompletedRead(object sender, RunWorkerCompletedEventArgs e)
 {
     sb = (SoundBase)e.Result;
     wait.Close();
     wait.Dispose();
 }
예제 #4
0
 void bw_RunWorkerCompletedRead(object sender, RunWorkerCompletedEventArgs e)
 {
     sb = (SoundBase)e.Result;
     wait.Close();
     wait.Dispose();
 }