Esempio n. 1
0
 /// <summary>
 /// Determines whether this channel has any data to play
 /// to allow optimisation to not read, but bump position forward
 /// </summary>
 public override bool HasData(int count)
 {
     if (position + count < audioStartPosition)
     {
         return(false);
     }
     if (position >= length)
     {
         return(false);
     }
     // Check whether the source stream has data.
     // source stream should be in the right poisition
     return(sourceStream.HasData(count));
 }
Esempio n. 2
0
        /// <summary>
        /// Determines whether this channel has any data to play
        /// to allow optimisation to not read, but bump position forward
        /// </summary>
        public override bool HasData(int count)
        {
            // Check whether the source stream has data.
            bool sourceHasData = sourceStream.HasData(count);

            if (sourceHasData)
            {
                if (position + count < 0)
                {
                    return(false);
                }
                return((position < length) && (volume != 0));
            }
            return(false);
        }
Esempio n. 3
0
 /// <summary>
 /// Determine whether the stream has the required amount of data.
 /// </summary>
 /// <param name="count">Number of bytes of data required from the stream.</param>
 /// <returns>Flag indicating whether the required amount of data is avialable.</returns>
 public override bool HasData(int count)
 {
     return(sourceStream.HasData(count));
 }