Esempio n. 1
0
        public int CreateStreamFromMicrophone(int sampleRate)
        {
            int stream = proxy.StartRecording(sampleRate, BassConstants.NumberOfChannels, BASSFlag.BASS_SAMPLE_MONO | BASSFlag.BASS_SAMPLE_FLOAT);

            ThrowIfStreamIsInvalid(stream);
            return(stream);
        }
        private int CreateStreamByStartingToRecord(int sampleRate)
        {
            int stream = bassServiceProxy.StartRecording(
                sampleRate, 1, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_MONO | BASSFlag.BASS_SAMPLE_FLOAT);

            if (stream == 0)
            {
                throw new BassAudioServiceException(bassServiceProxy.GetLastError());
            }

            return(stream);
        }