private AudioInput(IMediaRecorder recorder, IClock clock, GameObject gameObject, bool mute = false) { this.recorder = recorder; this.clock = clock; this.attachment = gameObject.AddComponent <AudioInputAttachment>(); this.attachment.sampleBufferDelegate = OnSampleBuffer; this.mute = mute; }
public void Dispose() => AudioInputAttachment.Destroy(attachment);
public void Dispose() { attachment.sampleBufferDelegate = null; AudioInputAttachment.Destroy(attachment); }