add some go-critic suggestions

This commit is contained in:
sentriz
2020-05-07 04:31:47 +01:00
parent 803a5babff
commit c65606ba1f
7 changed files with 22 additions and 22 deletions

View File

@@ -180,15 +180,13 @@ func (j *Jukebox) doUpdateSpeaker(su updateSpeaker) error {
return err
}
j.Lock()
{
j.info = &strmInfo{}
j.info.strm = streamer.(beep.StreamSeekCloser)
j.info.ctrlStrmr.Streamer = beep.Resample(
4, format.SampleRate,
j.sr, j.info.strm,
)
j.info.format = format
}
j.info = &strmInfo{}
j.info.strm = streamer.(beep.StreamSeekCloser)
j.info.ctrlStrmr.Streamer = beep.Resample(
4, format.SampleRate,
j.sr, j.info.strm,
)
j.info.format = format
j.Unlock()
speaker.Play(beep.Seq(&j.info.ctrlStrmr, beep.Callback(func() {
j.speaker <- updateSpeaker{su.index + 1}