()
| 165 | } |
| 166 | |
| 167 | func (sound *Sound) Destroy() { |
| 168 | sound.Pause() |
| 169 | speaker.Lock() |
| 170 | |
| 171 | if stream, ok := sound.Stream.(beep.StreamSeekCloser); ok { |
| 172 | stream.Close() |
| 173 | } |
| 174 | sound.Stream = nil |
| 175 | |
| 176 | speaker.Unlock() |
| 177 | } |
| 178 | |
| 179 | // func (sound *Sound) TogglePause() { |
| 180 | // if sound.Control.Paused { |