mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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{
|
||||
context: context,
|
||||
player: c.driver.NewPlayer(src),
|
||||
player: c.driver.NewPlayer(s),
|
||||
src: s,
|
||||
}
|
||||
return p, nil
|
||||
@ -159,7 +159,7 @@ func newTimeStream(r io.Reader, sampleRate int) (*timeStream, error) {
|
||||
}
|
||||
|
||||
func (s *timeStream) Read(buf []byte) (int, error) {
|
||||
n, err := s.Read(buf)
|
||||
n, err := s.r.Read(buf)
|
||||
s.pos += int64(n)
|
||||
return n, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user