private void buttonItUpsampleStart_Click(object sender, RoutedEventArgs e) { var args = new FirWorkerArgs(); args.inputPath = textBoxItUpsampleInputPath.Text; args.outputPath = textBoxItUpsampleOutputPath.Text; if (true == radioButtonItUpsampleSint16.IsChecked) { args.outputBitsPerSample = 16; args.valueRepresentationType = PcmData.ValueRepresentationType.SInt; } if (true == radioButtonItUpsampleSint24.IsChecked) { args.outputBitsPerSample = 24; args.valueRepresentationType = PcmData.ValueRepresentationType.SInt; } if (true == radioButtonItUpsampleSfloat32.IsChecked) { args.outputBitsPerSample = 32; args.valueRepresentationType = PcmData.ValueRepresentationType.SFloat; } mFreqMagnitude = 0; if (!Int32.TryParse(textBoxItUpsampleFreqMagnitude.Text, out mFreqMagnitude) || mFreqMagnitude <= 1) { MessageBox.Show("アップサンプル倍率は2以上の整数を入力して下さい"); return; } mItUpsampleType = ItUpsampleType.Unknown; if (true == radioButtonItUpsampleImpulse.IsChecked) { mItUpsampleType = ItUpsampleType.ImpulseTrain; } if (true == radioButtonItUpsampleSampleHold.IsChecked) { mItUpsampleType = ItUpsampleType.SampleHold; } if (true == radioButtonItUpsampleLinear.IsChecked) { mItUpsampleType = ItUpsampleType.Linear; } if (true == radioButtonItUpsampleCubic.IsChecked) { mItUpsampleType = ItUpsampleType.Cubic; } System.Diagnostics.Debug.Assert(mItUpsampleType != ItUpsampleType.Unknown); textBoxItUpsampleLog.Text += string.Format("開始。{0} ==> {1} {2}x\r\n", args.inputPath, args.outputPath, mFreqMagnitude); textBoxItUpsampleLog.ScrollToEnd(); buttonItUpsampleDo.IsEnabled = false; mItUpsampleWorker.RunWorkerAsync(args); }