LoadSound() public method

public LoadSound ( Stream s ) : bool
s Stream
return bool
Esempio n. 1
0
        public WavFormat(Stream stream)
        {
            this.stream = stream;

            var position = stream.Position;
            reader = Exts.Lazy(() =>
            {
                var wavReader = new WavReader();
                try
                {
                    if (!wavReader.LoadSound(stream))
                        throw new InvalidDataException();
                }
                finally
                {
                    stream.Position = position;
                }

                return wavReader;
            });
        }
Esempio n. 2
0
        public WavFormat(Stream stream)
        {
            this.stream = stream;

            var position = stream.Position;

            reader = Exts.Lazy(() =>
            {
                var wavReader = new WavReader();
                try
                {
                    if (!wavReader.LoadSound(stream))
                    {
                        throw new InvalidDataException();
                    }
                }
                finally
                {
                    stream.Position = position;
                }

                return(wavReader);
            });
        }