From fbd23a6db3c046919995d34b2ba0793d254bd41a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E3=81=8F=E3=81=BE=E3=81=8B=E3=81=BF=E5=B7=A5=E6=88=BF?= Date: Wed, 16 Nov 2016 18:41:39 +0900 Subject: [PATCH] =?utf8?q?Decoder.Read()=20=E3=81=A7=E3=80=8C=E9=85=8D?= =?utf8?q?=E5=88=97=E3=81=AE=E9=95=B7=E3=81=95=E3=81=8C=E4=B8=8D=E8=B6=B3?= =?utf8?q?=E3=81=A7=E3=81=99=E3=80=8D=E4=BE=8B=E5=A4=96=E3=81=8C=E7=99=BA?= =?utf8?q?=E7=94=9F=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F=E3=83=9F=E3=82=B9?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- FDK24/メディア/サウンド/WASAPI/Decoder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FDK24/メディア/サウンド/WASAPI/Decoder.cs b/FDK24/メディア/サウンド/WASAPI/Decoder.cs index c8812a4..8a4bdb2 100644 --- a/FDK24/メディア/サウンド/WASAPI/Decoder.cs +++ b/FDK24/メディア/サウンド/WASAPI/Decoder.cs @@ -97,8 +97,8 @@ namespace FDK.メディア.サウンド.WASAPI // 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 ) { -- 2.11.0