public ControlModelState(string recordingFileName, string effectedFileName) { this.RecordingFileName = recordingFileName; this.EffectedFileName = effectedFileName; this.autoTuneSettings = new AutoTuneSettings(); }
public VoiceRecorderState(string recordingFileName, string effectedFileName) { this.RecordingFileName = recordingFileName; this.EffectedFileName = effectedFileName; this.autoTuneSettings = new AutoTuneSettings(); }
public AudioPassthrough(HotkeyAudioDevice input, HotkeyAudioDevice output, AutoTuneSettings autoTuneSettings) { LastPauseOrStart = new DateTime(2000, 1, 1); _autoTuneSettings = autoTuneSettings; _waveSource = new WaveIn(); WaveSource.DeviceNumber = input.AudioDeviceId; //WaveSource.WaveFormat = new WaveFormat(); WaveSource.WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(44100, 1); WaveSource.RecordingStopped += WaveSource_RecordingStopped; WaveSource.DataAvailable += WaveSource_DataAvailable; //WaveSource.BufferMilliseconds = 300; //_waveInProvider = new JoeWaveInProvider(WaveSource); //StereoToMonoProvider16 stereoToMonoprovider = new StereoToMonoProvider16(_waveInProvider); //_wave16ToFloatProvider = new Wave16ToFloatProvider(stereoToMonoprovider); //var test3 = ; MemoryStream = new MemoryStream(new byte[8192]); var rawSourceStream = new RawSourceWaveStream(MemoryStream, WaveFormat.CreateIeeeFloatWaveFormat(44100, 1)); //_autoTuner = new AutoTuneWaveProvider(_wave16ToFloatProvider, AutoTuneSettings); _autoTuner = new AutoTuneWaveProvider(rawSourceStream, AutoTuneSettings); _waveFloatTo16Provider = new WaveFloatTo16Provider(_autoTuner); _monoToStereoProvider = new MonoToStereoProvider16(_waveFloatTo16Provider); //_monoToStereoProvider = new MonoToStereoProvider16(_autoTuner); _waveOutput = new WaveOutEvent(); WaveOutput.DeviceNumber = output.AudioDeviceId; WaveOutput.PlaybackStopped += WaveOutput_PlaybackStopped; WaveOutput.Init(_monoToStereoProvider); //JoeWaveOutEvent joeWaveOut = new JoeWaveOutEvent(); //joeWaveOut.DeviceNumber = output.AudioDeviceId; //joeWaveOut.DesiredLatency = 329; //joeWaveOut.NumberOfBuffers = 7; //joeWaveOut.Init(_monoToStereoProvider); //DirectSoundDeviceInfo foundDeviceInfo = null; //foreach (DirectSoundDeviceInfo deviceInfo in DirectSoundOut.Devices) //{ // if (deviceInfo.Description.Contains(output.AudioDeviceName)) // { // foundDeviceInfo = deviceInfo; // break; // } //} //if (foundDeviceInfo != null) //{ // DirectSoundOutput = new DirectSoundOut(foundDeviceInfo.Guid, 300); // DirectSoundOutput.PlaybackStopped += DirectSoundOutput_PlaybackStopped; // DirectSoundOutput.Init(_monoToStereoProvider); //} }