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); } }
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); } }