OSDN Git Service
(root)
/
dtxmania
/
dtxmania.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
408d4c3
)
#43056 oggのデコードでのオフセット設定ミスを修正。
author
yyagi
<yyagi.dtxmania@gmail.com>
Mon, 18 Oct 2021 15:56:47 +0000
(
00:56
+0900)
committer
yyagi
<yyagi.dtxmania@gmail.com>
Mon, 18 Oct 2021 15:56:47 +0000
(
00:56
+0900)
FDK/コード/03.サウンド/Cogg.cs
patch
|
blob
|
history
diff --git
a/FDK/コード/03.サウンド/Cogg.cs
b/FDK/コード/03.サウンド/Cogg.cs
index
06039d8
..
2f5d477
100644
(file)
--- a/
FDK/コード/03.サウンド/Cogg.cs
+++ b/
FDK/コード/03.サウンド/Cogg.cs
@@
-85,9
+85,9
@@
namespace FDK
// samples are interleaved (chan0, chan1, chan0, chan1, etc.)
// sample value range is -0.99999994f to 0.99999994f unless vorbis.ClipSamples == false
- if (Dest.Length
+ offset
< p + cnt * 4)
+ if (Dest.Length < p + cnt * 4)
{
- cnt = (Dest.Length
+(int) offset
- p) / 4;
+ cnt = (Dest.Length - p) / 4;
bEnd = true;
}
Buffer.BlockCopy(readBuffer, 0, Dest, p, cnt * 4);