// offset は、0~buffer.Length-1 に収める。
offset = Math.Max( 0, Math.Min( buffer.Length - 1, offset ) );
- // count は、_EncodeWaveData.Length, buffer.Length-offset, count のうちの最小値とする。
- count = Math.Min( Math.Min( this._EncodedWaveData.Length, count ), buffer.Length - offset );
+ // count は、_EncodeWaveData.Length-Position, buffer.Length-offset, count のうちの最小値とする。
+ count = Math.Min( Math.Min( this._EncodedWaveData.Length - (int) this._Position, count ), buffer.Length - offset );
if( 0 < count )
{