Pause pauses the AudioSystem's loop. Call Restart to continue playing audio.
()
| 231 | |
| 232 | // Pause pauses the AudioSystem's loop. Call Restart to continue playing audio. |
| 233 | func (a *AudioSystem) Pause() { |
| 234 | if len(a.pauseCh) > 0 { // so it doesn't block |
| 235 | return |
| 236 | } |
| 237 | a.pauseCh <- struct{}{} |
| 238 | } |
| 239 | |
| 240 | // Restart restarts the AudioSystem's loop when it's paused. |
| 241 | func (a *AudioSystem) Restart() { |
no outgoing calls