示例#1
0
        private void ExecuteInsertSilence()
        {
            // bump all states by the inserted size
            long startSelectionPosition = recorder.getSelectionStart();

            InsertSilence dlg = new InsertSilence();

            dlg.ShowDialog();
            long offset = (long)((float)dlg.GetSeconds() * recorder.getOneSecondRange());

            if (dlg.DialogResult == DialogResult.OK)
            {
                int i;
                for (i = 0; (i < robotStates.Count); i++)
                {
                    if (robotStates[i].position >= startSelectionPosition)
                    {
                        robotStates[i].position += offset;
                    }
                }

                // actually insert the slient space
                recorder.InsertAudioSilence(startSelectionPosition, startSelectionPosition + offset);
            }
        }
示例#2
0
        private void ExecuteInsertSilence()
        {
            // bump all states by the inserted size
            long startSelectionPosition = recorder.getSelectionStart();

            InsertSilence dlg = new InsertSilence();
            dlg.ShowDialog();
            long offset = (long)((float)dlg.GetSeconds() * recorder.getOneSecondRange());
            if (dlg.DialogResult == DialogResult.OK)
            {
                int i;
                for (i = 0; (i < robotStates.Count); i++)
                    if (robotStates[i].position >= startSelectionPosition)
                        robotStates[i].position += offset;

                // actually insert the slient space
                recorder.InsertAudioSilence(startSelectionPosition, startSelectionPosition+offset);
            }
        }