Ejemplo n.º 1
0
        private int StreamBeginWave(string path, long startFrame)
        {
            int ercd = -1;

            mWaveR = new WavReader();
            mBr    = new BinaryReader(
                File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read));

            bool readSuccess = mWaveR.ReadStreamBegin(mBr, out mPcmData);

            if (readSuccess)
            {
                NumFrames = mWaveR.NumFrames;

                if (mWaveR.ReadStreamSkip(mBr, startFrame))
                {
                    ercd = 0;
                }
            }
            return(ercd);
        }