1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using SongVocalIsolateAutomation.AudioProcessing;
- using SongVocalIsolateAutomation.UI;
- using System.Windows.Forms;
- namespace SongVocalIsolateAutomation
- {
- internal partial class MainForm : Form
- {
- private WaveData _iWaveData, _vWaveData;
- public MainForm()
- {
- InitializeComponent();
- }
- private void LoadButton_Click(object sender, System.EventArgs e)
- {
- _iWaveData = WaveLoader.LoadFlac(VocalOffFilePathTextBox.Text);
- _vWaveData = WaveLoader.LoadFlac(VocalOnFilePathTextBox.Text);
- if (_iWaveData.SampleRate != _vWaveData.SampleRate || _iWaveData.Channels != _vWaveData.Channels)
- throw new Exception("i/v must same format");
- WaveGraphic.SetData(
- new WaveDub(
- _iWaveData.AllSamples,
- _vWaveData.AllSamples,
- _iWaveData.Channels,
- _iWaveData.SampleRate
- )
- );
- }
- //TODO: playback
- //http://mark-dot-net.blogspot.com/2014/02/fire-and-forget-audio-playback-with.html
- }
- }
|