public Visualizer(IOutputWaveformBehaviour outputWaveformBehaviour, IVisualizerBehaviour fftCircleBehaviour, IPureDataFacade pureDataFacade, IPureDataArrayFacade outputArrayFacade = null, IPureDataArrayFacade fftArrayFacade = null) { revLevel_ = new float[1]; fftCircleBehaviour_ = fftCircleBehaviour; outputWaveformBehaviour_ = outputWaveformBehaviour; pureDataFacade_ = pureDataFacade; outputArrayFacade_ = outputArrayFacade ?? new PureDataArrayFacade("output", 512); fftArrayFacade_ = fftArrayFacade ?? new PureDataArrayFacade("fft", 512); outputWaveformBehaviour_.Updated += OnWaveformUpdated; fftCircleBehaviour_.Updated += OnSpectrumUpdated; }
public void SetUp() { pureDataFacadeMock_ = Substitute.For <IPureDataFacade>(); outputWaveformBehaviourMock_ = Substitute.For <IOutputWaveformBehaviour>(); fftCircleBehaviourMock_ = Substitute.For <IVisualizerBehaviour>(); outputArrayFacadeMock_ = Substitute.For <IPureDataArrayFacade>(); spectrumArrayFacadeMock_ = Substitute.For <IPureDataArrayFacade>(); dummySamples_ = new float[512]; outputArrayFacadeMock_.Get().Returns(dummySamples_); spectrumArrayFacadeMock_.Get().Returns(dummySamples_); outputWaveformBehaviourMock_.Distance.Returns(10f); var unused = new Visualizer(outputWaveformBehaviourMock_, fftCircleBehaviourMock_, pureDataFacadeMock_, outputArrayFacadeMock_, spectrumArrayFacadeMock_); }