Example #1
0
        public void TestTellIsZero() //with no loaded stream
        {
            Mpg123 mpg123 = new Mpg123(Mpg123.Decoders.ToArray().FirstOrDefault());

            long seekPositon = mpg123.Tell();

            Assert.That(seekPositon, Is.Zero);
        }
Example #2
0
        public void TestTellIsZero()
        {
            string decoder = Mpg123.Decoders.ToArray().FirstOrDefault();
            Mpg123 mpg123  = new Mpg123();

            long seekPositon = mpg123.Tell();

            Assert.That(seekPositon, Is.Zero);
        }
Example #3
0
        public void TestTellWithLoadedStream()
        {
            string dirName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string path    = Path.Combine(dirName, "bensound-scifi.mp3");

            byte[] buffer = new byte[1000];
            Mpg123 mpg123 = new Mpg123();

            mpg123.Open(path);

            uint end = 0;

            while (mpg123.Read(buffer, ref end) != Mpg123.Errors.OK)
            {
            }

            long seekPosition = mpg123.Tell();

            Assert.That(seekPosition, Is.GreaterThan(0));
        }