mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
audio: Bug fix: timeStream was not used for a reader player
This commit is contained in:
parent
6f462e824f
commit
027463ff88
@ -62,7 +62,7 @@ func (c *readerPlayerFactory) newPlayerImpl(context *Context, src io.Reader) (pl
|
|||||||
|
|
||||||
p := &readerPlayer{
|
p := &readerPlayer{
|
||||||
context: context,
|
context: context,
|
||||||
player: c.driver.NewPlayer(src),
|
player: c.driver.NewPlayer(s),
|
||||||
src: s,
|
src: s,
|
||||||
}
|
}
|
||||||
return p, nil
|
return p, nil
|
||||||
@ -159,7 +159,7 @@ func newTimeStream(r io.Reader, sampleRate int) (*timeStream, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *timeStream) Read(buf []byte) (int, error) {
|
func (s *timeStream) Read(buf []byte) (int, error) {
|
||||||
n, err := s.Read(buf)
|
n, err := s.r.Read(buf)
|
||||||
s.pos += int64(n)
|
s.pos += int64(n)
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user