public SoundMixer(ushort bitsPerSample, ushort channels, uint sampleRate, uint bufferLengthBytes) { player = new SoundWrapper(SoundWrapper.Mode.Play, bitsPerSample, channels, sampleRate, bufferLengthBytes); player.NewDataRequested += Player_NewDataRequested; recorder = new SoundWrapper(SoundWrapper.Mode.Record, bitsPerSample, channels, sampleRate, bufferLengthBytes); recorder.NewDataPresent += Recorder_NewDataPresent; }
/// <summary> /// Unity method. /// Awake this instance. /// </summary> public override void Awake() { base.Awake(); cachedSoundWrapper = SoundWrapper.Instance; if (audioSource) { cachedAudio = cachedSoundWrapper.GetSoundComponent(audioSource); } }
public ExtremeBassBoost() { InitializeComponent(); recorder = new SoundWrapper(SoundWrapper.Mode.Record, 16, 2, sampleRate, bufferLengthBytes); recorder.NewDataPresent += Recorder_NewDataPresent; player = new SoundWrapper(SoundWrapper.Mode.Play, 16, 2, sampleRate, bufferLengthBytes); player.NewDataRequested += Player_NewDataRequested; comboBoxRec.Items.AddRange(recorder.EnumerateDevices().ToArray()); comboBoxRec.SelectedIndex = 0; comboBoxPlay.Items.AddRange(player.EnumerateDevices().ToArray()); comboBoxPlay.SelectedIndex = 0; trackBar1.Value = 100000; trackBar2.Value = 500000; trackBar3.Value = 500000; }