mirror of
https://github.com/bloeys/wavy.git
synced 2025-12-29 09:28:19 +00:00
Remove redundant if statement
This commit is contained in:
4
wavy.go
4
wavy.go
@ -112,11 +112,7 @@ func (s *Sound) RemainingTime() time.Duration {
|
||||
}
|
||||
|
||||
var currBytePos int64
|
||||
if s.Info.Mode == SoundMode_Streaming {
|
||||
currBytePos, _ = s.Bytes.Seek(0, io.SeekCurrent)
|
||||
} else {
|
||||
currBytePos, _ = s.Bytes.Seek(0, io.SeekCurrent)
|
||||
}
|
||||
|
||||
lenInMS := float64(s.Info.Size-currBytePos) / float64(s.Info.SamplingRate) / 4 * 1000
|
||||
return time.Duration(lenInMS) * time.Millisecond
|
||||
|
||||
Reference in New Issue
Block a user