LoadSound() public method

public LoadSound ( Stream s ) : bool
s Stream
return bool
Ejemplo 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;
            });
        }
Ejemplo 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);
            });
        }