fix position bug

This commit is contained in:
tramhao 2021-01-28 11:50:08 +08:00
parent d42577f5b6
commit 7f36efc206

View File

@ -302,9 +302,9 @@ func position() time.Duration {
//seek is the function to move forward and rewind
func (p *Player) seek(pos int) error {
speaker.Lock()
defer speaker.Unlock()
err := s.Seek(pos * int(ft.SampleRate))
speaker.Unlock()
i = pos
i = pos-1
return err
}