예제 #1
0
        public WaveCard(
            WaveFormat format,
            WaveIn inDriver,
            WaveOut outDriver,
            WaveInputMapper inputMapper,
            WaveOutputMapper outputMapper)
        {
            if (format == null)
            {
                throw new ArgumentNullException("format", "Must specify an audio format");
            }

            if (inDriver == null)
            {
                throw new ArgumentNullException("inDriver", "WaveIn driver cannot be null");
            }

            if (outDriver == null)
            {
                throw new ArgumentNullException("outDriver", "WaveOut driver cannot be null");
            }

            if (inputMapper == null)
            {
                throw new ArgumentNullException("inputMapper", "Wave input mapper cannot be null");
            }

            if (outputMapper == null)
            {
                throw new ArgumentNullException("outputMapper", "Wave output mapper cannot be null");
            }

            this.format = format;
            this.inDriver = inDriver;
            this.outDriver = outDriver;
            this.inputMapper = inputMapper;
            this.outputMapper = outputMapper;
        }
예제 #2
0
        public WaveCard(
            WaveFormat format,
            WaveIn inDriver,
            WaveOut outDriver,
            WaveInputMapper inputMapper,
            WaveOutputMapper outputMapper)
        {
            if (format == null)
            {
                throw new ArgumentNullException("format", "Must specify an audio format");
            }

            if (inDriver == null)
            {
                throw new ArgumentNullException("inDriver", "WaveIn driver cannot be null");
            }

            if (outDriver == null)
            {
                throw new ArgumentNullException("outDriver", "WaveOut driver cannot be null");
            }

            if (inputMapper == null)
            {
                throw new ArgumentNullException("inputMapper", "Wave input mapper cannot be null");
            }

            if (outputMapper == null)
            {
                throw new ArgumentNullException("outputMapper", "Wave output mapper cannot be null");
            }

            this.format       = format;
            this.inDriver     = inDriver;
            this.outDriver    = outDriver;
            this.inputMapper  = inputMapper;
            this.outputMapper = outputMapper;
        }