mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio: Add comment at NewInfiniteLoopWithIntro about the noises
Updates #1888
This commit is contained in:
parent
c91a6fb81f
commit
2d231c8454
@ -45,6 +45,12 @@ func NewInfiniteLoop(src io.ReadSeeker, length int64) *InfiniteLoop {
|
||||
|
||||
// NewInfiniteLoopWithIntro creates a new infinite loop stream with an intro part.
|
||||
// NewInfiniteLoopWithIntro accepts a source stream src, introLength in bytes and loopLength in bytes.
|
||||
//
|
||||
// If the loop's total length is exactly the same as src's length, you might hear noises around the loop joint.
|
||||
// This noise can be heard especially when src is decoded from a lossy compression format like Ogg/Vorbis and MP3.
|
||||
// In this case, try to add more (about 0.1[s]) data to src after the loop end.
|
||||
// If src has data after the loop end, an InfiniteLoop uses part of the data to blend with the loop start
|
||||
// to make the loop joint smooth.
|
||||
func NewInfiniteLoopWithIntro(src io.ReadSeeker, introLength int64, loopLength int64) *InfiniteLoop {
|
||||
return &InfiniteLoop{
|
||||
src: src,
|
||||
|
Loading…
Reference in New Issue
Block a user