public void TestCreateStreamToMicrophone()
        {
            const int StreamToMicrophone = 100;

            proxy.Setup(p => p.StartRecording(5512, BassConstants.NumberOfChannels, It.IsAny <BASSFlag>())).Returns(
                StreamToMicrophone);

            var result = streamFactory.CreateStreamFromMicrophone(5512);

            Assert.AreEqual(StreamToMicrophone, result);
        }
        public float[] ReadMonoSamples(int sampleRate, int secondsToRecord)
        {
            if (!IsRecordingSupported())
            {
                throw new BassException("No recording device could be found un running machine");
            }

            int stream = streamFactory.CreateStreamFromMicrophone(sampleRate);

            return(bassResampler.Resample(stream, sampleRate, secondsToRecord, 0, mixerStream => new ContinuousStreamSamplesProvider(new BassSamplesProvider(proxy, mixerStream))));
        }
        public float[] ReadMonoSamplesFromMicrophone(int sampleRate, int secondsToRecord)
        {
            int stream = streamFactory.CreateStreamFromMicrophone(sampleRate);

            return(bassResampler.Resample(stream, sampleRate, secondsToRecord, 0, mixerStream => new ContinuousStreamSamplesProvider(new BassSamplesProvider(proxy, mixerStream))));
        }